emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: R Primus <rprimus+org@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: [PATCH] Re: [9.5.2] [org-keys] [cursor keys with modifiers] ESC <left> missing?
Date: Fri, 06 May 2022 18:42:18 +0800	[thread overview]
Message-ID: <87mtfv6iyd.fsf@localhost> (raw)
In-Reply-To: <Yf6lsTR3JSNSXRDX@x.local>

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-keys-Bind-ESC-left-by-default.patch --]
[-- Type: text/x-patch, Size: 1212 bytes --]

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)

  reply	other threads:[~2022-05-06 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 16:28 [9.5.2] [org-keys] [cursor keys with modifiers] ESC <left> missing? R Primus
2022-05-06 10:42 ` Ihor Radchenko [this message]
2022-07-22 13:36   ` [PATCH] " Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtfv6iyd.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rprimus+org@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).