From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Searching for a headline Date: Sun, 26 Feb 2017 19:12:10 +0100 Message-ID: <87wpcces91.fsf@nicolasgoaziou.fr> References: <87efylt1jg.fsf@nicolasgoaziou.fr> <51288adb-b5c7-5850-6a8e-01aa536c43f5@ofosos.org> <8737f0ucs0.fsf@nicolasgoaziou.fr> <8baa10bf-12ce-04b0-f0fd-b6322909433f@ofosos.org> <874lzgg8tr.fsf@nicolasgoaziou.fr> <573a07d1-1d0f-20e0-fc52-eadf5f46955d@ofosos.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci3Iv-0004sI-OP for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 13:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci3Is-0001OF-El for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 13:12:17 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:35696) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ci3Is-0001O9-7j for emacs-orgmode@gnu.org; Sun, 26 Feb 2017 13:12:14 -0500 In-Reply-To: <573a07d1-1d0f-20e0-fc52-eadf5f46955d@ofosos.org> (Mark Meyer's message of "Sun, 26 Feb 2017 18:54:59 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Mark Meyer Cc: emacs-orgmode Mark Meyer writes: > On 02/26/17 18:28, Nicolas Goaziou wrote: > I wrote it yesterday, the code's up at > > https://github.com/ofosos/org-epub Great. > it's a little crufty, because I did write it for org 8 initially. > > Hmm, I have to think about it. I would like to either have a 1:1 mapping > between the elements `org-element' delvers and the links the export > backend generates or create a function that runs before the export that > generates :custom_id properties for every element that doesn't have > one. Did you look at `org-html--format-toc-headline'? Also, if you want to collect headlines above a given level, there is `org-export-collect-headlines'. > This was easier in org 8, since every internal link was just something > like `sec-8-2'. It is also easy in Org 9 : (org-export-get-reference headline info). See its use in the function above. Regards,