From: Kyle Meyer <kyle@kyleam.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>, emacs-orgmode@gnu.org
Subject: Re: Behavior of `org-show-entry'
Date: Sun, 05 Feb 2017 17:03:11 -0500 [thread overview]
Message-ID: <87d1ew5m8w.fsf@kyleam.com> (raw)
In-Reply-To: <87lgtk8kja.fsf@ericabrahamsen.net>
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> I do a lot of my Org navigation with `helm-org-in-buffer-headings' and
> `helm-org-agenda-files-headings', which prompt you for an org heading,
> then take you there.
>
> I'm always annoyed that, once you're at the heading, it leaves it in
> a half-open state where you can see the immediate text of the target
> entry, but all of its child entries are replaced by an ellipses.
>
> * Target Heading
> Drawers and text
> ... # ellipses instead of child headings
> * Next Heading
>
> You then have to hit <tab> twice to see the children.
>
> The helm commands end by calling `org-show-entry', which first does
> this:
>
> (outline-flag-region
> (max (point-min) (1- (point)))
> (save-excursion
> (if (re-search-forward
> (concat "[\r\n]\\(" org-outline-regexp "\\)") nil t)
> (match-beginning 1)
> (point-max)))
> nil)
>
> Which leaves the heading in the state described above, and then does
> this:
>
> (org-cycle-hide-drawers 'children)
>
> Which has no effect.
>
> I'm not really sure what the purpose of `outline-flag-region' is, but
> I'm pretty sure this isn't the desired effect.
Based on how org-show-entry calls it, outline-flag-region shows the text
from the current heading to the next. So it seems to behave as
documented: "[s]how the body directly following this heading".
> The call to `org-cycle-hide-drawers' should reveal children, isn't
> that right?
The purpose isn't to reveal the child headings (I don't understand why
the argument is called "children"), but to hide the drawers.
Without the org-cycle-hide-drawers call, org-show-entry would expand
* TODO blah...
to
* TODO blah
SCHEDULED: <2017-02-12 Sun .+1w>
:PROPERTIES:
:LAST_REPEAT: [2017-02-05 Sun 16:31]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2017-02-05 Sun 16:31]
:END:
instead of
* TODO blah
SCHEDULED: <2017-02-12 Sun .+1w>
:PROPERTIES:...
:LOGBOOK:...
> Which part of this should be tweaked to achieve the desired effect?
Perhaps helm could call org-show-children after it calls org-show-entry.
--
Kyle
next prev parent reply other threads:[~2017-02-05 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-05 20:11 Behavior of `org-show-entry' Eric Abrahamsen
2017-02-05 22:03 ` Kyle Meyer [this message]
2017-02-05 23:16 ` Eric Abrahamsen
2017-02-06 0:31 ` Kyle Meyer
2017-02-06 13:11 ` Nicolas Goaziou
2017-02-06 17:18 ` Kyle Meyer
2017-02-06 17:29 ` Eric Abrahamsen
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=87d1ew5m8w.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=emacs-orgmode@gnu.org \
--cc=eric@ericabrahamsen.net \
/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).