unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: 75354@debbugs.gnu.org
Subject: bug#75354: (29.4; eww buffer is not displayed correctly when used from bookmark-jump )
Date: Wed, 08 Jan 2025 07:40:30 +0000	[thread overview]
Message-ID: <87h669vjm9.fsf@posteo.net> (raw)
In-Reply-To: <87zfk6eekc.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 2525 bytes --]


I could fix the problem by modifying bookmark--jump-via:

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 0048330e790..a474bed652e 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1261,28 +1261,29 @@ DISPLAY-FUNCTION is called with the current buffer as argument.
 After calling DISPLAY-FUNCTION, set window point to the point specified
 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)
-  ;; Store `point' now, because `display-function' might change it.
-  (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
-    (let ((overlays (overlays-in (pos-bol) (1+ (pos-bol))))
-          temp found)
-      (while (and (not found) (setq temp (pop overlays)))
-        (when (eq 'bookmark (overlay-get temp 'category))
-          (setq found t)))
-      (unless found
-        (bookmark--set-fringe-mark))))
-  (run-hooks 'bookmark-after-jump-hook)
-  (if bookmark-automatically-show-annotations
+  (let (buf)
+    (save-window-excursion
+      (bookmark-handle-bookmark bookmark-name-or-record)
+      (setq buf (current-buffer)))
+    (let ((point (with-current-buffer buf (point))))
+      (funcall display-function buf)
+      (when-let ((win (get-buffer-window buf 0)))
+        (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
+      (let ((overlays (overlays-in (pos-bol) (1+ (pos-bol))))
+            temp found)
+        (while (and (not found) (setq temp (pop overlays)))
+          (when (eq 'bookmark (overlay-get temp 'category))
+            (setq found t)))
+        (unless found
+          (bookmark--set-fringe-mark))))
+    (run-hooks 'bookmark-after-jump-hook)
+    (when bookmark-automatically-show-annotations
       ;; if there is an annotation for this bookmark,
       ;; show it in a buffer.
-      (bookmark-show-annotation bookmark-name-or-record)))
+      (bookmark-show-annotation bookmark-name-or-record))))
 
 
 ;;;###autoload

-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2025-01-08  7:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04 16:20 bug#75354: 29.4; eww buffer is not displayed correctly when used from bookmark-jump Thierry Volpiatto
2025-01-08  7:40 ` Thierry Volpiatto [this message]
2025-01-08 13:10   ` bug#75354: (29.4; eww buffer is not displayed correctly when used from bookmark-jump ) Eli Zaretskii
2025-01-08 13:52     ` Thierry Volpiatto
2025-01-08 14:03       ` Eli Zaretskii
2025-01-08 14:47         ` Thierry Volpiatto
2025-01-10  5:56         ` Thierry Volpiatto
2025-01-16 16:43           ` Eli Zaretskii
2025-01-16 17:20             ` Thierry Volpiatto
2025-01-15  6:43         ` Thierry Volpiatto
2025-01-15 15:01           ` Eli Zaretskii
2025-01-15 16:15             ` Thierry Volpiatto

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h669vjm9.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=75354@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).