[Top][All Lists]

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

Re: [O] Breadcrumbs?

From: Ken Williams
Subject: Re: [O] Breadcrumbs?
Date: Tue, 25 Sep 2012 12:44:23 -0500

Very nice, thanks.  I like to see the top-level heading too, so I removed the (rest ...) call near the beginning.




From: Anthony Lander [mailto:address@hidden
Sent: Monday, September 24, 2012 7:45 PM
To: Ken Williams
Cc: address@hidden
Subject: Re: [O] Breadcrumbs?


Hi Ken,


You can bind this to a speed command. It will show you the path to the current headline (less the first heading) in the echo area, and will also copy it to the kill ring. This is the functionality I need, but it would be easy to modify to do what you want.


(defun org-copy-outline-path-less-root-to-kill-ring (&optional a b)

  "Copy the current outline path, less the first node, to the

kill ring, and echo to the echo area."

  (interactive "P")

  (let* ((bfn (buffer-file-name (buffer-base-buffer)))

     (case-fold-search nil)

         (path (rest (org-get-outline-path))))

    (setq path (append path


                         (org-back-to-heading t)

                         (if (looking-at org-complex-heading-regexp)

                             (list (match-string 4))))))

    (let ((formatted-path (org-format-outline-path


                           (1- (frame-width)))))

      (kill-new formatted-path)

      (message "%s" formatted-path))))


Hope this helps,




CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

reply via email to

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