GNU bug report logs -
#50202
bibtex-mode: unescaped dollar sign in file field leads to wrong highlighting
Previous Next
Reported by: Yuu Yin <yuuyin <at> protonmail.com>
Date: Wed, 25 Aug 2021 19:16:02 UTC
Severity: normal
Done: Roland Winkler <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 50202 <at> debbugs.gnu.org (full text, mbox):
>> But I wonder how important it is for `bibtex-mode` to try and recognize
>> the (La)TeX meaning of the $ character.
>> Maybe we should just give $ the punctuation syntax in the syntax-table.
>
> The (La)TeX meaning of the $ character is relevant for titles that my
> contain formulas. The question is what is in the end more acceptable:
> formulas in titles that do not receive special treatment by font-lock.
> Or $ being mis-treated in url and file fields (which goes beyond these
> fields). Maybe it is best to let the user decide whether $ should be
> treated as math delimiter (the default) or as punctation.
The downside of treating $ as punctuation is that $^2$ won't be
highlighted specially, but the upside is that "foo$bar" won't be
mishighlighted in a url.
To me the highlighting of math formulas is sufficiently secondary that
I'd err on the safe side (i.e. avoid mishighlighting). The other option
is to try and make this choice on a field-by-field basis, which seems
like a lot of work for fairly little benefit.
Stefan
This bug report was last modified 2 years and 139 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.