From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Unknown Newsgroups: gmane.emacs.bugs Subject: bug#43224: [PATCH] Support horizontal scrolling in the tab line Date: Sat, 05 Sep 2020 16:09:27 +0200 Message-ID: References: Reply-To: =?UTF-8?Q?Reply-to=3A_Daniel_Mart=C3=83=C2=ADn_=3Cmardani29=40yahoo=2Ees?= =?UTF-8?Q?=3E=0A?= 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="40817"; mail-complaints-to="usenet@ciao.gmane.io" To: 43224@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 05 18:06:19 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 1kEahn-000AWF-3R for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 18:06:19 +0200 Original-Received: from localhost ([::1]:33276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEahm-0006YV-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 12:06:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEahW-0006XQ-BU for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 12:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEahW-00008E-24 for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEahV-0005Sz-Sr for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 12:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 16:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.159932193620972 (code B ref -1); Sat, 05 Sep 2020 16:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2020 16:05:36 +0000 Original-Received: from localhost ([127.0.0.1]:43937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEah5-0005SA-UC for submit@debbugs.gnu.org; Sat, 05 Sep 2020 12:05:36 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEYsr-0004TW-RK for submit@debbugs.gnu.org; Sat, 05 Sep 2020 10:09:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEYsr-0005ob-Mn for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 10:09:37 -0400 Original-Received: from sonic309-24.consmr.mail.ir2.yahoo.com ([77.238.179.82]:45037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEYsp-00025c-Cq for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 10:09:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1599314972; bh=gGEO3KXayvyTe0cOvRrXfTpqMt8B/0JM96kBNigx3gY=; h=From:To:Subject:Date:References:From:Subject; b=rsi1g3eA4ht0uWdJoYZ71G7iSMC8cIJS/sIuh52We/2ExXezQ99895YEddi72TR2YnLLpGA7SaD7ZmB70u34tVix1VVmr/XgQrHDInqwyzlBZ26WNSrbAl57DmX0UO60K48TBz6XAqIrvXNEQwz/g5OBRwIlOlf9et1wyLuVgrwomdIQLqqlaKKlcg8H4bqsOcRw4CuCoZI76++pzDQDaeWlEX7N7OgApm3szRwYaKTOQ+n9IZ9Xn6usSnHloIJvB5sILSkMzUMfOUWH0Qp6PevL64kDyaLdESBQ/9+ptIEzLwUdCNaBoqykOImtJxeOA1Z96fdqRkf++MQupzTBng== X-YMail-OSG: sS2vrLsVM1lnvKh2ndjL3P81HeMdHZSO4_UXnNUDwAOx3lbnUf07IVnQhzuQOhx ASSPlusMP5mzJoNVDCRj3d6ALjVhaulYADCm9qu.nakzP60rc_omKQqMBJewXOuu8vmYzEfob9PM Dm9WVQkOdJAXBCpSOmVQ3ZcrDRrxknCL5XzgNts57kZviK.9Hf3WMNgd10qrVRtEg7ocntDDl9gY jXu0CJN7nz5SDl3iorkmMxNR.MCMLMe2fN0Vgry2zN9TERCZ5AqMjyyXF.oKvjZm97dSOQ2bbmnA 2nTHliams4jdvvFt7MI4KIpXWggS7GEfrSWogpij27rsxB3BYKsbatfvYtSS0JID0ZOk7CLUjka. 5m4hW5DWkb4Druz4_gMeavMsZTXvyk0bc9PqpjrzAiv4zxjaqCVYZl6mg2AKfeB6PEF.MPfMdc47 22JG7L17_bdQm3p16xmeDLXTpLbnqZO.T5xtsTndIo7S.3rdRWyMaYg58J.d5ZInq8bGGzX4HKTx sAbV.WwESmMwaufkE4RwBdCFLjLgJkxCFAjPbOuzqKluvj3nzgyy3fKpMN8J5jUHDIOw3n6iq5eo RBBW2WdcMsWf.L6uelO0KLwZb3qobdUgrNrVAs_6Pquu5iNJkqxJcABFAvHJtEMUdHSHMC.WR9YE Ag3earQQ_.ePHU.0fCbSzYUE_ZzA7p2_PKhFbBn2jqpnmM6CnGovk81UGp5GozK9O4s.R207zKqQ 0yJxLmi.sevtPLJ45PgeA3XFBdszlcNkrpQyiZD.EZ6bEPaUY.QSmeAfU09PFOVydjwo9iCrTGV9 LsisEtnj7CMQenk_g4vA6lfza5kxcOMyoaTLgKNUgY Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ir2.yahoo.com with HTTP; Sat, 5 Sep 2020 14:09:32 +0000 Original-Received: by smtp415.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 778dbb03af6c90d29cdfe3c54b45cf70; Sat, 05 Sep 2020 14:09:30 +0000 (UTC) X-Mailer: WebService/1.1.16565 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=77.238.179.82; envelope-from=mardani29@yahoo.es; helo=sonic309-24.consmr.mail.ir2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/05 10:09:32 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 05 Sep 2020 12:05:34 -0400 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" Original-From: Xref: news.gmane.io gmane.emacs.bugs:187274 Archived-At: --=-=-= Content-Type: text/plain First of all, thank you for the tab bar and tab line implementation in Emacs 27.1. While using the feature, I found a possible improvement: Add support for horizontal scrolling if your mouse or trackpad supports it. The motivation for this change is that, as the tab line is a horizontal UI, it makes sense to support horizontal scrolling if the hardware supports it, as the scrolling feels more natural. If you agree with the proposed feature, I've attached a patch that implements it. Feel free to leave any review comments. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-support-for-horizontal-scrolling-in-tab-line.patch >From 722760083b644bb565b5b69f0fccb50cb8946d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sat, 5 Sep 2020 15:49:33 +0200 Subject: [PATCH] Add support for horizontal scrolling in tab-line * lisp/tab-line.el ([tab-line wheel-left]): Bind left and right tab line scrolling to the 'wheel-left' and 'wheel-right' mouse events. ([tab-line S-wheel-right]): Analogous change for the functions that switch tabs. * etc/NEWS: Announce the new feature. --- etc/NEWS | 4 ++++ lisp/tab-line.el | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 749b28ac3f..954f8c8cc7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -206,6 +206,10 @@ of the next command to be displayed in a new tab. Show/hide the tab bar independently for each frame, according to the value of 'tab-bar-show'. +*** The tabs in the tab line can now be scrolled using horizontal scroll. +If your mouse or trackpad supports it, you can now scroll tabs when +the mouse pointer is in the tab line by scrolling left or right. + ** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and 'previous-error-no-select' bound to 'p'. diff --git a/lisp/tab-line.el b/lisp/tab-line.el index e8c4dc4d93..40f80959cc 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -764,11 +764,15 @@ global-tab-line-mode (global-set-key [tab-line mouse-5] 'tab-line-hscroll-right) (global-set-key [tab-line wheel-up] 'tab-line-hscroll-left) (global-set-key [tab-line wheel-down] 'tab-line-hscroll-right) +(global-set-key [tab-line wheel-left] 'tab-line-hscroll-left) +(global-set-key [tab-line wheel-right] 'tab-line-hscroll-right) (global-set-key [tab-line S-mouse-4] 'tab-line-switch-to-prev-tab) (global-set-key [tab-line S-mouse-5] 'tab-line-switch-to-next-tab) (global-set-key [tab-line S-wheel-up] 'tab-line-switch-to-prev-tab) (global-set-key [tab-line S-wheel-down] 'tab-line-switch-to-next-tab) +(global-set-key [tab-line S-wheel-left] 'tab-line-switch-to-prev-tab) +(global-set-key [tab-line S-wheel-right] 'tab-line-switch-to-next-tab) (provide 'tab-line) -- 2.28.0 --=-=-=--