GNU bug report logs -
#32442
26.1; reftex: TOC problems with section titles containing double quotes
Previous Next
Reported by: pichler <at> ieee.org
Date: Tue, 14 Aug 2018 21:08:01 UTC
Severity: normal
Found in version 26.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 32442 in the body.
You can then email your comments to 32442 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#32442
; Package
auctex
.
(Tue, 14 Aug 2018 21:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
pichler <at> ieee.org
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Tue, 14 Aug 2018 21:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Dear Sirs,
I recently updated my emacs installation on Windows 10 from 24.2 to the
most recent pre-compiled version I found on
ftp://ftp.gnu.org/gnu/emacs/windows/ I then enabled auctex via M-x
list-packages. During editing LaTeX files, I enabled reftex as minor
mode via M-x reftex-mode
Example LaTeX file:
===============
\documentclass{article}
\usepackage{german}
\begin{document}
\section{K"onige}
K"onige sind selten.
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
===============
Failure description:
Upon invoking reftex-toc via C-c =, I get
===============
1 K"onige} K"onige sind selten.
===============
as TABLE-OF-CONTENTS. My old 24.2 emacs version would have resulted in
===============
1 K"onige
===============
Apparently, the end of the section header is not recognized when it
contains a double quote as needed by the german package to typeset
German Umlauts. Any help would be appreciated.
Kind regards,
Peter Pichler
Emacs : GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
of 2018-05-30
Package: 26.1
current state:
==============
(setq
window-system 'w32
reftex-plug-into-AUCTeX nil
)
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#32442
; Package
auctex
.
(Wed, 15 Aug 2018 19:51:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 32442 <at> debbugs.gnu.org (full text, mbox):
Peter Pichler <dr.peter.pichler <at> t-online.de> writes:
> I recently updated my emacs installation on Windows 10 from 24.2 to
> the most recent pre-compiled version I found on
> ftp://ftp.gnu.org/gnu/emacs/windows/ I then enabled auctex via M-x
> list-packages. During editing LaTeX files, I enabled reftex as minor
> mode via M-x reftex-mode
>
> Example LaTeX file:
>
> ===============
>
> \documentclass{article}
> \usepackage{german}
> \begin{document}
> \section{K"onige}
> K"onige sind selten.
> \end{document}
>
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% End:
Hi Peter,
I think this is RefTeX's subtle way to say: "Please also update your TeX
distro to latest TeXlive or MikTeX, change your file to this and use
UTF8 encoding with `C-x RET f prefer-utf-8 RET'":
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\tableofcontents
\section{Könige}
\label{sec:konige}
Könige sind selten.
\end{document}
Yes, this seems to be a bug, thanks for the report. But I can't tell
why. Will try to investigate, someday :-)
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#32442
; Package
auctex
.
(Sun, 19 Aug 2018 18:36:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 32442 <at> debbugs.gnu.org (full text, mbox):
Peter Pichler <dr.peter.pichler <at> t-online.de> writes:
> Am 15.08.2018 um 21:49 schrieb Arash Esbati:
>> Hi Peter,
>> I think this is RefTeX's subtle way to say: "Please also update your TeX
>> distro to latest TeXlive or MikTeX, change your file to this and use
>> UTF8 encoding with `C-x RET f prefer-utf-8 RET'":
>>
>> \documentclass{article}
>> \usepackage[ngerman]{babel}
>>
>> \usepackage[T1]{fontenc}
>> \usepackage{lmodern}
>>
>> \begin{document}
>>
>> \tableofcontents
>>
>> \section{Könige}
>> \label{sec:konige}
>> Könige sind selten.
>>
>> \end{document}
>>
>> Yes, this seems to be a bug, thanks for the report. But I can't tell
>> why. Will try to investigate, someday :-)
Hi Peter,
please keep 32442 <at> debbugs.gnu.org in CC, thanks.
> actually, it is the other way round ;-) Because I had to update my
> MikTeX version, I also had to update to a more recent emacs/auctex
> installation. I am aware that I could use the äöüß instead of "a
> etc. but the last time this resulted in serious problems with
> spellchecking which I could not resolve within reasonable time.
Then I suggest you give it a new try and fix this issue.
> In the meanwhile, I tried to find find out what happened. It appears
> that the problem occurs in the function reftex-context-substring
> called in line 19 of the function reftex-section-info which is called
> in turn in line 73 of the function reftex-parse-from-file. Without
> double quotes, the (up-list 1) in line 23 of the function
> reftex-parse-from-file works normally and the argument of the section
> command is extracted correctly. If the argument of the section command
> contains double quotes, the (up-list 1) results in an error and
> reftex-parse-from-file takes the 150 characters (or until eof)
> beginning with the argument of the section command. Strangely enough,
> up-list called interactively or out of an interactive function (even
> within the condition-case) causes no problems at all. Unfortunately,
> this erratic behavior exceeds my experiences with emacs-lisp by far
> and I hope, you have more luck.
You were on the right track here. This behavior isn't erratic when you
look at the definition of `reftex-parse-from-file'. There you see that
the actual parsing is done inside a `reftex-with-special-syntax'. This
macro saves the current syntax table, activates the one called
`reftex-syntax-table', does the job and restores the saved one.
`reftex-syntax-table' is defined like this:
(setq reftex-syntax-table (copy-syntax-table))
(modify-syntax-entry ?\( "." reftex-syntax-table)
(modify-syntax-entry ?\) "." reftex-syntax-table)
Here you see that it doesn't touch the syntax for `"' which is used to
delimit string constants. With this setup, `K"onig' seems to `up-list'
like a string `onig' which doesn't end, hence it doesn't work. You can
easily fix this by writing `K\"onig', i.e., escaping the quote and it
works as expected.
But then again, I recommend you let OT1-encoded fonts and \"-constructs
go and try to fix the other issue.
Here the file I tested with:
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\makeatletter
\let\Gobble\@gobble
\makeatother
\begin{document}
\tableofcontents
\section{Könige}
\label{sec:konige}
Könige sind selten.
\section{K"onig}
\label{sec:konige-1}
K"onige sind selten.
\section{K\"onig}
\label{sec:konige-2}
K"onige sind selten.
\section{K"onige\expandafter\Gobble\string"}
\label{sec:konige-3}
K"onige sind selten.
\end{document}
Best, Arash
Reply sent
to
Arash Esbati <arash <at> gnu.org>
:
You have taken responsibility.
(Wed, 31 Oct 2018 21:45:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
pichler <at> ieee.org
:
bug acknowledged by developer.
(Wed, 31 Oct 2018 21:45:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 32442-close <at> debbugs.gnu.org (full text, mbox):
Arash Esbati <arash <at> gnu.org> writes:
> But then again, I recommend you let OT1-encoded fonts and \"-constructs
> go and try to fix the other issue.
There was no response, and I don't consider this a bug, hence I'm
closing it.
Best, Arash
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 29 Nov 2018 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 143 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.