GNU bug report logs - #27518
25.2.1; reftex-typekey-check seems to be case-insensitive

Previous Next

Package: auctex;

Reported by: "Jörn Kommer" <tehfall3n <at> googlemail.com>

Date: Wed, 28 Jun 2017 13:25:01 UTC

Severity: normal

Found in version 25.2.1

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27518 in the body.
You can then email your comments to 27518 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#27518; Package auctex. (Wed, 28 Jun 2017 13:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Jörn Kommer" <tehfall3n <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Wed, 28 Jun 2017 13:25:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Jörn Kommer" <tehfall3n <at> googlemail.com>
To: bug-auctex <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: 25.2.1; reftex-typekey-check seems to be case-insensitive
Date: Wed, 28 Jun 2017 13:16:31 +0200
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.

As this is my first bug report, I hope I included everything important.  

Emacs  : GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10)
 of 2017-04-22
Package: 25.2.1

current state:
==============
(setq
 window-system 'x
 reftex-plug-into-AUCTeX t
 )




Information forwarded to bug-auctex <at> gnu.org:
bug#27518; Package auctex. (Sun, 02 Jul 2017 21:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 27518 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Jörn Kommer <tehfall3n <at> googlemail.com>
Cc: 27518 <at> debbugs.gnu.org
Subject: Re: bug#27518: 25.2.1;
 reftex-typekey-check seems to be case-insensitive
Date: Sun, 02 Jul 2017 23:44:50 +0200
"Jörn Kommer" <tehfall3n <at> googlemail.com> 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





Reply sent to Arash Esbati <arash <at> gnu.org>:
You have taken responsibility. (Fri, 11 Aug 2017 22:14:02 GMT) Full text and rfc822 format available.

Notification sent to "Jörn Kommer" <tehfall3n <at> googlemail.com>:
bug acknowledged by developer. (Fri, 11 Aug 2017 22:14:02 GMT) Full text and rfc822 format available.

Message #13 received at 27518-done <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Jörn Kommer <tehfall3n <at> googlemail.com>
Cc: 27518-done <at> debbugs.gnu.org, Tassilo Horn <tsdh <at> gnu.org>
Subject: Re: bug#27518: 25.2.1;
 reftex-typekey-check seems to be case-insensitive
Date: Sat, 12 Aug 2017 00:07:20 +0200
[Message part 1 (text/plain, inline)]
Arash Esbati <arash <at> gnu.org> writes:

> thanks for your report.  It also seems to me that you and Andrew have
> found a bug there.

Hi all,

following up myself, the attached patch should fix this bug report.
Hence, I'm closing this one.

@Tassilo: Can you please install this patch in Emacs master?  TIA.

Best, Arash

[0001-Make-a-case-sensitive-match-for-strings.patch (text/x-patch, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#27518; Package auctex. (Sat, 12 Aug 2017 06:16:02 GMT) Full text and rfc822 format available.

Message #16 received at 27518-done <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: Jörn Kommer <tehfall3n <at> googlemail.com>,
 27518-done <at> debbugs.gnu.org
Subject: Re: bug#27518: 25.2.1;
 reftex-typekey-check seems to be case-insensitive
Date: Sat, 12 Aug 2017 08:15:27 +0200
Arash Esbati <arash <at> gnu.org> writes:

Hi Arash,

> following up myself, the attached patch should fix this bug report.
> Hence, I'm closing this one.
>
> @Tassilo: Can you please install this patch in Emacs master?  TIA.

Done!

Bye,
Tassilo




Information forwarded to bug-auctex <at> gnu.org:
bug#27518; Package auctex. (Sat, 12 Aug 2017 06:16:02 GMT) Full text and rfc822 format available.

Message #19 received at 27518-done <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Arash Esbati <arash <at> gnu.org>
Cc: Jörn Kommer <tehfall3n <at> googlemail.com>,
 27518-done <at> debbugs.gnu.org
Subject: Re: bug#27518: 25.2.1;
 reftex-typekey-check seems to be case-insensitive
Date: Sat, 12 Aug 2017 08:11:47 +0200
Arash Esbati <arash <at> gnu.org> writes:

Hi Arash,

> following up myself, the attached patch should fix this bug report.
> Hence, I'm closing this one.
>
> @Tassilo: Can you please install this patch in Emacs master?  TIA.

Done!

Bye,
Tassilo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 Sep 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.