From: Andrii Kolomoiets <andreyk.mad@gmail.com>
To: 43948@debbugs.gnu.org
Subject: bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line
Date: Mon, 12 Oct 2020 14:36:53 +0300 [thread overview]
Message-ID: <m28scbiskq.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 368 bytes --]
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!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-NS-Make-s-left-right-to-move-to-beginning-end-of-lin.patch --]
[-- Type: text/x-patch, Size: 1694 bytes --]
From ccea06f8b53589cdb1dff20e91f33fd8b8beb0a3 Mon Sep 17 00:00:00 2001
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
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.
+
\f
----------------------------------------------------------------------
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
next reply other threads:[~2020-10-12 11:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 11:36 Andrii Kolomoiets [this message]
2020-10-12 18:33 ` bug#43948: 28.0.50; [PATHC][NS] Make s-<left/right> to move to beginning/end of line Alan Third
2020-10-13 6:48 ` Andrii Kolomoiets
2020-10-13 20:35 ` Alan Third
2020-10-12 22:38 ` Unknown
2020-10-13 7:57 ` Andrii Kolomoiets
2020-10-13 20:36 ` Alan Third
2020-10-14 10:15 ` Andrii Kolomoiets
2020-10-14 20:24 ` Alan Third
2020-10-14 20:48 ` Andrii Kolomoiets
2020-11-09 14:55 ` Alan Third
2020-10-20 9:55 ` bug#43948: 28.0.50; [PATCH][NS] " Mattias Engdegård
2020-10-20 12:33 ` Alan Third
2020-10-20 13:54 ` Mattias Engdegård
2020-10-20 16:06 ` Drew Adams
2020-11-12 4:52 ` bug#43948: 28.0.50; [PATHC][NS] " tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-12 9:06 ` Andrii Kolomoiets
2020-11-12 10:04 ` tsuucat via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-12 14:39 ` Eli Zaretskii
2020-11-12 23:20 ` Andrii Kolomoiets
2020-11-13 8:05 ` Eli Zaretskii
2020-11-13 5:32 ` Richard Stallman
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m28scbiskq.fsf@gmail.com \
--to=andreyk.mad@gmail.com \
--cc=43948@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
https://git.savannah.gnu.org/cgit/emacs.git
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).