[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Do we need to bind to both RET and <return> variants?
From: |
Kaushal Modi |
Subject: |
Re: Do we need to bind to both RET and <return> variants? |
Date: |
Wed, 23 Jan 2019 18:11:42 -0500 |
On Wed, Jan 23, 2019 at 5:53 PM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:
>
> No, if you don't care about the difference, then bind only RET (which
> will also apply to `return` because `return` is remapped to RET if
> there's no binding specifically for it).
>
But it did not work that way for me.
Earlier I did not have a S-<return> binding in my config. So once the
binding changed to S-RET (in org-mode-map) upstream in Org, S-<return>
stopped working for me altogether (Emacs GUI).
Then C-h k and typing S-<return> should say interpret that as just RET:
RET (translated from <S-return>) runs the command
modi/org-return-no-indent
I have bound modi/org-return-no-indent to C-m.
So to fix this I had to add the <return> bindings manually to my config:
(bind-keys
:map org-mode-map
:filter (org-at-table-p)
("S-<return>" . org-table-copy-down))
;; https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00312.html
;; Add the <return> variant of bindings so that they work on Emacs
;; GUI too.
(bind-keys
:map org-mode-map
("M-S-<return>" . org-insert-todo-heading)
("ESC S-<return>" . org-insert-todo-heading)
("M-<return>" . org-meta-return)
("ESC <return>" . org-meta-return))
Any tips on what could be causing S-<return> to be auto-translated to just
RET, and not use the upstream Org source defined S-RET binding?