GNU bug report logs -
#33940
27.0.50; ?\^c syntax confuses scanning
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33940 in the body.
You can then email your comments to 33940 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Tue, 01 Jan 2019 02:59:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Michael Heerdegen <michael_heerdegen <at> web.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 01 Jan 2019 02:59:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
in 20b858ef13f8f71fae6cbce5cdac31c4dd130600 "Prefer \... to control
chars in .el literals" woman.el has been changed to contain reader
syntaxes like "?\^]" - which apparently confuses `scan-sexps', e.g.
(scan-sexps (point-min) (point-max))
|- (scan-error "Containing expression ends prematurely" 81997 81998)
Obviously `scan-sexps' doesn't handle this kind of syntax correctly.
This confuses paren highlighting, by-sexp and by-list movement, prevents
enabling paredit mode, and such unpleasant things.
(CC'ing the author of the commit, Paul Eggert)
Thanks and regards,
Michael.
In GNU Emacs 27.0.50 (build 22, x86_64-pc-linux-gnu, GTK+ Version 3.24.2)
of 2018-12-31 built on drachen
Repository revision: 174d64d4cefb3c49e260a2eb3d9015b0f092f922
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Tue, 01 Jan 2019 03:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 33940 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen wrote:
> in 20b858ef13f8f71fae6cbce5cdac31c4dd130600 "Prefer \... to control
> chars in .el literals" woman.el has been changed to contain reader
> syntaxes like "?\^]" - which apparently confuses `scan-sexps', e.g.
>
> (scan-sexps (point-min) (point-max))
> |- (scan-error "Containing expression ends prematurely" 81997 81998)
>
> Obviously `scan-sexps' doesn't handle this kind of syntax correctly.
The second argument to scan-sexps is a count, not position, so you might want to
rethink that example.
Anyway, I'm not seeing any problems. I built the emacs-26 branch and ran the
shell command:
src/emacs -Q lisp/woman.el
and then typed:
M-: (scan-sexps (point-min) (point-max)) RET
and it returned nil, which is what I'd expect. Can you reproduce the problem
with a simple, self-contained test case like that?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Tue, 01 Jan 2019 04:13:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 33940 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> The second argument to scan-sexps is a count, not position, so you
> might want to rethink that example.
Indeed, thanks. But let's keep the example for now, since it provokes
the scan error.
> Anyway, I'm not seeing any problems. I built the emacs-26 branch and
> ran the shell command:
>
> src/emacs -Q lisp/woman.el
>
> and then typed:
>
> M-: (scan-sexps (point-min) (point-max)) RET
>
> and it returned nil, which is what I'd expect. Can you reproduce the
> problem with a simple, self-contained test case like that?
Yes, with exactly that recipe, but with emacs built from the master
branch, please. Oh, and happy new year, if you not are still in the old
one.
Thanks,
Michael.
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Tue, 01 Jan 2019 19:43:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Michael Heerdegen <michael_heerdegen <at> web.de>
:
bug acknowledged by developer.
(Tue, 01 Jan 2019 19:43:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 33940-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Michael Heerdegen wrote:
> Yes, with exactly that recipe, but with emacs built from the master
> branch, please. Oh, and happy new year, if you not are still in the old
> one.
The same for you! Thanks for pointing me in the right direction; I installed the
attached patch.
[0001-Fix-woman.el-to-not-confuse-scan-sexps.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Wed, 02 Jan 2019 00:29:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 33940 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> Thanks for pointing me in the right direction; I installed the
> attached patch.
Great, thanks.
BTW, do you know whether the original "?\^]" is considered correct read
syntax? Does the reader only accept it by accident, or should
`scan-sexps' also be able to handle it?
Anyway, probably a corner case that doesn't matter much. Thanks for
your fix,
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Wed, 02 Jan 2019 00:49:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 33940 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen wrote:
> BTW, do you know whether the original "?\^]" is considered correct read
> syntax? Does the reader only accept it by accident, or should
> `scan-sexps' also be able to handle it?
Sorry, I don't know, so I played it safe.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Wed, 02 Jan 2019 09:50:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 33940 <at> debbugs.gnu.org (full text, mbox):
On Jan 02 2019, Michael Heerdegen <michael_heerdegen <at> web.de> wrote:
> BTW, do you know whether the original "?\^]" is considered correct read
> syntax? Does the reader only accept it by accident, or should
> `scan-sexps' also be able to handle it?
It's as valid as `?]', which has the same problem wrt scan-sexps.
That's why prin1-char adds redundant backslashes.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33940
; Package
emacs
.
(Wed, 02 Jan 2019 11:32:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 33940 <at> debbugs.gnu.org (full text, mbox):
Andreas Schwab <schwab <at> linux-m68k.org> writes:
> It's as valid as `?]', which has the same problem wrt scan-sexps.
> That's why prin1-char adds redundant backslashes.
Ok, thanks, so it's nothing new.
Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Jan 2019 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.