emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PROPOSAL] New function `org-headings-to-point' and displayer.
Date: Thu, 05 Dec 2019 16:36:54 -0600	[thread overview]
Message-ID: <87lfrq1jsp.fsf@red-bean.com> (raw)
In-Reply-To: <877e3btaz3.fsf@alphapapa.net> (Adam Porter's message of "Thu, 05 Dec 2019 02:47:44 -0600")

On 05 Dec 2019, Adam Porter wrote:
>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.
>
>Forgive me, I think I misunderstood you.  Yes, I meant to make a new
>interactive function for displaying the vertical hierarchy.

Oh, I still learned things from the code you posted in your previous message, though, thanks.  (I didn't know about `thread-first', for example, even though it's been around for a while.)

Yes, what I'd meant was that ideally this would just be an interactive wrapper around `org-format-outline-path'.  Unfortunately there's no way to get the behavior I want from that function currently.  This is not a showstopper -- I agree with you that adding yet more arguments to that function is not a complexity cost worth paying here.

Another thing is that `org-get-outline-path' returns only the title portion of each heading, rather than the full heading.  Even though the titles are all I need right now, I still would normally prefer that the underlying function provide more generality (i.e., return the full headings) and then the caller would use `(nth 4 heading)' or whatever to get the part it needs.  That way if one wants to do something more sophisticated when displaying headings -- involving tags, for example -- the necessary information would be available.

Again, these are not things that need to be "solved" in Org Mode; I'm not even sure we should consider them to be problems.  I'm just explaining my earlier comment about how the existing functions in Org Mode don't provide quite the substrate I was hoping for for this particular task.

>BTW, you might also find the org-sticky-header package helpful.

Ah, very nice -- thank you!

(https://github.com/alphapapa/org-sticky-header, for those who want the convenience of the a quick link.)

Best regards,
-Karl

  reply	other threads:[~2019-12-05 22:37 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
2019-12-05  8:47         ` Adam Porter
2019-12-05 22:36           ` Karl Fogel [this message]
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=87lfrq1jsp.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=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).