GNU bug report logs -
#19504
11.88; [siunitx] unit appears without backslash
Previous Next
Reported by: Uwe Siart <uwe.siart <at> tum.de>
Date: Sun, 4 Jan 2015 11:23:02 UTC
Severity: normal
Tags: confirmed
Found in version 11.88
Done: Mosè Giordano <mose <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 19504 in the body.
You can then email your comments to 19504 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#19504
; Package
auctex
.
(Sun, 04 Jan 2015 11:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Uwe Siart <uwe.siart <at> tum.de>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Sun, 04 Jan 2015 11:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.
Be sure to consult the FAQ section in the manual before submitting
a bug report. In addition check if the bug is reproducable with an
up-to-date version of AUCTeX. So please upgrade to the version
available from http://www.gnu.org/software/auctex/ if your
installation is older than the one available from the web site.
If the bug is triggered by a specific (La)TeX file, you should try
to produce a minimal sample file showing the problem and include it
in your report.
Your bug report will be posted to the AUCTeX bug reporting list.
------------------------------------------------------------------------
When I try to enter an siunitx \SI macro I get the unit without
backslash even if I enter it correctly with a backslash. For instance if
I do
C-c RET SI RET RET 5 RET RET \kHz RET
I get "\SI{5}{kHz}" but I expect "\SI{5}{\kHz}". This happens to every
valid unit macro. It is always the first backslash that gets lost.
Entering "\meter\per\second" results in "meter\per\second".
Regards
Uwe
Emacs : GNU Emacs 24.4.1 (i686-pc-mingw32)
of 2014-10-24 on LEG570
Package: 11.88
current state:
==============
(setq
AUCTeX-date "2014-10-29"
window-system 'w32
LaTeX-version "2e"
TeX-style-path '("c:/programme/emacs/var/auctex"
"c:/Programme/emacs/share/emacs/site-lisp/auctex/style"
"c:/Dokumente und Einstellungen/siart/.emacs.d/auctex/auto"
"c:/Dokumente und Einstellungen/siart/.emacs.d/auctex/style"
"auto" "style")
TeX-auto-save t
TeX-parse-self t
TeX-master t
TeX-command-list '(("TeX" "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil (plain-tex-mode ams-tex-mode texinfo-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"
"%(PDF)amstex %(extraopts) %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX")
("ConTeXt"
"texexec --once --texutil %(extraopts) %(execopts)%t"
TeX-run-TeX nil (context-mode) :help "Run ConTeXt once")
("ConTeXt Full" "texexec %(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-command t t :help
"Generate PostScript file")
("Index" "makeindex %s" TeX-run-command nil t :help
"Create index file")
("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#19504
; Package
auctex
.
(Sun, 04 Jan 2015 11:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19504 <at> debbugs.gnu.org (full text, mbox):
tag 19504 confirmed
thanks
Hi Uwe,
2015-01-04 12:22 GMT+01:00 Uwe Siart <uwe.siart <at> tum.de>:
> When I try to enter an siunitx \SI macro I get the unit without
> backslash even if I enter it correctly with a backslash. For instance if
> I do
>
> C-c RET SI RET RET 5 RET RET \kHz RET
>
> I get "\SI{5}{kHz}" but I expect "\SI{5}{\kHz}". This happens to every
> valid unit macro. It is always the first backslash that gets lost.
> Entering "\meter\per\second" results in "meter\per\second".
Thanks for the report, I can confirm this bug, but it has been
introduced by a recent version of Emacs, I just tested with Emacs
23.3.1 and it works as expected. I cannot remember which version of
Emacs I used when I developed the siunitx style file, probably 24.2 or
24.3. I'll try to find the culprit.
Bye,
Mosè
Added tag(s) confirmed.
Request was from
Mosè Giordano <mose <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Jan 2015 11:43:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Sun, 04 Jan 2015 12:09:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 19504 <at> debbugs.gnu.org (full text, mbox):
2015-01-04 12:41 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
> tag 19504 confirmed
> thanks
>
>
> Hi Uwe,
>
> 2015-01-04 12:22 GMT+01:00 Uwe Siart <uwe.siart <at> tum.de>:
>> When I try to enter an siunitx \SI macro I get the unit without
>> backslash even if I enter it correctly with a backslash. For instance if
>> I do
>>
>> C-c RET SI RET RET 5 RET RET \kHz RET
>>
>> I get "\SI{5}{kHz}" but I expect "\SI{5}{\kHz}". This happens to every
>> valid unit macro. It is always the first backslash that gets lost.
>> Entering "\meter\per\second" results in "meter\per\second".
>
> Thanks for the report, I can confirm this bug, but it has been
> introduced by a recent version of Emacs, I just tested with Emacs
> 23.3.1 and it works as expected. I cannot remember which version of
> Emacs I used when I developed the siunitx style file, probably 24.2 or
> 24.3. I'll try to find the culprit.
For the record, this commit is the culprit:
http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commitdiff;h=9c44569ea2a18099307e0571d523d8637000a153
`LaTeX-arg-siunitx-unit' relies on `completing-read-multiple'
returning also empty strings. This change is not even mentioned in
the Incompatible Lisp Changes section of the NEWS file. For the time
being I don't have a solution, apart from defining
`TeX-completing-read-multiple' as the old version of
`completing-read-multiple', or someone fixing
`completing-read-multiple' upstream, at least making trimming
optional.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Mon, 09 Mar 2015 17:57:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 19504 <at> debbugs.gnu.org (full text, mbox):
> returning also empty strings. This change is not even mentioned in
> the Incompatible Lisp Changes section of the NEWS file.
Lots of changes aren't mentioned. Only the ones that we expect to be
noticed are mentioned.
> For the time being I don't have a solution, apart from defining
> `TeX-completing-read-multiple' as the old version of
> `completing-read-multiple', or someone fixing
> `completing-read-multiple' upstream, at least making
> trimming optional.
IIUC you always need a leading \, so you could simply always add
a leading backslash if one is missing.
Of course, I'm not sure that IUC.
> Would it be possible to make trimming optional (off by default), using
> an optional argument?
I'd rather we don't go down that path.
> In AUCTeX we support all Emacs versions starting from 21, so a new
> mandatory argument wouldn't be a good idea for us.
FWIW, this code only works as intended in Emacs>=22 (since crm-separator
didn't exist in Emacs-21).
Stefan
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Mon, 09 Mar 2015 20:27:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 19504 <at> debbugs.gnu.org (full text, mbox):
Hi Stefan,
2015-03-09 18:56 GMT+01:00 Stefan Monnier <monnier <at> iro.umontreal.ca>:
>> returning also empty strings. This change is not even mentioned in
>> the Incompatible Lisp Changes section of the NEWS file.
>
> Lots of changes aren't mentioned. Only the ones that we expect to be
> noticed are mentioned.
Well, this was noticed too ;-)
>> For the time being I don't have a solution, apart from defining
>> `TeX-completing-read-multiple' as the old version of
>> `completing-read-multiple', or someone fixing
>> `completing-read-multiple' upstream, at least making
>> trimming optional.
>
> IIUC you always need a leading \, so you could simply always add
> a leading backslash if one is missing.
> Of course, I'm not sure that IUC.
Unfortunately no, one can also insert the unit without using macros,
so we can't always add the leading backslash
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Wed, 11 Mar 2015 15:28:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 19504 <at> debbugs.gnu.org (full text, mbox):
> Unfortunately no, one can also insert the unit without using macros,
> so we can't always add the leading backslash
So the user could enter "\second \per meter"?
I'm getting the feeling that completing-read-multiple is just not the
right tool for the job. Could it be that what you want instead is to
have (in the minibuffer) completion that doesn't apply to the whole
minibuffer (but that is instead more like in-buffer completion).
So you'd want a `read-string' where you setup
completion-at-point-functions inside the minibuffer and where you bind
TAB to `completion-at-point'.
Stefan
PS: The plan is actually to move the minibuffer completion in that
direction for normal minibuffer completion, so that TAB is bound to
completion-at-point in the minibuffer as well.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Wed, 11 Mar 2015 22:01:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 19504 <at> debbugs.gnu.org (full text, mbox):
2015-03-11 16:27 GMT+01:00 Stefan Monnier <monnier <at> iro.umontreal.ca>:
>> Unfortunately no, one can also insert the unit without using macros,
>> so we can't always add the leading backslash
>
> So the user could enter "\second \per meter"?
Yes, something like that: you can enter units using macros (e.g.
"\second\per\metre") but also literally (e.g. "s/m"). The package is
useful because at least adjusts the spacing between the value and the
unit.
> I'm getting the feeling that completing-read-multiple is just not the
> right tool for the job. Could it be that what you want instead is to
> have (in the minibuffer) completion that doesn't apply to the whole
> minibuffer (but that is instead more like in-buffer completion).
>
> So you'd want a `read-string' where you setup
> completion-at-point-functions inside the minibuffer and where you bind
> TAB to `completion-at-point'.
>
>
>
> Stefan
>
>
> PS: The plan is actually to move the minibuffer completion in that
> direction for normal minibuffer completion, so that TAB is bound to
> completion-at-point in the minibuffer as well.
Uh, thanks for the suggestion, but according to git blame
`completion-at-point' exists since 2009, so Emacs <23 is left out.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Thu, 12 Mar 2015 08:52:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 19504 <at> debbugs.gnu.org (full text, mbox):
Mosè Giordano <mose <at> gnu.org> writes:
>> PS: The plan is actually to move the minibuffer completion in that
>> direction for normal minibuffer completion, so that TAB is bound to
>> completion-at-point in the minibuffer as well.
>
> Uh, thanks for the suggestion, but according to git blame
> `completion-at-point' exists since 2009, so Emacs <23 is left out.
Sorry, I didn't follow this issue closely. But isn't it the case that
some quite recent change in Emacs is the culprit? In that case,
`TeX-completing-read-multiple' could have 3 versions instead of the
current two (one for Emacs, one for XEmacs), i.e., one for Emacs <= 22,
one for Emacs 23+, and one for XEmacs.
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Thu, 12 Mar 2015 22:07:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 19504 <at> debbugs.gnu.org (full text, mbox):
Hi Tassilo,
2015-03-12 9:51 GMT+01:00 Tassilo Horn <tsdh <at> gnu.org>:
> Mosè Giordano <mose <at> gnu.org> writes:
>
>>> PS: The plan is actually to move the minibuffer completion in that
>>> direction for normal minibuffer completion, so that TAB is bound to
>>> completion-at-point in the minibuffer as well.
>>
>> Uh, thanks for the suggestion, but according to git blame
>> `completion-at-point' exists since 2009, so Emacs <23 is left out.
>
> Sorry, I didn't follow this issue closely. But isn't it the case that
> some quite recent change in Emacs is the culprit?
Yes, with this commit
http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commitdiff;h=9c44569ea2a18099307e0571d523d8637000a153
`completing-read-multiple' ignores empty strings, which was essential
for completion of `siunitx' units.
> In that case,
> `TeX-completing-read-multiple' could have 3 versions instead of the
> current two (one for Emacs, one for XEmacs), i.e., one for Emacs <= 22,
> one for Emacs 23+, and one for XEmacs.
As I said some messages ago, the best I can think is to copy the last
Emacs implementation before the mentioned commit (making sure return
value for empty input is always nil) for all Emacs versions, so we
should be able to keep the number of versions of
`TeX-completing-read-multiple' as low as two. The problem will be of
course some more work on our side to maintain the function, if needed.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#19504
; Package
auctex
.
(Tue, 14 Apr 2015 21:18:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 19504 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
here is my take to fix the bug: there are three different versions of
`TeX-completing-read-multiple' as suggested by Tassilo. I'm just not
sure it works with all 24.* versions of Emacs. A serious problem is
that there are a couple of internal functions (crm--*), and we had
problems in the past with internal functions,[1] for which we still
get bug reports nowadays.
Actually, the change by Roland Winkler which caused this bug is the
same which forced us to make `TeX-completing-read-multiple' always
return nil,[2] so perhaps we could also revert that change, but in
this way we would break backward compatibility in turn.
Bye,
Mosè
Note:
[1] http://comments.gmane.org/gmane.emacs.aquamacs.devel/240
[2] http://comments.gmane.org/gmane.emacs.auctex.devel/3375
2015-03-12 23:05 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
> Hi Tassilo,
>
> 2015-03-12 9:51 GMT+01:00 Tassilo Horn <tsdh <at> gnu.org>:
>> Mosè Giordano <mose <at> gnu.org> writes:
>>
>>>> PS: The plan is actually to move the minibuffer completion in that
>>>> direction for normal minibuffer completion, so that TAB is bound to
>>>> completion-at-point in the minibuffer as well.
>>>
>>> Uh, thanks for the suggestion, but according to git blame
>>> `completion-at-point' exists since 2009, so Emacs <23 is left out.
>>
>> Sorry, I didn't follow this issue closely. But isn't it the case that
>> some quite recent change in Emacs is the culprit?
>
> Yes, with this commit
> http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commitdiff;h=9c44569ea2a18099307e0571d523d8637000a153
> `completing-read-multiple' ignores empty strings, which was essential
> for completion of `siunitx' units.
>
>> In that case,
>> `TeX-completing-read-multiple' could have 3 versions instead of the
>> current two (one for Emacs, one for XEmacs), i.e., one for Emacs <= 22,
>> one for Emacs 23+, and one for XEmacs.
>
> As I said some messages ago, the best I can think is to copy the last
> Emacs implementation before the mentioned commit (making sure return
> value for empty input is always nil) for all Emacs versions, so we
> should be able to keep the number of versions of
> `TeX-completing-read-multiple' as low as two. The problem will be of
> course some more work on our side to maintain the function, if needed.
>
> Bye,
> Mosè
[tex-crm.patch (text/x-diff, attachment)]
Reply sent
to
Mosè Giordano <mose <at> gnu.org>
:
You have taken responsibility.
(Sun, 18 Oct 2015 21:19:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Uwe Siart <uwe.siart <at> tum.de>
:
bug acknowledged by developer.
(Sun, 18 Oct 2015 21:19:03 GMT)
Full text and
rfc822 format available.
Message #39 received at 19504-done <at> debbugs.gnu.org (full text, mbox):
Hi all,
this bug should be fixed now.
Bye,
Mosè
2015-04-14 23:16 GMT+02:00 Mosè Giordano <mose <at> gnu.org>:
> Hello,
>
> here is my take to fix the bug: there are three different versions of
> `TeX-completing-read-multiple' as suggested by Tassilo. I'm just not
> sure it works with all 24.* versions of Emacs. A serious problem is
> that there are a couple of internal functions (crm--*), and we had
> problems in the past with internal functions,[1] for which we still
> get bug reports nowadays.
>
> Actually, the change by Roland Winkler which caused this bug is the
> same which forced us to make `TeX-completing-read-multiple' always
> return nil,[2] so perhaps we could also revert that change, but in
> this way we would break backward compatibility in turn.
>
> Bye,
> Mosè
>
> Note:
>
> [1] http://comments.gmane.org/gmane.emacs.aquamacs.devel/240
> [2] http://comments.gmane.org/gmane.emacs.auctex.devel/3375
>
> 2015-03-12 23:05 GMT+01:00 Mosè Giordano <mose <at> gnu.org>:
>> Hi Tassilo,
>>
>> 2015-03-12 9:51 GMT+01:00 Tassilo Horn <tsdh <at> gnu.org>:
>>> Mosè Giordano <mose <at> gnu.org> writes:
>>>
>>>>> PS: The plan is actually to move the minibuffer completion in that
>>>>> direction for normal minibuffer completion, so that TAB is bound to
>>>>> completion-at-point in the minibuffer as well.
>>>>
>>>> Uh, thanks for the suggestion, but according to git blame
>>>> `completion-at-point' exists since 2009, so Emacs <23 is left out.
>>>
>>> Sorry, I didn't follow this issue closely. But isn't it the case that
>>> some quite recent change in Emacs is the culprit?
>>
>> Yes, with this commit
>> http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=commitdiff;h=9c44569ea2a18099307e0571d523d8637000a153
>> `completing-read-multiple' ignores empty strings, which was essential
>> for completion of `siunitx' units.
>>
>>> In that case,
>>> `TeX-completing-read-multiple' could have 3 versions instead of the
>>> current two (one for Emacs, one for XEmacs), i.e., one for Emacs <= 22,
>>> one for Emacs 23+, and one for XEmacs.
>>
>> As I said some messages ago, the best I can think is to copy the last
>> Emacs implementation before the mentioned commit (making sure return
>> value for empty input is always nil) for all Emacs versions, so we
>> should be able to keep the number of versions of
>> `TeX-completing-read-multiple' as low as two. The problem will be of
>> course some more work on our side to maintain the function, if needed.
>>
>> Bye,
>> Mosè
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 16 Nov 2015 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.