From 2129ea6494da529925bb5f05581aa652a7cfb6e0 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 15 Nov 2009 09:59:33 +0100 Subject: [PATCH] Make sure outline path display uses full path, even in a narrowed buffer When a buffer was narrowed, the path was truncated. --- lisp/ChangeLog | 1 + lisp/org.el | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 554da97f3..128d4c665 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2009-11-15 Carsten Dominik * org.el (org-set-effort): Improve prompt. + (org-get-outline-path): Widen to get full path. * org-latex.el (org-export-as-latex): Add the :drawers property. diff --git a/lisp/org.el b/lisp/org.el index 0d6d4d948..feddf0b12 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9006,10 +9006,12 @@ avoiding backtracing." (aset org-olpa level heading))) (let (rtn) (save-excursion - (while (org-up-heading-safe) - (when (looking-at org-complex-heading-regexp) - (push (org-match-string-no-properties 4) rtn))) - rtn)))) + (save-restriction + (widen) + (while (org-up-heading-safe) + (when (looking-at org-complex-heading-regexp) + (push (org-match-string-no-properties 4) rtn))) + rtn))))) (defun org-format-outline-path (path &optional width prefix) "Format the outlie path PATH for display.