emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PROPOSAL: Bind `org-fold-hide-subtree' by default in Org Mode.


From: Karl Fogel
Subject: Re: PROPOSAL: Bind `org-fold-hide-subtree' by default in Org Mode.
Date: Wed, 22 Feb 2023 11:01:09 -0600
User-agent: Gnus/5.13 (Gnus v5.13)

On 22 Feb 2023, Max Nikulin wrote:
On 22/02/2023 14:29, Karl Fogel wrote:
I put it on "C-<tab>" because that's normally unbound in Org Mode,
and because so many of the Org Mode cycling commands involve
modified tab already.

Perhaps C-<tab> is not the best choice:

9092c289b6bea38bb519e6c59a60237ae5af8f08
author Bastien Mon Jun 1 14:39:28 2020 +0200

Bind `org-force-cycle-archived' to C-c C-TAB

* lisp/org-keys.el (org-mode-map): Bind `org-force-cycle-archived'
to C-c C-TAB instead of C-TAB to avoid conflict with native Emacs
keybinding.

Ah, clearly it is not a good choice -- thank you for noticing that.

I think there are two separate questions here:

1) Would it be useful to bind `org-fold-hide-subtree' by default?

2) If yes to (1), then is there a good key to bind it to? (C-c C-something, I guess.)

If we agree on (1), then let's figure out the answer to (2). I don't know if anyone else agrees about (1) yet, though.

By the way, the binding in my Org Mode hook looks like this:

 (when (not (keymap-lookup nil "C-<tab>"))
   (keymap-local-set "C-<tab>" 'org-fold-hide-subtree))

So FWIW C-<tab> is not bound in Org Mode buffers for me, in Emacs 30.x (i.e., recent development builds). However, I agree with Bastien's logic: C-<tab> is not in the reserved keymap space, so Emacs might bind it (and perhaps does bind it in other modes).

I don't know how widely-used `org-cycle-force-archived' is (that's the new name of that function). I don't use it, personally, so if we decide against (1)+(2) above, then perhaps I'll just override that binding for myself instead.

Best regards,
-Karl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]