emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Breadcrumbs?


From: Bastien
Subject: Re: [O] Breadcrumbs?
Date: Tue, 25 Sep 2012 02:59:57 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Hi Ken,

Ken Williams <address@hidden> writes:

> Has anyone ever tried implementing a “breadcrumbs”-type feature in
> org-mode?  

What about this?

(defun org-show-olpath ()
  "Show the outline path."
  (interactive)
  (let (p h)
    (save-excursion
      (while (and (setq h (ignore-errors (org-get-heading t t)))
                  (org-up-heading-safe))
        (setq p (concat h "/" p)))
      (setq p (concat (org-get-heading t t) "/" p)))
    p))

(add-hook 'org-mode-hook
          (lambda() (add-to-list 'mode-line-format
                                 '(:eval (org-show-olpath)) t)))

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]