[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] Make the point visible when jumping to the mark
From: |
Ian Kelling |
Subject: |
[O] [PATCH] Make the point visible when jumping to the mark |
Date: |
Wed, 30 Apr 2014 21:54:08 -0700 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.4.50 (gnu/linux) |
>From 9191e4a364e251119cf8b7c72e41f6c0d09583f2 Mon Sep 17 00:00:00 2001
Message-ID: <address@hidden>
MIME-Version: 1.0
Content-Type: text/plain
*lisp/org.el: Advise commands which jump to the mark
---
There are several non-org commands that jump to a location and would be
unwieldy if the location remained hidden, (isearch, bookmark-jump,
save-place), but org-mode has code to fix them. In this patch, I
followed their example.
I have an emacs fsf copyright assignment completed & on file with fsf, I can
send gpg signed copy if you need it.
- Ian Kelling
lisp/org.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 44a4e44..9365059 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -24326,6 +24326,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."
+ (when (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.7.10.4
- [O] [PATCH] Make the point visible when jumping to the mark,
Ian Kelling <=