From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Fogel Subject: Re: [PROPOSAL] New function `org-headings-to-point' and displayer. Date: Thu, 05 Dec 2019 16:36:54 -0600 Message-ID: <87lfrq1jsp.fsf@red-bean.com> References: <878snui0ay.fsf@red-bean.com> <87pnh5t66x.fsf@alphapapa.net> <87lfrt3rvz.fsf@red-bean.com> <87h82gu8xj.fsf@alphapapa.net> <87sglz1nig.fsf@red-bean.com> <877e3btaz3.fsf@alphapapa.net> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50240) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iczkC-00010p-SF for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 17:37:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iczk4-0003bp-Mh for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 17:37:02 -0500 Received: from mail-yw1-xc31.google.com ([2607:f8b0:4864:20::c31]:36895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iczk4-0003Zk-Fi for emacs-orgmode@gnu.org; Thu, 05 Dec 2019 17:37:00 -0500 Received: by mail-yw1-xc31.google.com with SMTP id 4so1919634ywx.4 for ; Thu, 05 Dec 2019 14:36:58 -0800 (PST) In-Reply-To: <877e3btaz3.fsf@alphapapa.net> (Adam Porter's message of "Thu, 05 Dec 2019 02:47:44 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Adam Porter Cc: emacs-orgmode@gnu.org On 05 Dec 2019, Adam Porter wrote: >Karl Fogel 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