* bug#43224: [PATCH] Support horizontal scrolling in the tab line
[not found] <m1lfho2u3s.fsf.ref@yahoo.es>
@ 2020-09-05 14:09 ` Unknown
2020-09-07 15:11 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Unknown @ 2020-09-05 14:09 UTC (permalink / raw)
To: 43224
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#43224: [PATCH] Support horizontal scrolling in the tab line
2020-09-05 14:09 ` bug#43224: [PATCH] Support horizontal scrolling in the tab line Unknown
@ 2020-09-07 15:11 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-07 15:11 UTC (permalink / raw)
To: Daniel Martín; +Cc: 43224
Daniel Martín <mardani29@yahoo.es> writes:
> 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.
Thanks for the patch! Looks good to me, so I've now applied it to Emacs
28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-07 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <m1lfho2u3s.fsf.ref@yahoo.es>
2020-09-05 14:09 ` bug#43224: [PATCH] Support horizontal scrolling in the tab line Unknown
2020-09-07 15:11 ` Lars Ingebrigtsen
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.