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

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

Hi Ken,

On 12-Sep-24, at 5:36 PM, Ken Williams wrote:

> Has anyone ever tried implementing a “breadcrumbs”-type feature in org-mode?  By that I mean something that would quickly tell you the headings up the whole path to the root, to quickly orient yourself when you’re deep within a document.  I was originally thinking of something always-present shown at the top of the frame, but maybe it would be better as something shown on demand in the minibuffer, possibly making it taller while shown.

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


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

  reply	other threads:[~2012-09-25  0: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 ` Anthony Lander [this message]
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   ` Breadcrumbs? Ken Williams
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=1CA35E1C-E081-471B-9A56-9A83E1B3BECB@landerfamily.ca \
    --to=anthony@landerfamily.ca \
    --cc=Ken.Williams@windlogics.com \
    --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).