emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PROPOSAL] New function `org-headings-to-point' and displayer.


From: Adam Porter
Subject: Re: [PROPOSAL] New function `org-headings-to-point' and displayer.
Date: Thu, 05 Dec 2019 02:42:39 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Karl Fogel <address@hidden> 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 via email to

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