From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrii Kolomoiets Newsgroups: gmane.emacs.bugs Subject: bug#43948: 28.0.50; [PATHC][NS] Make s- to move to beginning/end of line Date: Mon, 12 Oct 2020 14:36:53 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30478"; mail-complaints-to="usenet@ciao.gmane.io" To: 43948@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 12 13:38:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRw9k-0007pH-Qa for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Oct 2020 13:38:20 +0200 Original-Received: from localhost ([::1]:58410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRw9j-0006If-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Oct 2020 07:38:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRw9S-0006IR-3s for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2020 07:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRw9R-0007Q3-QR for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2020 07:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRw9R-0005jp-Nb for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2020 07:38:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrii Kolomoiets Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Oct 2020 11:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43948 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160250262321980 (code B ref -1); Mon, 12 Oct 2020 11:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Oct 2020 11:37:03 +0000 Original-Received: from localhost ([127.0.0.1]:41825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRw8V-0005iR-Bw for submit@debbugs.gnu.org; Mon, 12 Oct 2020 07:37:03 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRw8S-0005i1-0L for submit@debbugs.gnu.org; Mon, 12 Oct 2020 07:37:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRw8R-0005yz-N9 for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2020 07:36:59 -0400 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:42408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRw8P-0007LY-Uz for bug-gnu-emacs@gnu.org; Mon, 12 Oct 2020 07:36:59 -0400 Original-Received: by mail-lf1-x131.google.com with SMTP id a7so16938558lfk.9 for ; Mon, 12 Oct 2020 04:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=vChIhr03hbCSI481CnejgLH/bOfO9cmr2De2tInDBDg=; b=DGuf8OyenEc/ehPKO0h5kYtC5DSOiu7ytbCLqfDnZmMXzGW/bEV/jmxdN1F2gJk715 vMgorpoOp3IsQ0R44DHBvuiDjAb6GMjYql/YW+WySw04+825Co8w+Mw/q76yeAxZTrrG 2ja4Bh5rJkPS5nJ1bXYk/i9hSGdhwOFFw9OrzARRjBILOcXdmD2lRdmD/IoNQMtWur99 G8KGU/KxKGPng8SJlmOFri3UxljlPo/6Gx6h4DRrKU6EsrbxTju/lRBVk9x4P5L74njl Rnvl0PcXDdfeUsQ7CRABlM1EMa9ikUlMj2Zw+UwMXVKqjZz41pR53ZX/LJeOFZiyC4OQ mFnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=vChIhr03hbCSI481CnejgLH/bOfO9cmr2De2tInDBDg=; b=YZYF30S3yr4srPtKpYXN1TH2M1Grnx6LXaWcOUJoW0ltxwc9+SDklM+wq4EwplPmwM dj0O5h5BM5eIoMQQzfBCf2RJ1sC8BPzjGI/pspExXWBQ5yvqam7fTGQDbEWXFGW3I0Lq ytS91BP9qtObKh4PIclLoAymXeuedgj/jOlIAU9N285Q+iLV1ztn2VIVtTCKk2r90Cc7 F/DAsOH5ZUMf29zYfXgR0uIsw1uXadjBGelVscjwcPcRSbtpB3rCIPT8fWh1gK6FFaP0 VCCoYdiUOPT7I4e4NKIG0wxxOuzXwFl2HopOVlkS7A5Gpxfg3EwcQVY3mjR1RbqlNZoV lIEA== X-Gm-Message-State: AOAM530H50JUV8oOXzHltFXQS4ZPocuObA5oICRCzupCWosLuieYr2dg IVwIXAnSL41DKMdhcqlwmdhAkAbLTZQ= X-Google-Smtp-Source: ABdhPJzqVLTbrwm5q50e5t/hSL3vKeVLlMYgjAiW2OkcMaF8fdRiVGJqE57kV26V+kPibqX7aO2t5w== X-Received: by 2002:ac2:4a64:: with SMTP id q4mr2879645lfp.513.1602502615303; Mon, 12 Oct 2020 04:36:55 -0700 (PDT) Original-Received: from muffinmac ([91.206.110.168]) by smtp.gmail.com with ESMTPSA id y5sm1063408lff.179.2020.10.12.04.36.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 04:36:54 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=andreyk.mad@gmail.com; helo=mail-lf1-x131.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190311 Archived-At: --=-=-= Content-Type: text/plain 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! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-NS-Make-s-left-right-to-move-to-beginning-end-of-lin.patch >From ccea06f8b53589cdb1dff20e91f33fd8b8beb0a3 Mon Sep 17 00:00:00 2001 From: Andrii Kolomoiets Date: Mon, 12 Oct 2020 14:24:25 +0300 Subject: [PATCH] NS: Make s- to move to beginning/end of line * lisp/term/ns-win.el: Bind 's-' to 'move-beginning-of-line'; bind 's-' 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-' and 's- 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 --=-=-=--