[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27518: 25.2.1; reftex-typekey-check seems to be case-insensitive
From: |
Arash Esbati |
Subject: |
bug#27518: 25.2.1; reftex-typekey-check seems to be case-insensitive |
Date: |
Sun, 02 Jul 2017 23:44:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 |
"Jörn Kommer" <address@hidden> writes:
> It seems that, unexpectedly, ‘reftex-typekey-check’ is case-insensitive.
> When I set ‘reftex-insert-label-flags’ for a key named ‘E’ to ‘nil t’,
> these flags are also set for environments with the ‘e’ key (equations,
> etc.). As there are already the pre-defined labels ‘n (footnote)’ and ‘N
> (endnote)’, and you're probably supposed to be able to set different
> flags for them, this seems to be a bug.
>
> As Andrew Swann (who found the bug in emacs.se:
> https://emacs.stackexchange.com/q/33722/16178) pointed out, as a fix it
> would probably be enough to set ‘case-fold-search’ to ‘nil’ locally, as
> doing this globally seems to fix the issue.
Hi Jörn,
thanks for your report. It also seems to me that you and Andrew have
found a bug there. First of all, I think you are misunderstanding the
way `reftex-insert-label-flags' works: If you want simple labels added
by RefTeX, you should drop those letters in `reftex-insert-label-flags'.
Next, can you please open your .tex file, in scratch buffer, eval this
(i.e., put point after last ) and hit `C-x C-e'):
--8<---------------cut here---------------start------------->8---
(defun reftex-typekey-check (typekey conf-variable &optional n)
;; Check if CONF-VARIABLE is true or contains TYPEKEY
(and n (setq conf-variable (nth n conf-variable)))
(let ((case-fold-search nil))
(or (eq conf-variable t)
(and (stringp conf-variable)
(string-match (concat "[" conf-variable "]") typekey)))))
--8<---------------cut here---------------end--------------->8---
and try to add a satz environment in your .tex file? TIA.
Best, Arash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#27518: 25.2.1; reftex-typekey-check seems to be case-insensitive,
Arash Esbati <=