Browse Source

Unhide locations visited by saveplace.el

Carsten Dominik 16 years ago
parent
commit
3a9dc0c5ea
2 changed files with 9 additions and 0 deletions
  1. 3 0
      lisp/ChangeLog
  2. 6 0
      lisp/org.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-10-27  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org.el ("saveplace"): If saveplace puts point into an invisible
+	location, make it visible.
+
 	* org-publish.el (org-publish-get-base-files-1): Deal correctly
 	with broken symlinks
 

+ 6 - 0
lisp/org.el

@@ -14257,6 +14257,12 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
        "Make the position visible."
        (org-bookmark-jump-unhide))))
 
+;; Make sure saveplace show the location if it was hidden
+(eval-after-load "saveplace"
+  '(defadvice save-place-find-file-hook (after org-make-visible activate)
+     "Make the position visible."
+     (org-bookmark-jump-unhide)))
+
 (defun org-bookmark-jump-unhide ()
   "Unhide the current position, to show the bookmark location."
   (and (org-mode-p)