[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [Accepted] Make the latex export preprocessor rewrite #+INDEX to
From: |
Robert Goldman |
Subject: |
Re: [O] [Accepted] Make the latex export preprocessor rewrite #+INDEX to \index. |
Date: |
Wed, 04 May 2011 17:46:12 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
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