浏览代码

Show context after ECB jumps to a location in Org-mode

Patch by Eric Fraga
Carsten Dominik 15 年之前
父节点
当前提交
b16a086460
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 1 0
      lisp/ChangeLog
  2. 9 2
      lisp/org.el

+ 1 - 0
lisp/ChangeLog

@@ -2,6 +2,7 @@
 
 	* org.el (org-file-tags): Fix docstring.
 	(org-get-buffer-tags): Add the #+FILETAGS tags.
+	("ecb"): Maks ecb show context after jumping into an Org file.
 
 2009-10-20  John Wiegley  <johnw@newartisans.com>
 

+ 9 - 2
lisp/org.el

@@ -17325,7 +17325,7 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
        (flyspell-delete-region-overlays beg end))
   (add-text-properties beg end '(org-no-flyspell t)))
 
-;; Make `bookmark-jump' show the jump location if it was hidden.
+;; Make `bookmark-jump' shows the jump location if it was hidden.
 (eval-after-load "bookmark"
   '(if (boundp 'bookmark-after-jump-hook)
        ;; We can use the hook
@@ -17335,12 +17335,19 @@ 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
+;; Make sure saveplace shows 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)))
 
+;; Make sure ecb shows the location if it was hidden
+(eval-after-load "ecb"
+  '(defadvice ecb-method-clicked (after esf/org-show-context)
+     "Make hierarchy visible when jumping into location from ECB tree buffer."
+     (if (eq major-mode 'org-mode)
+	 (org-show-context))))
+
 (defun org-bookmark-jump-unhide ()
   "Unhide the current position, to show the bookmark location."
   (and (org-mode-p)