* auto-hscroll only the current line in a window
@ 2017-05-18 20:31 Eli Zaretskii
2017-05-18 22:13 ` Stephen Berman
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-05-18 20:31 UTC (permalink / raw)
To: emacs-devel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-hscroll only the current line in a window
2017-05-18 20:31 auto-hscroll only the current line in a window Eli Zaretskii
@ 2017-05-18 22:13 ` Stephen Berman
2017-05-19 1:24 ` Kaushal Modi
2017-05-19 7:04 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Stephen Berman @ 2017-05-18 22:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On Thu, 18 May 2017 23:31:48 +0300 Eli Zaretskii <eliz@gnu.org> 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: auto-hscroll only the current line in a window
2017-05-18 22:13 ` Stephen Berman
@ 2017-05-19 1:24 ` Kaushal Modi
2017-05-19 7:04 ` Eli Zaretskii
1 sibling, 0 replies; 6+ messages in thread
From: Kaushal Modi @ 2017-05-19 1:24 UTC (permalink / raw)
To: Stephen Berman, Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
On Thu, May 18, 2017 at 6:14 PM Stephen Berman <stephen.berman@gmx.net>
wrote:
> 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):
>
+1 for both "works well" and "needs updating the Customize options for
auto-hscroll-mode".
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 856 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-hscroll only the current line in a window
2017-05-18 22:13 ` Stephen Berman
2017-05-19 1:24 ` Kaushal Modi
@ 2017-05-19 7:04 ` Eli Zaretskii
2017-05-19 9:43 ` Stephen Berman
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-05-19 7:04 UTC (permalink / raw)
To: Stephen Berman; +Cc: emacs-devel
> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: emacs-devel@gnu.org
> Date: Fri, 19 May 2017 00:13:47 +0200
>
> I just tried it and it seems to work well and looks pretty nice.
Thanks. I feel that somehow there's sheer luck here, because I _know_
some display-related code cannot possibly work right with this mode.
But maybe it's somehow avoided, at least in most use cases.
> One thing missing is an update of the Customize interface for this
> user option
Right, fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-hscroll only the current line in a window
2017-05-19 7:04 ` Eli Zaretskii
@ 2017-05-19 9:43 ` Stephen Berman
2017-05-19 22:18 ` Kaushal Modi
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Berman @ 2017-05-19 9:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On Fri, 19 May 2017 10:04:05 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: emacs-devel@gnu.org
>> Date: Fri, 19 May 2017 00:13:47 +0200
>>
>> I just tried it and it seems to work well and looks pretty nice.
>
> Thanks. I feel that somehow there's sheer luck here, because I _know_
> some display-related code cannot possibly work right with this mode.
> But maybe it's somehow avoided, at least in most use cases.
>
>> One thing missing is an update of the Customize interface for this
>> user option
>
> Right, fixed.
Thanks; however, the value for scrolling only the current line should
not be quoted (quoting just makes it equivalent to t). I fixed this in
cecd99d826.
I also found two (probably related) display bugs with the new feature
and reported these as bug#26994.
Steve Berman
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-hscroll only the current line in a window
2017-05-19 9:43 ` Stephen Berman
@ 2017-05-19 22:18 ` Kaushal Modi
0 siblings, 0 replies; 6+ messages in thread
From: Kaushal Modi @ 2017-05-19 22:18 UTC (permalink / raw)
To: Stephen Berman, Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
I am digging this new feature.
I was searching for a string and it happened to be on the truncated side.
With horz scrolling enabled for current line, the isearch experience was
pleasantly surprising :)
GIF animation: Observe the search hit on line 95 as I C-s and C-r around
that line a few times.
http://i.imgur.com/OdkqjAQ.gifv
Thanks!
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 614 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-19 22:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 20:31 auto-hscroll only the current line in a window Eli Zaretskii
2017-05-18 22:13 ` Stephen Berman
2017-05-19 1:24 ` Kaushal Modi
2017-05-19 7:04 ` Eli Zaretskii
2017-05-19 9:43 ` Stephen Berman
2017-05-19 22:18 ` Kaushal Modi
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).