GNU bug report logs - #66218
29.1.50; `beginning-of-defun' jumps to wrong position in `emacs-lisp-mode'

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Tue, 26 Sep 2023 19:42:01 UTC

Severity: normal

Tags: patch

Merged with 60768

Found in versions 29.1.50, 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #30 received at 66218 <at> debbugs.gnu.org (full text, mbox):

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66218 <at> debbugs.gnu.org
Subject: Re: bug#66218: 29.1.50; `beginning-of-defun' jumps to wrong
 position in `emacs-lisp-mode'
Date: Sat, 07 Oct 2023 17:47:19 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>
>> Date: Fri, 06 Oct 2023 21:26:24 +0200
>
> I'm afraid I cannot reproduce the original problem using the current
> emacs-29 branch.  Typing C-M-a from buffer position 70719 in shr.el
> from emacs-29 lands me at the beginning of shr-table-body, as
> expected.

Thanks for looking into this, but it still reproduces for me.

It is important to execute the reproducer *without* actually getting the
file to the glass, so hitting C-M-a in the file itself would not show
the issue.  Please try exactly like described below, starting off the
root of the development directory:

------------------------- snip -------------------------
[emacs-29]$ pwd
/home/jschmidt/work/emacs-29
[emacs-29]$ ls -al README
-rw-r--r-- 1 jschmidt jschmidt 6125 Aug  1 00:06 README
[emacs-29]$ git rev-parse HEAD
8f23a02a9ea1fbc4213cae5664dcb9bf6b5205f6
[emacs-29]$ make -j8
make actual-all || make advice-on-failure make-target=all exit-status=$?
make[1]: Entering directory '/home/jschmidt/work/emacs-29'
[...]
make[1]: Leaving directory '/home/jschmidt/work/emacs-29'
[emacs-29]$ ./src/emacs -Q
------------------------- snip -------------------------

Paste the following form into the scratch buffer with C-y:

------------------------- snip -------------------------
(progn
  (with-current-buffer
      (find-file-noselect "lisp/net/shr.el")
    (goto-char 70719)
    (beginning-of-defun)
    ;; point should be at BOF of `shr-table-body', but is in fact
    ;; somewhere near a Unicode character name
    (pop-to-buffer (current-buffer))))
------------------------- snip -------------------------

And immediately after that hit C-x C-e.  It lands me to the position
denoted by "^" (point=68645 of 91908):

------------------------- snip -------------------------
[...]
(defun shr-tag-bdi (dom)
  (insert ?\N{FIRST STRONG ISOLATE})
  (shr-generic dom)
^  (insert ?\N{POP DIRECTIONAL ISOLATE}))

[...]
------------------------- snip -------------------------

If that doesn't help, I can try setting up a reproducer running in batch
mode.




This bug report was last modified 1 year and 218 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.