emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Re: [9.5.2] [org-keys] [cursor keys with modifiers] ESC <left> m


From: Ihor Radchenko
Subject: [PATCH] Re: [9.5.2] [org-keys] [cursor keys with modifiers] ESC <left> missing?
Date: Fri, 06 May 2022 18:42:18 +0800

R Primus <rprimus+org@gmail.com> writes:

> For `(org-defkey org-mode-map (kbd "ESC <left>") #'org-metaleft)`, just 
> wondering if:
>
> 1. this was intentionally left out, and
> 2. if so, what is the reason?
>
> This causes user `surprise` when switching from using emacs/org-mode in
> the terminal to a GUI session.

I tied to dig into commit history and I do not see any justification why
ESC <left> could be omitted from default non-terminal bindings.

I agree that the current behaviour is inconsistent.

The fix is attached.

Best,
Ihor

>From 7232400abe73c9d4ad667781146f1b5da14b64a4 Mon Sep 17 00:00:00 2001
Message-Id: 
<7232400abe73c9d4ad667781146f1b5da14b64a4.1651833603.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Fri, 6 May 2022 18:37:10 +0800
Subject: [PATCH] org-keys: Bind ESC <left> by default

* lisp/org-keys.el (org-mode-map): Bind `org-metaleft' to ESC <left>
by default, not just in terminals.  This completes the ESC <arrow>
binding group.  ESC <right>, <up>, and <down> are already bound and
missing ESC <left> can be confusing.

Reported in https://orgmode.org/list/Yf6lsTR3JSNSXRDX@x.local
---
 lisp/org-keys.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index 782ffa871..e96fa217b 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -462,6 +462,7 @@ (org-defkey org-mode-map (kbd "M-RET") #'org-meta-return)
 
 ;;;; Cursor keys with modifiers
 (org-defkey org-mode-map (kbd "M-<left>") #'org-metaleft)
+(org-defkey org-mode-map (kbd "ESC <left>") #'org-metaleft)
 (org-defkey org-mode-map (kbd "M-<right>") #'org-metaright)
 (org-defkey org-mode-map (kbd "ESC <right>") #'org-metaright)
 (org-defkey org-mode-map (kbd "M-<up>") #'org-metaup)
-- 
2.35.1


reply via email to

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