From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add :target option for the TOC keyword Date: Tue, 21 May 2019 21:43:12 +0200 Message-ID: <87zhnf1tm7.fsf@nicolasgoaziou.fr> References: <87woir7dm5.fsf@sachachua.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTAfV-000854-NF for emacs-orgmode@gnu.org; Tue, 21 May 2019 15:43:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTAfU-00049b-PY for emacs-orgmode@gnu.org; Tue, 21 May 2019 15:43:25 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:59335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hTAfU-00047i-J7 for emacs-orgmode@gnu.org; Tue, 21 May 2019 15:43:24 -0400 In-Reply-To: <87woir7dm5.fsf@sachachua.com> (Sacha Chua's message of "Wed, 15 May 2019 14:54:10 -0400") 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: Sacha Chua Cc: dc@toedt.com, emacs-orgmode@gnu.org Hello, Sacha Chua writes: > Hi! Here's a patch to allow table of contents to target a specified > headline. I've added tests for HTML, ASCII, Markdown, and ODT export. > I should have copyright assignment papers already on file. > > Does it work for anyone other than me? =) Thank you! I cannot guess the use case, but you certainly have one :) Even if this doesn't sound like a very common need, it doesn't add too much overhead to the code base either. It would be nice if it really generalized "local" keyword, i.e., with ":target local", "local" variant being supported but not documented. Also, there seems to be much code duplication in the export back-ends. Would it make sense to factor this out into a function in "ox.el". For example, `org-export-resolve-link-string' or some such? With some tests for bonus points. Speaking of tests, we usually don't write tests for export back-ends, so you can drop them. Could you send an updated patch? Regards, -- Nicolas Goaziou