emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ken Williams <Ken.Williams@windlogics.com>
To: Anthony Lander <anthony@landerfamily.ca>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Breadcrumbs?
Date: Tue, 25 Sep 2012 12:44:23 -0500	[thread overview]
Message-ID: <21A5E1E970CD46459ECBE86D6CC4B28C676DDA32@spexch01.WindLogics.local> (raw)
In-Reply-To: <1CA35E1C-E081-471B-9A56-9A83E1B3BECB@landerfamily.ca>

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

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

  -Ken

From: Anthony Lander [mailto:anthony@landerfamily.ca]
Sent: Monday, September 24, 2012 7:45 PM
To: Ken Williams
Cc: emacs-orgmode@gnu.org
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
                       (save-excursion
                         (org-back-to-heading t)
                         (if (looking-at org-complex-heading-regexp)
                             (list (match-string 4))))))
    (let ((formatted-path (org-format-outline-path
                           path
                           (1- (frame-width)))))
      (kill-new formatted-path)
      (message "%s" formatted-path))))

Hope this helps,

 -Anthony


________________________________
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.

[-- Attachment #2: Type: text/html, Size: 6593 bytes --]

  parent reply	other threads:[~2012-09-25 17:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 21:36 Breadcrumbs? Ken Williams
2012-09-25  0:44 ` Breadcrumbs? Anthony Lander
2012-09-25  9:27   ` Breadcrumbs? Sebastien Vauban
2012-09-25  9:35     ` Breadcrumbs? Bastien
2012-09-25 11:25       ` Breadcrumbs? Sebastien Vauban
2012-09-25 12:48         ` Breadcrumbs? Bastien
2012-09-26  3:49           ` Breadcrumbs? Carsten Dominik
2012-09-26  6:32             ` Breadcrumbs? Bastien
     [not found]             ` <80d3198a49.fsf@somewhere.org>
2012-09-26  9:07               ` **: Breadcrumbs? Bastien
     [not found]       ` <13349.1348583253@alphaville>
2012-09-25 15:31         ` Breadcrumbs? Bastien
2012-09-25 14:18     ` Breadcrumbs? Nick Dokos
2012-09-25 20:31     ` Breadcrumbs? François Pinard
2012-09-25 17:44   ` Ken Williams [this message]
2012-09-25  0:59 ` Breadcrumbs? Bastien
2012-09-25  1:16   ` Breadcrumbs? Bastien
2012-09-25  1:20 ` Breadcrumbs? Eric Abrahamsen
2012-09-25  1:46   ` Breadcrumbs? Bastien
2012-09-25 15:04     ` Breadcrumbs? Memnon Anon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21A5E1E970CD46459ECBE86D6CC4B28C676DDA32@spexch01.WindLogics.local \
    --to=ken.williams@windlogics.com \
    --cc=anthony@landerfamily.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).