* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
@ 2024-06-17 0:31 Siyuan Chen
2024-06-17 6:34 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: Siyuan Chen @ 2024-06-17 0:31 UTC (permalink / raw)
To: 71603
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
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.
I don't know if this is a bug or the intended behavior, but when I put the
mouse on the bk1 or bk2 entry it will show "mouse-1: go to this bookmark in
other window", so I believe it is a bug.
In addition, if you click the entries via Mouse middle click, i.e. mouse-2,
then it seems to half work with a different weird behavior. Simply traced
the code and found that both invoke
`bookmark-bmenu-other-window-with-mouse` but I don't know why they have
different behaviors.
P.s. I can workaround it via hacking bookmark.el because `bookmark-jump`
works perfectly, but I just want to know if this is a real bug.
Thanks.
Best regards,
Siyuan Chen
[-- Attachment #2: Type: text/html, Size: 2330 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
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
2024-06-17 11:58 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-06-17 6:34 UTC (permalink / raw)
To: Siyuan Chen; +Cc: 71603
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
2024-06-17 6:34 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 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
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-06-17 11:58 UTC (permalink / raw)
To: Eshel Yaron; +Cc: chansey97, 71603
> Cc: 71603@debbugs.gnu.org
> Date: Mon, 17 Jun 2024 08:34:29 +0200
> From: Eshel Yaron via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> > 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?
Thanks, I have independently came to the same solution. So please
install this on master, but with a comment explaining why we record
point before calling display-function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
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
0 siblings, 2 replies; 6+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-06-17 15:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: chansey97, 71603
Eli Zaretskii <eliz@gnu.org> writes:
>> Cc: 71603@debbugs.gnu.org
>> Date: Mon, 17 Jun 2024 08:34:29 +0200
>> From: Eshel Yaron via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> > 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?
>
> Thanks, I have independently came to the same solution. So please
> install this on master, but with a comment explaining why we record
> point before calling display-function.
All right, see commit 27f46ba4b96.
Eshel
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
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
1 sibling, 0 replies; 6+ messages in thread
From: Siyuan Chen @ 2024-06-17 18:33 UTC (permalink / raw)
To: Eshel Yaron; +Cc: Eli Zaretskii, 71603
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
> Does the diff below yield
the expected behavior?
Yes. It works perfectly.
Thanks.
Best regards,
Siyuan Chen
On Mon, Jun 17, 2024 at 11:15 PM Eshel Yaron <me@eshelyaron.com> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Cc: 71603@debbugs.gnu.org
> >> Date: Mon, 17 Jun 2024 08:34:29 +0200
> >> From: Eshel Yaron via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >>
> >> > 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?
> >
> > Thanks, I have independently came to the same solution. So please
> > install this on master, but with a comment explaining why we record
> > point before calling display-function.
>
> All right, see commit 27f46ba4b96.
>
>
> Eshel
>
[-- Attachment #2: Type: text/html, Size: 1777 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#71603: Mouse clicking on a list-bookmarks' entry can not jump the cursor
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
1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-06-22 8:55 UTC (permalink / raw)
To: Eshel Yaron; +Cc: chansey97, 71603-done
> From: Eshel Yaron <me@eshelyaron.com>
> Cc: chansey97@gmail.com, 71603@debbugs.gnu.org
> Date: Mon, 17 Jun 2024 17:15:18 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Cc: 71603@debbugs.gnu.org
> >> Date: Mon, 17 Jun 2024 08:34:29 +0200
> >> From: Eshel Yaron via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >>
> >> > 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?
> >
> > Thanks, I have independently came to the same solution. So please
> > install this on master, but with a comment explaining why we record
> > point before calling display-function.
>
> All right, see commit 27f46ba4b96.
Thanks, closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-22 8:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.