Kyle Meyer <[email protected]> wrote:
> Nicolas Goaziou <[email protected]> wrote:
> [...]
>> However, C-m is RET. Is there any reason to distinguish between the two?
>
> If I use just
>
> (define-key org-goto-local-auto-isearch-map [return] nil)
>
> then C-m doesn't work (i.e., it results in isearch-exit being called
> instead of org-goto-ret, then requiring a second key press to get out of
> the org-goto indirect buffer). The same is true for return if only the
> C-m line is used.
To follow up on this:
I think the reason why setting only one doesn't work is because isearch
specifies both of them.
(define-key map "\r" 'isearch-exit)
(define-key map [return] 'isearch-exit)
Since the return key is given a binding, it's not translated to the
corresponding ASCII character and, as a result, needs to be overridden
specifically. At least, that's my understanding based on
(info "(emacs)Named ASCII Chars").
--
Kyle