GNU bug report logs - #21259
Regex of (this)pagestyle in TeX-complete-list

Previous Next

Package: auctex;

Reported by: Arash Esbati <esbati <at> gmx.de>

Date: Fri, 14 Aug 2015 20:14:02 UTC

Severity: normal

Done: Mosè Giordano <mose <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mosè Giordano <mose <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#21259: closed (Regex of (this)pagestyle in TeX-complete-list)
Date: Sat, 15 Aug 2015 13:21:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 15 Aug 2015 15:19:22 +0200
with message-id <CAKtYQqQyatEwz5dqDMz9oJfSiPzMPtUGEBsA9ysD_NA5c1mdSA <at> mail.gmail.com>
and subject line Re: bug#21259: Regex of (this)pagestyle in TeX-complete-list
has caused the debbugs.gnu.org bug report #21259,
regarding Regex of (this)pagestyle in TeX-complete-list
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
21259: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21259
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Arash Esbati <esbati <at> gmx.de>
To: bug-auctex <at> gnu.org
Subject: Regex of (this)pagestyle in TeX-complete-list
Date: Fri, 14 Aug 2015 21:32:04 +0200
[Message part 3 (text/plain, inline)]
Hi all,

if I start emacs with `emacs --eval '(setq debug-on-error t)' &' type
the following a tex file:

    \thispagestyle{`C-M-i'

I get this error:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Can't find completion for \"\\thispagestyle{\"")
  signal(error ("Can't find completion for \"\\thispagestyle{\""))
  error("Can't find completion for \"%s\"" "\\thispagestyle{")
  TeX-complete-symbol()
  call-interactively(TeX-complete-symbol nil nil)
  command-execute(TeX-complete-symbol)
--8<---------------cut here---------------end--------------->8---

It is due to a bug in the definition of `TeX-complete-list' in
`latex.el' (line 5913):

--8<---------------cut here---------------start------------->8---
(setq TeX-complete-list
      (append '(;; snipped
		("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)"
		 1 LaTeX-pagestyle-list "}"))
		TeX-complete-list))
--8<---------------cut here---------------end--------------->8---

The number refers to the wrong subgroup in the regex.  There are two
ways to fix this: Make `\\(this\\)' a shy-group or replace `1' with `2'.

Please find attached a patch going the second route since it looks more
coherent to the rest of definitions in `TeX-complete-list'.  

As always, any comments welcome.

Best, Arash

[0001-Fix-the-subgroup-number-in-a-regex.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Mosè Giordano <mose <at> gnu.org>
To: Arash Esbati <esbati <at> gmx.de>
Cc: 21259-done <at> debbugs.gnu.org
Subject: Re: bug#21259: Regex of (this)pagestyle in TeX-complete-list
Date: Sat, 15 Aug 2015 15:19:22 +0200
Hi Arash,

2015-08-14 21:32 GMT+02:00 Arash Esbati <esbati <at> gmx.de>:
> Hi all,
>
> if I start emacs with `emacs --eval '(setq debug-on-error t)' &' type
> the following a tex file:
>
>     \thispagestyle{`C-M-i'
>
> I get this error:
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (error "Can't find completion for \"\\thispagestyle{\"")
>   signal(error ("Can't find completion for \"\\thispagestyle{\""))
>   error("Can't find completion for \"%s\"" "\\thispagestyle{")
>   TeX-complete-symbol()
>   call-interactively(TeX-complete-symbol nil nil)
>   command-execute(TeX-complete-symbol)
> --8<---------------cut here---------------end--------------->8---
>
> It is due to a bug in the definition of `TeX-complete-list' in
> `latex.el' (line 5913):
>
> --8<---------------cut here---------------start------------->8---
> (setq TeX-complete-list
>       (append '(;; snipped
>                 ("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)"
>                  1 LaTeX-pagestyle-list "}"))
>                 TeX-complete-list))
> --8<---------------cut here---------------end--------------->8---
>
> The number refers to the wrong subgroup in the regex.  There are two
> ways to fix this: Make `\\(this\\)' a shy-group or replace `1' with `2'.
>
> Please find attached a patch going the second route since it looks more
> coherent to the rest of definitions in `TeX-complete-list'.

Agreed.  Patch installed, thanks!

Bye,
Mosè


This bug report was last modified 9 years and 281 days ago.

Previous Next


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