* Horizontal scrolling right (towards column 0) whenever possible
@ 2008-11-17 17:38 Yevgeniy Makarov
2008-11-18 19:27 ` Yevgeniy Makarov
0 siblings, 1 reply; 2+ messages in thread
From: Yevgeniy Makarov @ 2008-11-17 17:38 UTC (permalink / raw
To: help-gnu-emacs
Hello,
This is an Emacs behavior that could not change for years. It is a
combination of truncated lines, auto-fill, and horizontal scrolling. I
would like to make it so that when auto-fill breaks a line (on typing
Space or Enter), the screen scrolls horizontally to the initial
default position (i.e., when column 0 is visible) whenever this does
not hide the point. Currently, if the second part of the broken line
is long enough, the screen does not scroll right (towards column 0),
even though it could do so.
Here are the steps to reproduce this behavior.
(1) Start Emacs with -q option
(2) Adjust the frame width to 80 characters (with the mouse)
(3) C-x C-f new-text-file.txt
(4) M-x toggle-truncate-lines (to enable)
(5) M-x auto-fill-mode (to enable)
(6) C-u 60 a [Space] C-u 60 a (to create two words 60 characters long
separated by one space)
(7) [Space]
At this point, auto-fill breaks the line, but the screen is not
scrolled horizontally. Therefore, column 0 is hidden, even though
doing "C-x >" to return the screen to the initial position does not
hide the point.
The reason I don't like this behavior is that I often type long lines
(formulas in LaTeX), and it unnerves me when, after the line is
broken, I cannot see the context of what I am typing.
I am using this version of Emacs:
GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
of 2008-09-19 on iridium, modified by Debian
(emacs-snapshot package, version 1:20080919-1~hardy1)
Any help would be appreciated.
Evgeny
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Horizontal scrolling right (towards column 0) whenever possible
2008-11-17 17:38 Horizontal scrolling right (towards column 0) whenever possible Yevgeniy Makarov
@ 2008-11-18 19:27 ` Yevgeniy Makarov
0 siblings, 0 replies; 2+ messages in thread
From: Yevgeniy Makarov @ 2008-11-18 19:27 UTC (permalink / raw
To: help-gnu-emacs
OK, I found the answer.
(setq auto-fill-function (lambda () (do-auto-fill) (set-window-hscroll
(selected-window) 0)))
Evgeny
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-18 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 17:38 Horizontal scrolling right (towards column 0) whenever possible Yevgeniy Makarov
2008-11-18 19:27 ` Yevgeniy Makarov
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.