Allen Li <> writes:

> On Wed, Feb 7, 2018 at 1:47 PM Matt Lundin <> wrote:
>> Matt Lundin <> writes:
>> > I discovered that when trying to insert a new item with a checkbox using
>> > M-S Return (org-insert-todo-heading), the keybinding is "translated" to
>> > M-Return (org-meta-return). As a result, all I get is simple list item
>> > without a checkbox.
>> >
>> The attached patch fixes this issue.
> I'm pretty sure your patch would break those binding in terminal Emacs
> completely, since <return> cannot be typed in the terminal and Emacs
> does not remap these bindings.

Attached please find a more limited patch that fixes the issue in the
GUI without affecting TTY use. I have only changed bindings for the
M-S-RET or S-RET combinations. These combinations cannot be used in the
TTY anyway and Org Mode already defines alternative TTY bindings for
these combinations.


>From 3ec2e2b82ff64d708286cc9f3962acad56771dfb Mon Sep 17 00:00:00 2001
From: Matt Lundin <>
Date: Fri, 9 Feb 2018 08:52:41 -0600
Subject: [PATCH] Fix S-<return> and M-S-<return> keybindings for GUI

This prevents these key combinations from being translated to M-RET in
window systems. These bindings already have extra keys defined for
 lisp/org.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 688e48bcc..e47a7e0ac 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18859,9 +18859,9 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
 (define-key org-mode-map (kbd "<backtab>") #'org-shifttab)
 ;;;; RET key with modifiers
-(org-defkey org-mode-map (kbd "S-RET") #'org-table-copy-down)
-(org-defkey org-mode-map (kbd "M-S-RET") #'org-insert-todo-heading)
-(org-defkey org-mode-map (kbd "ESC S-RET") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "S-<return>") #'org-table-copy-down)
+(org-defkey org-mode-map (kbd "M-S-<return>") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "ESC S-<return>") #'org-insert-todo-heading)
 (org-defkey org-mode-map (kbd "M-RET") #'org-meta-return)
 (org-defkey org-mode-map (kbd "ESC RET") #'org-meta-return)

Reply via email to