From 066595dd9350f06a1df2e99a341f96782ac8dfed Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 15 Sep 2013 00:32:08 -0700 Subject: [PATCH] Make the point visible when jumping to the mark * lisp/org.el advise `pop-global-mark', `exchange-point-and-mark', and `pop-global-mark' with `org-show-context', as appropriate. TINYCHANGE --- lisp/org.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 8e970a1..30b87d9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -23903,6 +23903,27 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (outline-invisible-p))) (org-show-context 'bookmark-jump))) +(eval-after-load "simple" + '(defadvice set-mark-command (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(eval-after-load "simple" + '(defadvice exchange-point-and-mark (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(eval-after-load "simple" + '(defadvice pop-global-mark (after org-make-visible activate) + "Make the point visible with `org-show-context'." + (org-mark-jump-unhide))) + +(defun org-mark-jump-unhide () + "Make the point visible with `org-show-context' after jumping to the mark." + (and (derived-mode-p 'org-mode) + (outline-invisible-p) + (org-show-context 'mark-goto))) + ;; Make session.el ignore our circular variable (defvar session-globals-exclude) (eval-after-load "session" -- 1.8.3.1