From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: [PROPOSAL] New function `org-headings-to-point' and displayer.
Date: Tue, 03 Dec 2019 20:38:09 -0600 [thread overview]
Message-ID: <87h82gu8xj.fsf@alphapapa.net> (raw)
In-Reply-To: 87lfrt3rvz.fsf@red-bean.com
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
Karl Fogel <kfogel@red-bean.com> writes:
> Thank you, Adam -- I didn't know about those. I had searched for
> something like that before implementing my own, but I think I searched
> using the term "heading" or something instead of "outline",
> unfortunately, so I never found them.
Org is like Emacs in that it has many nooks and crannies that even
experienced users are unfamiliar with. There's always something more to
discover.
> Now that I know about `org-display-outline-path', the one improvement
> I'd like to make is to enable it to display the headings with
> per-level indentation, and treat the first level specially (with an
> anchoring dot instead of a directional arrow), as my code did. It's a
> lot more readable that way displayed in the minibuffer.
You might consider adjusting your fontification settings. The
single-line outline path can be quite readable with the right faces (see
attached example).
[-- Attachment #2: example --]
[-- Type: image/png, Size: 25545 bytes --]
[-- Attachment #3: Type: text/plain, Size: 2038 bytes --]
> I suppose I would implement this by adding two new optional arguments to `org-display-outline-path':
>
> * `per-level-indentation': add a newline followed by <this string LEVEL-1 times> in front of each SEPARATOR
>
> * `level-1-prefix': a special prefix for the first level's heading
I'd recommend against adding more optional arguments to that function,
because it already has four. Emacs/Org already have enough problems
with code like (org-whatever nil t nil t nil nil t).
> ...and make corresponding changes to the helper functions of course.
Please consider such changes very carefully, because those functions are
used by a number of other packages. It's already difficult, and often
frustrating, for package authors to maintain code that works across Org
versions, which persist in the wild for years. Today Org 9.3 was
released with more breaking changes, and I'm just waiting for the bug
reports to roll in on my packages so I can add more conditional
definitions and aliases to meet the needs of the variety of users out
there.
> There should also be some way to access the new functionality
> interactively; the solution might be a new interactive wrapper
> function with its own name, or maybe some new variables? I don't
> know; I haven't thought it all the way through yet.
> Is there any interest in or opposition to such a patch? I'd like to
> get a sense of whether it would be able to land in Org Mode before I
> start working on it.
I'd recommend simply making a new interactive function, putting it in
your personal config, and sharing it publicly (e.g. here and on
/r/orgmode). Use it "in anger" for a while, and solicit feedback from
other users for a while. Then, if it still seems widely useful enough
to deserve being added to Org proper, apply what you've learned in the
meantime to improve and simplify its implementation before proposing a
patch.
You might also consider sending it to my "unpackaged.el" repo, which
might make a good home for it: http://github.com/alphapapa/unpackaged.el
next prev parent reply other threads:[~2019-12-04 2:38 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 [this message]
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
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=87h82gu8xj.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).