GNU bug report logs -
#31948
26.1; smie-indent-forward-token forward-sexp in strings
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Sat, 23 Jun 2018 13:23:02 UTC
Severity: minor
Found in version 26.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.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 31948 in the body.
You can then email your comments to 31948 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#31948
; Package
emacs
.
(Sat, 23 Jun 2018 13:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Liu <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Sat, 23 Jun 2018 13:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
smie-indent-forward-token appears unpredictable because sometimes it
errs with (scan-error "Unbalanced parentheses" 32 33) sometimes not.
I dug a bit deeper and found the following behaviour that might be
questionable.
For example, in a ruby-mode buffer with the following content, place
point inside the first "", and M-: (smie-indent-forward-token). Point
moves to the subsequent "" no matter how far away the second "" is.
-------- buffer content --------
"",
beg do
end
abc,
abc,
abc,
""
--------------------------------
Is this a bug?
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31948
; Package
emacs
.
(Sat, 23 Jun 2018 18:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 31948 <at> debbugs.gnu.org (full text, mbox):
> For example, in a ruby-mode buffer with the following content, place
> point inside the first "", and M-: (smie-indent-forward-token). Point
> moves to the subsequent "" no matter how far away the second "" is.
>
> -------- buffer content --------
> "",
> beg do
> end
> abc,
> abc,
> abc,
> ""
> --------------------------------
>
> Is this a bug?
It doesn't look like a bug, in the sense that smie-indent-forward-token
should be able to assume it's called from a position outside of
a string/comment.
IOW I'd tend to put the blame on the code that calls this function.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31948
; Package
emacs
.
(Sun, 24 Jun 2018 08:24:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 31948 <at> debbugs.gnu.org (full text, mbox):
On 2018-06-23 14:15 -0400, Stefan Monnier wrote:
> It doesn't look like a bug, in the sense that smie-indent-forward-token
> should be able to assume it's called from a position outside of
> a string/comment.
>
> IOW I'd tend to put the blame on the code that calls this function.
I remember reading something along these lines but cannot find it. Is
this documented somewhere? If not should it be documented?
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31948
; Package
emacs
.
(Sun, 24 Jun 2018 13:40:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 31948 <at> debbugs.gnu.org (full text, mbox):
>> It doesn't look like a bug, in the sense that smie-indent-forward-token
>> should be able to assume it's called from a position outside of
>> a string/comment.
>> IOW I'd tend to put the blame on the code that calls this function.
> I remember reading something along these lines but cannot find it.
I don't think it's clearly documented.
> If not should it be documented?
You could try and clarify that the starting point is expected to be
*between* tokens (tho that could also be interpreted to include being
in the middle of a comment).
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#31948
; Package
emacs
.
(Thu, 12 Aug 2021 13:41:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 31948 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>> If not should it be documented?
>
> You could try and clarify that the starting point is expected to be
> *between* tokens (tho that could also be interpreted to include being
> in the middle of a comment).
I've now basically copied that sentence to the doc string in Emacs 28,
and I'm therefore closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
31948 <at> debbugs.gnu.org and Leo Liu <sdl.web <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 12 Aug 2021 13:41: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
.
(Fri, 10 Sep 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.