emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-hscroll only the current line in a window


From: Stephen Berman
Subject: Re: auto-hscroll only the current line in a window
Date: Fri, 19 May 2017 00:13:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

On Thu, 18 May 2017 23:31:48 +0300 Eli Zaretskii <address@hidden> wrote:

> Someone on reddit got excited about such a feature in Nano, so I came
> up with its emulation, see the latest trunk.  Give it a try and see if
> you like it.  It looks cool, but I cannot really think why would I
> need it in Real Lifeā„¢.
>
> Caveat: the feature might have some rough edges, and I expect a few of
> them to be insoluble, since some parts of the display engine simply
> cannot work 100% correctly with this feature, without a thorough
> redesign.  But it seemed to work surprisingly well in my testing, so
> maybe the problems only rarely rear their head.  Report any problems
> you see, of course.
>
> Enjoy.

I just tried it and it seems to work well and looks pretty nice.  One
thing missing is an update of the Customize interface for this user
option, perhaps like this (capitalization and style are not consistent
across Customize tags, I used ones that appears several times):

diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 117b23debe..08a2d0f29f 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -556,7 +556,12 @@ minibuffer-prompt-properties--setter
                      (const :tag "Text-image-horiz" :value text-image-horiz)
                      (const :tag "System default" :value nil)) "24.1")
              (tool-bar-max-label-size frames integer "24.1")
-            (auto-hscroll-mode scrolling boolean "21.1")
+            (auto-hscroll-mode scrolling
+                                (choice
+                                (const :tag "Off (nil)" :value nil)
+                                (const :tag "On (t)" :value t)
+                                (const :tag "Current line only" :value 
current-line))
+                                "26.1")
             (void-text-area-pointer cursor
                                     (choice
                                      (const :tag "Standard (text pointer)" 
:value nil)

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]