* bug#30747: Emacs lacks a command to horizontally recenter
@ 2018-03-08 3:01 積丹尼 Dan Jacobson
2018-03-08 10:06 ` Marcin Borkowski
2021-06-25 14:46 ` Lars Ingebrigtsen
0 siblings, 2 replies; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2018-03-08 3:01 UTC (permalink / raw)
To: 30747
Emacs has fancy commands to vertically recenter,
C-l runs the command recenter-top-bottom.
But alas no command to horizontally recenter.
All it has are the commands on
(info "(emacs) Horizontal Scrolling") Not good enough.
"It's just not fair." "Thin is in, fat is shat."
The future horizontal-recenter command (please implement) should keep
the cursor upon the same character (x), but just move the view screen ([
]) so that x is now in the center.
......[.......x..]...... BEFORE
.........[....x.....]... AFTER
Also at the end of (info "(emacs) Recentering")
add
The above all refers to vertical recentering. For horizontal recentering
see (info "(emacs) Horizontal Scrolling").
And on (info "(emacs) Horizontal Scrolling") add the above newly
implemented command, and at the bottom of course mention:
The above all refers to horizontal scrolling/recentering. For vertical recentering
see (info "(emacs) Recentering").
P.S.,
[..x.......]..... BEFORE
[..x.......]..... AFTER
i.e., nothing, is probably what should happen if there is no room to
pull from the left.
P.P.S., each "." represents around 10 characters.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2018-03-08 3:01 bug#30747: Emacs lacks a command to horizontally recenter 積丹尼 Dan Jacobson
@ 2018-03-08 10:06 ` Marcin Borkowski
2018-03-08 10:35 ` Werner LEMBERG
2021-06-25 14:46 ` Lars Ingebrigtsen
1 sibling, 1 reply; 9+ messages in thread
From: Marcin Borkowski @ 2018-03-08 10:06 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 30747
On 2018-03-08, at 04:01, 積丹尼 Dan Jacobson <jidanni@jidanni.org> wrote:
> Emacs has fancy commands to vertically recenter,
> C-l runs the command recenter-top-bottom.
>
> But alas no command to horizontally recenter.
Good point. I'm all for a horizontal recenter command (maybe disabled
by default).
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2018-03-08 10:06 ` Marcin Borkowski
@ 2018-03-08 10:35 ` Werner LEMBERG
0 siblings, 0 replies; 9+ messages in thread
From: Werner LEMBERG @ 2018-03-08 10:35 UTC (permalink / raw)
To: mbork; +Cc: 30747, jidanni
>> Emacs has fancy commands to vertically recenter,
>> C-l runs the command recenter-top-bottom.
>>
>> But alas no command to horizontally recenter.
>
> Good point. I'm all for a horizontal recenter command (maybe
> disabled by default).
Indeed. This could be quite helpful in editing and viewing very long
lines.
Werner
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2018-03-08 3:01 bug#30747: Emacs lacks a command to horizontally recenter 積丹尼 Dan Jacobson
2018-03-08 10:06 ` Marcin Borkowski
@ 2021-06-25 14:46 ` Lars Ingebrigtsen
2021-06-25 14:59 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-25 14:46 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 30747
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> Emacs has fancy commands to vertically recenter,
> C-l runs the command recenter-top-bottom.
>
> But alas no command to horizontally recenter.
>
> All it has are the commands on
> (info "(emacs) Horizontal Scrolling") Not good enough.
>
> "It's just not fair." "Thin is in, fat is shat."
>
> The future horizontal-recenter command (please implement) should keep
> the cursor upon the same character (x), but just move the view screen ([
> ]) so that x is now in the center.
>
> ......[.......x..]...... BEFORE
> .........[....x.....]... AFTER
So this would only be for buffers where truncate-lines is non-nil? Yes,
it'd be handy to have such a command... or perhaps `C-l' should just do
this automatically (in these buffers)?
Any opinions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2021-06-25 14:46 ` Lars Ingebrigtsen
@ 2021-06-25 14:59 ` Eli Zaretskii
2021-06-26 12:49 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-06-25 14:59 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 30747, jidanni
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 25 Jun 2021 16:46:28 +0200
> Cc: 30747@debbugs.gnu.org
>
> > The future horizontal-recenter command (please implement) should keep
> > the cursor upon the same character (x), but just move the view screen ([
> > ]) so that x is now in the center.
> >
> > ......[.......x..]...... BEFORE
> > .........[....x.....]... AFTER
>
> So this would only be for buffers where truncate-lines is non-nil?
No, also in partial-width windows (as in after "C-x 3").
> Yes, it'd be handy to have such a command... or perhaps `C-l'
> should just do this automatically (in these buffers)?
>
> Any opinions?
Since lines are generally not all of the same width, such horizontal
scrolling can only guarantee to center one line, and sometimes cannot
center it at all (if it's narrower than the window). I wonder whether
the OP indeed understands what he will get as result of implementing
this feature.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2021-06-25 14:59 ` Eli Zaretskii
@ 2021-06-26 12:49 ` Lars Ingebrigtsen
2021-06-26 12:58 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-26 12:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30747, jidanni
Eli Zaretskii <eliz@gnu.org> writes:
> Since lines are generally not all of the same width, such horizontal
> scrolling can only guarantee to center one line, and sometimes cannot
> center it at all (if it's narrower than the window). I wonder whether
> the OP indeed understands what he will get as result of implementing
> this feature.
The centring would be based on the current line, yes. But horizontal
centring is mostly useful when you have a display that's much wider than
your window width, which can happen i deeply nested threads in Gnus, for
instance.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2021-06-26 12:49 ` Lars Ingebrigtsen
@ 2021-06-26 12:58 ` Eli Zaretskii
2021-06-26 15:21 ` 積丹尼 Dan Jacobson
2021-06-30 11:58 ` Lars Ingebrigtsen
0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-06-26 12:58 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 30747, jidanni
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: jidanni@jidanni.org, 30747@debbugs.gnu.org
> Date: Sat, 26 Jun 2021 14:49:17 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Since lines are generally not all of the same width, such horizontal
> > scrolling can only guarantee to center one line, and sometimes cannot
> > center it at all (if it's narrower than the window). I wonder whether
> > the OP indeed understands what he will get as result of implementing
> > this feature.
>
> The centring would be based on the current line, yes.
So when one goes one line up or down, one would need to recenter?
> But horizontal
> centring is mostly useful when you have a display that's much wider than
> your window width, which can happen i deeply nested threads in Gnus, for
> instance.
Doesn't auto-hscroll-mode = current-line take care of that?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2021-06-26 12:58 ` Eli Zaretskii
@ 2021-06-26 15:21 ` 積丹尼 Dan Jacobson
2021-06-30 11:58 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-06-26 15:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30747, Lars Ingebrigtsen
> I wonder whether the OP indeed understands what he will get as result
> of implementing this feature.
Well whatever you do, don't forcibly glue vertical and horizontal
centering to the same key... for now at least.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#30747: Emacs lacks a command to horizontally recenter
2021-06-26 12:58 ` Eli Zaretskii
2021-06-26 15:21 ` 積丹尼 Dan Jacobson
@ 2021-06-30 11:58 ` Lars Ingebrigtsen
1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-30 11:58 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30747, jidanni
Eli Zaretskii <eliz@gnu.org> writes:
> So when one goes one line up or down, one would need to recenter?
If you want to recenter, then you recenter.
>> But horizontal
>> centring is mostly useful when you have a display that's much wider than
>> your window width, which can happen i deeply nested threads in Gnus, for
>> instance.
>
> Doesn't auto-hscroll-mode = current-line take care of that?
If somebody wants to do that, then that's up to them, but this is about
a command that'll recenter the display horizontally. And that setting
doesn't help with that.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-06-30 11:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-08 3:01 bug#30747: Emacs lacks a command to horizontally recenter 積丹尼 Dan Jacobson
2018-03-08 10:06 ` Marcin Borkowski
2018-03-08 10:35 ` Werner LEMBERG
2021-06-25 14:46 ` Lars Ingebrigtsen
2021-06-25 14:59 ` Eli Zaretskii
2021-06-26 12:49 ` Lars Ingebrigtsen
2021-06-26 12:58 ` Eli Zaretskii
2021-06-26 15:21 ` 積丹尼 Dan Jacobson
2021-06-30 11:58 ` Lars Ingebrigtsen
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).