[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customize the key bindings in the org mode
From: |
Arash Esbati |
Subject: |
Re: Customize the key bindings in the org mode |
Date: |
Fri, 08 Mar 2024 12:35:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Heerdegen via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Volker Wysk <post@volker-wysk.de> writes:
>
>> I found something on the web and adapted it:
>>
>> (with-eval-after-load "org" (define-key org-mode-map [M-down] #'absatz-vor)
>>
>> But this doesn't work, because the org-mode-map is nil. Seems like that's
>> because org-mode hasn't been read yet, in the ~/.emacs file.
>
> Org consists of multiple source files, and at the moment where org.el
> has been loaded the rest of org has not yet - including the file that
> actually defines and fills the org-mode's keymap (note that C-h v
> org-mode-map tells you org.el would define the variable, this is true
> but only for internal technical reasons: the keymap is not yet created
> by loading that file).
Caveat emptor: I'm not an Org user.
Does the above mean that this example in Org manual[1] doesn't work
OOTB?
C-c C-x C-n (org-next-link)
C-c C-x C-p (org-previous-link)
Move forward/backward to the next link in the buffer. At the limit
of the buffer, the search fails once, and then wraps around. The key
bindings for this are really too long; you might want to bind this
also to M-n and M-p.
(with-eval-after-load 'org
(define-key org-mode-map (kbd "M-n") #'org-next-link)
(define-key org-mode-map (kbd "M-p") #'org-previous-link))
Best, Arash
Footnotes:
[1] https://orgmode.org/manual/Handling-Links.html