From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Re: [Accepted] Make the latex export preprocessor rewrite #+INDEX to \index. Date: Wed, 04 May 2011 17:46:12 -0500 Message-ID: <4DC1D734.1080102@sift.info> References: <1303991243-30731-2-git-send-email-rpgoldman@sift.info> <20110504075943.46A1743B538@u016822.science.uva.nl> <4DC16BEC.7090609@sift.info> <11C6FAAE-B0EA-4A93-A85D-6B629BF64000@gmail.com> Reply-To: rpgoldman@sift.info Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHkpm-0006GQ-Qx for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHkpk-0006t8-L4 for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:46:18 -0400 Received: from mpls.sift.info ([75.146.46.193]:59373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHkpk-0006sk-DZ for emacs-orgmode@gnu.org; Wed, 04 May 2011 18:46:16 -0400 In-Reply-To: <11C6FAAE-B0EA-4A93-A85D-6B629BF64000@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Carsten Dominik , emacs-orgmode@gnu.org On 5/4/11 May 4 -5:36 PM, Carsten Dominik wrote: > > On 4.5.2011, at 17:08, Robert Goldman wrote: > >> On 5/4/11 May 4 -2:59 AM, Carsten Dominik wrote: >>> Patch 767 (http://patchwork.newartisans.com/patch/767/) is now "Accepted". >>> >>> Maintainer comment: Pushed with modifications. Some optimization, and the original patch would have stopped at the first #+index line that was missing the entry... Please verify that it still works >>> >>> This relates to the following submission: >>> >>> http://mid.gmane.org/%3C1303991243-30731-2-git-send-email-rpgoldman%40sift.info%3E >> >> I think there's a minor problem with the patch. AFAICT, it binds the >> local variable 'entry' but does not read it (instead it uses the match >> text directly). > > That is right, that is unnecessary. I removed that, thanks. > >> As an aside, it might be desirable to handle the empty index case that >> you identified. E.g., >> >> (if (> (match-end 1) (match-beginning 1)) >> ...rewrite the index entry... >> ;; else >> emit a warning >> rewrite the index entry as the empty string >> ) > > You mean, instead of ignoring it, there should be an error message > or warning? > > - Carsten I was suggesting a warning. I don't /believe/ (I'm not in a position to check right now) that the previous code ignored it --- I think it was going to write an empty index --- \index{} --- and I'm not sure whether that would be happy with Latex, or would generate a hard-to-debug error downstream after processing the generated latex. I also don't know if it's easy to report the particular line in the org file that's bad. I suspect not, because of the preprocessing, but I could be wrong. best, R