Subject: Re: bug#19504: 11.88; [siunitx] unit appears without backslash

From: Mosè Giordano <[email-masked]>
Date: Sun, 4 Jan 2015 13:08:00 +0100

2015-01-04 12:41 GMT+01:00 Mosè Giordano <[email-masked]>:
> tag 19504 confirmed
> thanks
>
>
> Hi Uwe,
>
> 2015-01-04 12:22 GMT+01:00 Uwe Siart <[email-masked]>:
>> 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è