Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook org-bookmark-heading-after-jump-hook is not always executed #30

Closed
schwurg opened this issue Jun 19, 2024 · 1 comment
Closed

Hook org-bookmark-heading-after-jump-hook is not always executed #30

schwurg opened this issue Jun 19, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@schwurg
Copy link

schwurg commented Jun 19, 2024

Dear Adam,

I just realized that the org-bookmark-heading-after-jump-hook is only executed in case the bookmark jumps to an indirect buffer. For normal jumps, the hook is not executed.

Looking at the code, I think the following patch should fix it:

diff --git a/org-bookmark-heading.el b/org-bookmark-heading.el
index 0c0b431..b04af0d 100644
--- a/org-bookmark-heading.el
+++ b/org-bookmark-heading.el
@@ -229,8 +229,8 @@ supported, in which case it should be an entry ID)."
             ;; non-indirect buffer at the bottom of the prev-buffers list
             ;; so it won't be selected when the indirect buffer is killed.
             (set-window-prev-buffers nil (append (cdr (window-prev-buffers))
-                                                 (list (car (window-prev-buffers))))))
-          (run-hooks 'org-bookmark-heading-after-jump-hook))
+                                                 (list (car (window-prev-buffers)))))))
+        (run-hooks 'org-bookmark-heading-after-jump-hook)
         (unless (equal (file-truename (or (buffer-file-name (buffer-base-buffer))
                                           (buffer-file-name)))
                        (file-truename filename))

(The patch is against git version ed8b7fe)

Best regards,
Tim.

(And thanks again for this package. I am using it each day!)

@alphapapa
Copy link
Owner

Hi Tim,

Thanks for the report. Of course, I forgot to put the "Fixes" metadata in the commit message, but this is now fixed in 719777c, which is released as v1.3.2 and now on master as well.

Thanks for the kind words. Glad that it's useful!

Adam

@alphapapa alphapapa self-assigned this Jun 22, 2024
@alphapapa alphapapa added the bug label Jun 22, 2024
@alphapapa alphapapa added this to the v1.3.2 milestone Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants