From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Siyuan Chen <chansey97@gmail.com>
Cc: 71603@debbugs.gnu.org
Subject: bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
Date: Mon, 17 Jun 2024 08:34:29 +0200 [thread overview]
Message-ID: <m1tthsw00a.fsf@dazzs-mbp.home> (raw)
In-Reply-To: <CAHWTsYkn_Dvm5GOYVeT3+oBGkcoqj1M6QqeDJNqUzk8EU+QaVA@mail.gmail.com> (Siyuan Chen's message of "Mon, 17 Jun 2024 08:31:02 +0800")
Hi there,
Siyuan Chen <chansey97@gmail.com> writes:
> The reproduce steps:
>
> 1. Open Emacs 29.3 on Windows with -Q
>
> 2. Open a .el file which included some code, e.g. init.el
>
> 3. M-x `bookmark-delete-all` to cleanup bookmarks if you have
>
> 4. M-x `bookmark-set` at some locations, e.g. bk1 bk2
>
> 5. M-x `list-bookmarks` to open *Bookmark List* which should have 2 entries
>
> 6. Split 2 windows, the up window displays init.el, the bottom window displays *Bookmark List*
>
> 7. Mouse left click (or press 'on' ) on bk1 or bk2 in *Bookmark List*
>
> The expected behavior: jump cursor to bk1 or bk2
>
> The actual behavior: nothing happens, except the left fringe displays an additional bookmark icon if your current
> point is not at one of the bookmark locations.
Thanks, I can reproduce this issue on master. Does the diff below yield
the expected behavior?
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 06f8e24b518..d87d4e473ac 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1265,10 +1265,11 @@ bookmark--jump-via
by BOOKMARK-NAME-OR-RECORD, if necessary, run `bookmark-after-jump-hook',
and then show any annotations for this bookmark."
(bookmark-handle-bookmark bookmark-name-or-record)
- (save-current-buffer
- (funcall display-function (current-buffer)))
- (let ((win (get-buffer-window (current-buffer) 0)))
- (if win (set-window-point win (point))))
+ (let ((point (point)))
+ (save-current-buffer
+ (funcall display-function (current-buffer)))
+ (let ((win (get-buffer-window (current-buffer) 0)))
+ (if win (set-window-point win point))))
;; FIXME: we used to only run bookmark-after-jump-hook in
;; `bookmark-jump' itself, but in none of the other commands.
(when bookmark-fringe-mark
next prev parent reply other threads:[~2024-06-17 6:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 0:31 bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor Siyuan Chen
2024-06-17 6:34 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-17 11:58 ` Eli Zaretskii
2024-06-17 15:15 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-17 18:33 ` Siyuan Chen
2024-06-22 8:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1tthsw00a.fsf@dazzs-mbp.home \
--to=bug-gnu-emacs@gnu.org \
--cc=71603@debbugs.gnu.org \
--cc=chansey97@gmail.com \
--cc=me@eshelyaron.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.