* Unsetting "C-j" Keybinding Bound to org-return-indent @ 2009-07-16 4:08 onguarde - 2009-07-16 21:29 ` Bastien 0 siblings, 1 reply; 3+ messages in thread From: onguarde - @ 2009-07-16 4:08 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 543 bytes --] Peace all! I have this in my .emacs to rebind keys. (global-unset-key "\C-j") ; newline-and-indent/org-return-indent (global-set-key (kbd "C-j") 'move-beginning-of-line) ;(global-unset-key (kbd "C-l")) ; recenter (global-set-key (kbd "C-l") 'move-end-of-line) The 2nd set works with or without the global-unset-key line but the first set simply refuses to work. M-x describe-key shows that C-j is bound to org-return-indent. I thought this might be the problem. Is there any way to unset this and rebind it globally? Thanks in advance! [-- Attachment #1.2: Type: text/html, Size: 642 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unsetting "C-j" Keybinding Bound to org-return-indent 2009-07-16 4:08 Unsetting "C-j" Keybinding Bound to org-return-indent onguarde - @ 2009-07-16 21:29 ` Bastien [not found] ` <fb6e5c300907170107l57a2eba6vefa1c0ca0addfe91@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Bastien @ 2009-07-16 21:29 UTC (permalink / raw) To: onguarde -; +Cc: emacs-orgmode onguarde - <onguarde@gmail.com> writes: > The 2nd set works with or without the global-unset-key line but the first set > simply refuses to work. M-x describe-key shows that C-j is bound to > org-return-indent. I thought this might be the problem. Org binds `C-j' to org-return-indent and local bindinds shadow global bindins. See the docstring of global-set-key. On one hand, Org maybe shouldn't rebind such key. One the other hand why do you want to rebind such a common key?? > Is there any way to unset this and rebind it globally? And since we have three hands, here is a way to discipline Org back again: (org-defkey org-mode-map "\C-j" 'move-beginning-of-line) -- Bastien ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <fb6e5c300907170107l57a2eba6vefa1c0ca0addfe91@mail.gmail.com>]
* Re: Unsetting "C-j" Keybinding Bound to org-return-indent [not found] ` <fb6e5c300907170107l57a2eba6vefa1c0ca0addfe91@mail.gmail.com> @ 2009-07-17 8:43 ` Bastien 0 siblings, 0 replies; 3+ messages in thread From: Bastien @ 2009-07-17 8:43 UTC (permalink / raw) To: onguarde -; +Cc: emacs-orgmode (CC'ing the list - please use plain text in emails as much as possible! Thanks.) onguarde - <onguarde@gmail.com> writes: > I assume docstring here means the describe function(C-h-f)? > > Note that if key has a local binding in the current buffer, > that local binding will continue to shadow any global binding > that you make with this function. > > Ah, finally figured out that I should instead be using the "local-set-key" > instead, or both. > > (local-set-key key command) > Give key a local binding as command. > The binding goes in the current buffer's local map, > which in most cases is shared with all other buffers in the same major mode. > > Regarding why, I find myself being so unsatisfied with the default bindings > that I just had to do something. Since I'm rather new myself, might as well > customise and get used to it now. It's getting pretty hard to standardise these > across applications though. That's why it's often better to stick to the default keybindings, at least for such important ones. "Standardization" is then taken care of by the developers, not by you. -- Bastien ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-17 8:43 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-16 4:08 Unsetting "C-j" Keybinding Bound to org-return-indent onguarde - 2009-07-16 21:29 ` Bastien [not found] ` <fb6e5c300907170107l57a2eba6vefa1c0ca0addfe91@mail.gmail.com> 2009-07-17 8:43 ` Bastien
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).