emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: [PROPOSAL] New function `org-headings-to-point' and displayer.
Date: Thu, 05 Dec 2019 02:42:39 -0600	[thread overview]
Message-ID: <87blsntb7k.fsf@alphapapa.net> (raw)
In-Reply-To: 87sglz1nig.fsf@red-bean.com

Karl Fogel <kfogel@red-bean.com> writes:

> Unless you meant make a new interactive function to display a vertical
> hierarchy and base it on the existing Org Mode functions you informed
> me of the existence of?  But I don't think there's a way to do that
> without adding some new parameters to those existing functions, and,
> as you point out, that's probably not worth the extra complexity.

I'm not sure what you mean about having to add new parameters to
existing functions.  For example, if I understand correctly what you're
wanting, this code does approximately that:

    (defun ap/org-display-olp-lines ()
      (interactive)
      (thread-first
          (cl-loop for heading in (org-get-outline-path t)
                   for i from 0
                   for indent = (make-string (* i 2) ? )
                   collect (concat indent "* " heading))
        (string-join "\n")
        message))

Which displays, e.g.

    * Computers
      * Software
        * Emacs
          * Org-mode
            * Articles
              * Orgmode for GTD

  reply	other threads:[~2019-12-05  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  2:56 [PROPOSAL] New function `org-headings-to-point' and displayer Karl Fogel
2019-12-03  7:30 ` Diego Zamboni
2019-12-03  8:47 ` Cheong Yiu Fung
2019-12-03 22:06 ` Adam Porter
2019-12-03 23:34   ` Karl Fogel
2019-12-04  2:38     ` Adam Porter
2019-12-05  3:04       ` Karl Fogel
2019-12-05  8:42         ` Adam Porter [this message]
2019-12-05  8:47         ` Adam Porter
2019-12-05 22:36           ` Karl Fogel
2019-12-03 23:36   ` Karl Fogel
2019-12-04  2:20     ` Adam Porter

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=87blsntb7k.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --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).