all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Unknown <unknown@unknown.invalid>
To: 43224@debbugs.gnu.org
Subject: bug#43224: [PATCH] Support horizontal scrolling in the tab line
Date: Sat, 05 Sep 2020 16:09:27 +0200	[thread overview]
Message-ID: <m1lfho2u3s.fsf@yahoo.es> (raw)
In-Reply-To: m1lfho2u3s.fsf.ref@yahoo.es

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-support-for-horizontal-scrolling-in-tab-line.patch --]
[-- Type: text/x-patch, Size: 2138 bytes --]

From 722760083b644bb565b5b69f0fccb50cb8946d32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <mardani29@yahoo.es>
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)
 
 \f
 (provide 'tab-line)
-- 
2.28.0


       reply	other threads:[~2020-09-05 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1lfho2u3s.fsf.ref@yahoo.es>
2020-09-05 14:09 ` Unknown [this message]
2020-09-07 15:11   ` bug#43224: [PATCH] Support horizontal scrolling in the tab line Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1lfho2u3s.fsf@yahoo.es \
    --to=unknown@unknown.invalid \
    --cc=43224@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.