emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Philipp Kiefer <phil.kiefer@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Suggestion to increase usefulness of TAB key / 'org-cycle' function
Date: Fri, 28 Apr 2023 10:49:17 +0200	[thread overview]
Message-ID: <CAEGK9xns9_GAh=sG95Yys1hb7FCiYezokZ_=fBeSjHMA0uxFKA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

To quote from the Org Manual:
"Org greatly simplifies the use of outlines by compressing the entire show
and hide functionalities into a single command, org-cycle, which is bound
to the TAB key."

Well, it could simplify things a good deal further if, on issuing the
command when point is *not* on a parent heading, (non-global) org-cycle
would instead fold the subtree that point is in, i. e. do
'outline-up-heading' and 'hide-subtree' on the parent heading. This would
make collapsing subtrees a lot easier and quicker as it could be done from
any non-parent position inside a tree. It is very noticeable when
collapsing multiple adjacent trees in succession.

Currently, hitting TAB when not on a parent heading merely returns an
'EMPTY ENTRY' message - not useful at all. 'Outline-up-heading' (C-c C-u)
has to be called manually each time before hitting TAB to achieve what the
user is most likely attempting to do anyway.

Personally, I doubt this change in behaviour would break much for users,
unless one were to assume that there is a lot of Elisp code out there that
relies on 'org-cycle' doing nothing in such cases, incurring the 'EMPTY
ENTRY' reprimand to boot, rather than first checking whether point is on a
parent heading. I don't see any drawbacks when 'org-cycle' is used
interactively.

[-- Attachment #2: Type: text/html, Size: 1429 bytes --]

             reply	other threads:[~2023-04-28  8:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  8:49 Philipp Kiefer [this message]
2023-04-28  9:45 ` Suggestion to increase usefulness of TAB key / 'org-cycle' function Fraga, Eric
2023-04-28 15:17   ` Philipp Kiefer
2023-04-28 17:41     ` Dr. Arne Babenhauserheide
2023-04-28 22:28       ` Esteban Ordóñez
2023-04-28 23:19         ` Dr. Arne Babenhauserheide
2023-04-30 17:17       ` Philipp Kiefer
2023-05-01 18:45         ` Ihor Radchenko
2023-05-01 20:31           ` Philipp Kiefer

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='CAEGK9xns9_GAh=sG95Yys1hb7FCiYezokZ_=fBeSjHMA0uxFKA@mail.gmail.com' \
    --to=phil.kiefer@gmail.com \
    --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).