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: Fri, 24 Feb 2023 18:13:14 -0600
User-agent: Gnus/5.13 (Gnus v5.13)

Okay, today I did some research and found that every "C-c C-<letter>" binding is used in Org Mode except for "C-c C-g". While that one is technically reserved for the mode's use, I suspect the reason it's unbound is that people are accustomed to using C-g as a quit command (and they get that effect if they accidentally type C-c, because then they type C-g and it's just an undefined key -- i.e., it quits, which is what the user wanted).

Note that while "C-c C-h" does not appear to be bound, it actually is: it gets you a help buffer about the Org Mode keybindings (which then, ironically, does not list "C-c C-h" as one of the bindings).

(It's not clear to me whether Emacs's conventions consider "C-c C-i" to be a letter or whether they treat "C-i" as "TAB" and consider it special; based on the previous evidence in this thread, maybe the latter, so we shouldn't consider "C-c C-i" to be available.)

I think what this is telling me is that Org Mode keybinding real estate is quite valuable :-), and that unless there are other people who feel as strongly as I do that `org-fold-hide-subtree' is amazingly useful, we probably won't decide to bind it by default in Org Mode. So I should just continue to bind it to a custom key myself and continue to live a glorious life all alone in my private keymap splendour.

Best regards,
-Karl

I wrote:
On 23 Feb 2023, Max Nikulin wrote:
On 23/02/2023 00:01, Karl Fogel wrote:
 =C2=A0(when (not (keymap-lookup nil "C-<tab>"))
=C2=A0=C2=A0 (keymap-local-set "C-<tab>" 'org-fold-hide-subtree))
So FWIW C-<tab> is not bound in Org Mode buffers for me, in=20
Emacs
30.x (i.e., recent development builds).

lisp/tab-bar.el:130:  (unless (global-key-binding [(control=20
tab)])
lisp/tab-bar.el:131:    (global-set-key [(control tab)]=20
#'tab-next))

Minibuffer file cache completion should not be relevant to Org=20
buffers.

Ah, I don't use tab-bar at all (at least not as far as I know), so=20
I'm not 100% sure what the above is saying.

Are you saying that the only current default binding for C-<tab>=20 in Emacs is that one in tab-bar.el, and therefore we should feel=20
free to rebind it in Org Mode?  If so, we should still be=20
cautious, since Emacs has policies for maintaining the keybinding=20
space.  Generally, the space "C-c C-<LETTER>" is reserved for=20
major modes, so ideally we should find something in there if we=20 can -- although Org Mode has used up a lot of that space already=20
:-), so I'm not sure what's left, unless we decide to swap out=20
some existing binding in favor of this one.

(I realize this contradicts what I said in my inital post. I had=20
forgotten that C-<tab> was not part of the mode-reserved space.)



reply via email to

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