From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: [Bug] M-S Ret keybinding translated to M-Ret Date: Fri, 09 Feb 2018 09:02:18 -0600 Message-ID: <87tvuqw6it.fsf@fastmail.fm> References: <87shad3kll.fsf@fastmail.fm> <878tc4iibv.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekAC6-0008GP-4g for emacs-orgmode@gnu.org; Fri, 09 Feb 2018 10:02:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekABw-00028O-OA for emacs-orgmode@gnu.org; Fri, 09 Feb 2018 10:02:30 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46261) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekABw-00027s-FX for emacs-orgmode@gnu.org; Fri, 09 Feb 2018 10:02:20 -0500 In-Reply-To: (Allen Li's message of "Thu, 08 Feb 2018 05:06:00 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Allen Li Cc: Org Mode List --=-=-= Content-Type: text/plain 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 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. Best, Matt --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-S-return-and-M-S-return-keybindings-for-GUI.patch >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- and M-S- 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 TTY. --- 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 "") #'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-") #'org-table-copy-down) +(org-defkey org-mode-map (kbd "M-S-") #'org-insert-todo-heading) +(org-defkey org-mode-map (kbd "ESC S-") #'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) -- 2.16.1 --=-=-=--