GNU bug report logs -
#61998
29.0.60; `treesit-simple-indent-presets' `prev-line' has incorrect position
Previous Next
Reported by: Troy Brown <brownts <at> troybrown.dev>
Date: Mon, 6 Mar 2023 07:52:03 UTC
Severity: normal
Found in version 29.0.60
Done: Yuan Fu <casouri <at> gmail.com>
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 61998 in the body.
You can then email your comments to 61998 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#61998
; Package
emacs
.
(Mon, 06 Mar 2023 07:52:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Troy Brown <brownts <at> troybrown.dev>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 06 Mar 2023 07:52:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm expecting `prev-line' to return the position of the first non-space
character on the previous line. However, it instead returns the number
of characters skipped on the previous line to move to the first
non-space character (i.e., the result of calling `skip-chars-foward').
It appears there is a missing call to `point' that should appear at the
end of the defined lambda.
(cons 'prev-line (lambda (_n _p bol &rest _)
(save-excursion
(goto-char bol)
(forward-line -1)
- (skip-chars-forward " \t"))))
+ (skip-chars-forward " \t")
+ (point))))
Reply sent
to
Yuan Fu <casouri <at> gmail.com>
:
You have taken responsibility.
(Wed, 08 Mar 2023 00:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Troy Brown <brownts <at> troybrown.dev>
:
bug acknowledged by developer.
(Wed, 08 Mar 2023 00:29:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 61998-done <at> debbugs.gnu.org (full text, mbox):
Troy Brown <brownts <at> troybrown.dev> writes:
> I'm expecting `prev-line' to return the position of the first non-space
> character on the previous line. However, it instead returns the number
> of characters skipped on the previous line to move to the first
> non-space character (i.e., the result of calling `skip-chars-foward').
>
> It appears there is a missing call to `point' that should appear at the
> end of the defined lambda.
>
> (cons 'prev-line (lambda (_n _p bol &rest _)
> (save-excursion
> (goto-char bol)
> (forward-line -1)
> - (skip-chars-forward " \t"))))
> + (skip-chars-forward " \t")
> + (point))))
Thanks for the catch! I fixed it on emacs-29.
Yuan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 05 Apr 2023 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.