Subject: bug#43948: closed (Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 09 Nov 2020 14:57:02 +0000

Your bug report

#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
43948: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43948
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line
From: Alan Third <[email-masked]>
To: Andrii Kolomoiets <[email-masked]>
Cc: [email-masked], Daniel Martín <[email-masked]>
Date: Mon, 9 Nov 2020 14:55:55 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On Wed, Oct 14, 2020 at 11:48:29PM +0300, Andrii Kolomoiets wrote:
> Alan Third <[email-masked]> writes:
> 
> >> +** On macOS, 's-<left>' and 's-<right> are now bound to
> >                                          ^
> > Missing quote.
> 
> Fixed.
> Smells like bug report for electric-pair-mode to pair "'" in text-mode :)
> 
> >
> >> +'move-beginning-of-line' and 'move-end-of-line' respectively. The former
> >> +commands to select previous/next frame are still bound to 's-~' and 's-`'.
> >
> > I don't think you need the word "former" here. Other than that, LGTM.
> 
> And fixed.

I've pushed this to master.

Thanks!
-- 
Alan Third

Subject: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line
From: Andrii Kolomoiets <[email-masked]>
To: [email-masked]
Date: Mon, 12 Oct 2020 14:36:53 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

On macOS, 'Command-Left/Right Arrow' are the common shortcuts to move
the insertion point to the beginning/end of line.

See https://support.apple.com/en-us/HT201236, 'Document shortcuts'
section.

Considering that Emacs is the text editor (mostly), lets make it behave
more like TextEdit.app and not like Terminal.app about those shortcuts.

Patch attached.

Thanks!
>From ccea06f8b53589cdb1dff20e91f33fd8b8beb0a3 Mon Sep 17 00:00:00 2001
From: Andrii Kolomoiets <[email-masked]>
Date: Mon, 12 Oct 2020 14:24:25 +0300
Subject: [PATCH] NS: Make s-<left/right> to move to beginning/end of line

* lisp/term/ns-win.el: Bind 's-<left>' to 'move-beginning-of-line';
bind 's-<right>' to 'move-end-of-line'.
* etc/NEWS: Mention new bindings.
---
 etc/NEWS            | 4 ++++
 lisp/term/ns-win.el | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index cc8733c2c0..c7b34bdc1c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1683,6 +1683,10 @@ image API via 'M-x report-emacs-bug'.
 ---
 ** The user option 'make-pointer-invisible' is now honored on macOS.
 
+--
+** On macOS, 's-<left>' and 's-<right> are now bound to
+'move-beginning-of-line' and 'move-end-of-line' respectively.
+
 
 ----------------------------------------------------------------------
 This file is part of GNU Emacs.
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index cc7a3762b4..28bb851b30 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -148,9 +148,9 @@ global-map
 (define-key global-map [?\s-|] 'shell-command-on-region)
 (define-key global-map [s-kp-bar] 'shell-command-on-region)
 (define-key global-map [?\C-\s- ] 'ns-do-show-character-palette)
-;; (as in Terminal.app)
-(define-key global-map [s-right] 'ns-next-frame)
-(define-key global-map [s-left] 'ns-prev-frame)
+;; (as in TextEdit.app)
+(define-key global-map [s-right] 'move-end-of-line)
+(define-key global-map [s-left] 'move-beginning-of-line)
 
 (define-key global-map [home] 'beginning-of-buffer)
 (define-key global-map [end] 'end-of-buffer)
-- 
2.15.1