GNU bug report logs - #42799
12.2.0; reftex?: R2L, Hebrew: automatically labeling does not work for sections

Previous Next

Package: auctex;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Mon, 10 Aug 2020 12:28:01 UTC

Severity: normal

Tags: notabug

Found in version 12.2.0

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 42799 in the body.
You can then email your comments to 42799 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#42799; Package auctex. (Mon, 10 Aug 2020 12:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Brauer <oub <at> mat.ucm.es>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Mon, 10 Aug 2020 12:28:01 GMT) Full text and rfc822 format available.

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

From: Uwe Brauer <oub <at> mat.ucm.es>
To: bug-auctex <at> gnu.org
Subject: 12.2.0; reftex?: R2L, Hebrew: automatically labeling does not work
 for sections
Date: Mon, 10 Aug 2020 14:27:08 +0200
Hi

I am not sure whether this is more of a reftex bug. It is my
understanding that even then, sending a Auctex bug is maybe correct if
not tell me and I will resend the bug report to the GNU emacs bug mailing list.


My refetex setting is as follows:

(setq reftex-extra-bindings t)		;must be before (require 'reftex) otherwise it does not work
(require 'reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
;;  plug it into auctex
(setq reftex-plug-into-AUCTeX t)
(setq reftex-initialize-temporary-buffers t)

Steps to reproduce, see the following file:
,----
| 
| \documentclass[12pt]{article}
| \usepackage{fontspec}
| \setmainfont[Script=Hebrew]{Simple CLM}
| \usepackage{bidi}
| \begin{document}
| \section{Introduction}
| \label{sec:introduction}
| \setRL 
| 
| \end{document}
| 
| %%% Local Variables:
| %%% mode: latex
| %%% TeX-engine: xetex
| %%% End:
`----

Running LaTeX-section before \setRL and writing Introduction inserts
 \section{Introduction}
 \label{sec:introduction}

Doing the same after \setRL

LaTeX-section
now inserting the hebrew word mavo מבוא either by turning in the
X-window environment globally a hebrew keyboard, or much better, running 
(set-input-method "hebrew" t) 
in the minibuffer or 
  (set-input-method "hebrew-phonetic-qwerty" t)

And then typing the word מאוא
results in 

\section{מבוא}
\label{sec:}

But is should be 

\section{מבוא}
\label{sec:מבוא}

Regards

Uwe Brauer 

==============
(setq
 AUCTeX-date "2019-10-31"
 window-system 'x
 LaTeX-version "2e"
 TeX-style-path '("/home/oub/emacs/site-lisp/packages/auctex-git/auctex/style" "auto" "style")
 TeX-auto-save t
 TeX-parse-self t
 TeX-master t
 TeX-command-list '(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil
                     (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run plain TeX")
                    ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX")
                    ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output")
                    ("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil (texinfo-mode) :help
                     "Run Makeinfo with HTML output")
                    ("AmSTeX" "amstex %(PDFout) %(extraopts) %`%S%(mode)%' %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
                    ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help
                     "Run ConTeXt once")
                    ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help
                     "Run ConTeXt until completion")
                    ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber")
                    ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file")
                    ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible TeX-queue-command)
                    ("File" "%(o?)dvips %d -o %f " TeX-run-dvips t t :help "Generate PostScript file")
                    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help "Convert DVI file to PostScript")
                    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help "Convert DVI file to PDF with dvipdfmx")
                    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help "Convert PostScript file to PDF")
                    ("Index" "makeindex %s" TeX-run-index nil t :help "Run makeindex to create index file")
                    ("makegloss" "makeindex %s.nlo -s nomencl.ist -o %s.nls" TeX-run-command t t)
                    ("pandoclatex2odt"
                     "/home/oub/.cabal/bin/pandoc -s -R -f latex --toc %s.tex --reference-odt=/home/oub/ALLES/Templates/preferences.odt -t odt -o %O" TeX-run-command t t)
                    ("pandoclatex2docx"
                     "/home/oub/.cabal/bin/pandoc -s -R -f latex  %s.tex --reference-docx=/home/oub/ALLES/Templates/preferences.docx -t docx -o %D" TeX-run-command t t)
                    ("" "" TeX-run-command nil t) ("oolatex" "/usr/share/tex4ht/oolatex %t" TeX-run-command t t)
                    ("Xindy" "texindy %s" TeX-run-command nil t :help "Run xindy to create index file")
                    ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness")
                    ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for common mistakes")
                    ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document")
                    ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files")
                    ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help "Delete generated intermediate and output files")
                    ("Other" "" TeX-run-command t t :help "Run an arbitrary command"))
 )




Information forwarded to bug-auctex <at> gnu.org:
bug#42799; Package auctex. (Mon, 10 Aug 2020 19:59:01 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 42799 <at> debbugs.gnu.org
Subject: Re: bug#42799: 12.2.0; reftex?: R2L, Hebrew: automatically labeling
 does not work for sections
Date: Mon, 10 Aug 2020 21:56:54 +0200
Hi Uwe,

Uwe Brauer <oub <at> mat.ucm.es> writes:

> I am not sure whether this is more of a reftex bug. It is my
> understanding that even then, sending a Auctex bug is maybe correct if
> not tell me and I will resend the bug report to the GNU emacs bug mailing list.
> [...]
>
> Running LaTeX-section before \setRL and writing Introduction inserts
>  \section{Introduction}
>  \label{sec:introduction}
>
> Doing the same after \setRL
>
> LaTeX-section
> now inserting the hebrew word mavo מבוא either by turning in the
> X-window environment globally a hebrew keyboard, or much better, running 
> (set-input-method "hebrew" t) 
> in the minibuffer or 
>   (set-input-method "hebrew-phonetic-qwerty" t)
>
> And then typing the word מאוא
> results in 
>
> \section{מבוא}
> \label{sec:}
>
> But is should be 
>
> \section{מבוא}
> \label{sec:מבוא}

I don't think this is a bug in RefTeX, more a documented feature.
Looking at the manual, it says[1]:

    3.1 Creating Labels
    [...]
    1. A label can be derived from context. This means, RefTeX takes the
       context of the label definition and constructs a label from
       that\footnote{Note that the context may contain constructs which
       are invalid in labels. RefTeX will therefore strip the accent
       from accented Latin-1 characters and remove everything else which
       is not valid in labels. This mechanism is safe, but may not be
       satisfactory for non-western languages. Check the following
       variables if you need to change things:
       reftex-translate-to-ascii-function,
       reftex-derive-label-parameters, reftex-label-illegal-re,
       reftex-abbrev-parameters.[2]}

Not heavily tested but it should be sufficient to tweak
`reftex-label-illegal-re', maybe something like this:

    (setq reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.א-ת]")

Want to give it a roll?

Best, Arash

Footnotes:
[1]  https://www.gnu.org/software/auctex/manual/reftex.html#SEC12

[2]  https://www.gnu.org/software/auctex/manual/reftex.html#FOOT1





Information forwarded to bug-auctex <at> gnu.org:
bug#42799; Package auctex. (Mon, 10 Aug 2020 20:15:02 GMT) Full text and rfc822 format available.

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

From: Uwe Brauer <oub <at> mat.ucm.es>
To: Arash Esbati <arash <at> gnu.org>
Cc: Uwe Brauer <oub <at> mat.ucm.es>, 42799 <at> debbugs.gnu.org
Subject: Re: bug#42799: 12.2.0; reftex?: R2L, Hebrew: automatically labeling
 does not work for sections
Date: Mon, 10 Aug 2020 22:14:19 +0200
[Message part 1 (text/plain, inline)]
>>> "AE" == Arash Esbati <arash <at> gnu.org> writes:

Hi Arash


> Hi Uwe,
> Uwe Brauer <oub <at> mat.ucm.es> writes:

First my apologies for not having read carefully enough the
documentation :-[

>     (setq reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.א-ת]")

> Want to give it a roll?

Oh yes, it works like charm, you are a magician, thanks again

Uwe 
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#42799; Package auctex. (Mon, 10 Aug 2020 20:32:01 GMT) Full text and rfc822 format available.

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

From: Arash Esbati <arash <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: 42799 <at> debbugs.gnu.org
Subject: Re: bug#42799: 12.2.0; reftex?: R2L, Hebrew: automatically labeling
 does not work for sections
Date: Mon, 10 Aug 2020 22:27:55 +0200
Uwe Brauer <oub <at> mat.ucm.es> writes:

>>>> "AE" == Arash Esbati <arash <at> gnu.org> writes:
>
> First my apologies for not having read carefully enough the
> documentation :-[

No problem, it was in the footnote and hard to find ;)

>>     (setq reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.א-ת]")
>
>> Want to give it a roll?
>
> Oh yes, it works like charm, you are a magician, thanks again

Good to hear that.  I'd say I was more lucky to find the correct Hebrew
letters :)  I'm closing this report then.

Best, Arash




bug closed, send any further explanations to 42799 <at> debbugs.gnu.org and Uwe Brauer <oub <at> mat.ucm.es> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 10 Aug 2020 20:32:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 10 Aug 2020 20:32:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 4 years and 283 days ago.

Previous Next


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