* pin the right edge of the text to the right edge of the monitor
@ 2004-01-30 1:03 Dan Jacobson
0 siblings, 0 replies; 3+ messages in thread
From: Dan Jacobson @ 2004-01-30 1:03 UTC (permalink / raw)
Gentlemen, do
$ perl -wle "for (1..50){print 'z' x $((${COLUMNS-99}+10))}" > wide_file
#I.e. make a file with lines longer than your monitor can handle without wrapping.
$ emacs -q --no-site-file wide_file
M-x toggle-truncate-lines
C-e or C-x <
Note how there is tons of space wasted as there is no way to pin the
right edge of the text to the right edge of the monitor.
A C-a gets the left edge of the text nicely fixed to the left edge of
the monitor, but no consideration is given to us right-wingers.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pin the right edge of the text to the right edge of the monitor
[not found] <mailman.1622.1075480427.928.bug-gnu-emacs@gnu.org>
@ 2004-01-30 23:44 ` Barry Margolin
[not found] ` <mailman.1645.1075506337.928.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Barry Margolin @ 2004-01-30 23:44 UTC (permalink / raw)
In article <mailman.1622.1075480427.928.bug-gnu-emacs@gnu.org>,
Dan Jacobson <jidanni@jidanni.org> wrote:
> A C-a gets the left edge of the text nicely fixed to the left edge of
> the monitor, but no consideration is given to us right-wingers.
Since you know the column that you want to be at the right edge, give a
numeric argument to C-x <.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pin the right edge of the text to the right edge of the monitor
[not found] ` <mailman.1645.1075506337.928.bug-gnu-emacs@gnu.org>
@ 2004-02-02 10:04 ` Roland Winkler
0 siblings, 0 replies; 3+ messages in thread
From: Roland Winkler @ 2004-02-02 10:04 UTC (permalink / raw)
Barry Margolin <barmar@alum.mit.edu> writes:
> In article <mailman.1622.1075480427.928.bug-gnu-emacs@gnu.org>,
> Dan Jacobson <jidanni@jidanni.org> wrote:
>
> > A C-a gets the left edge of the text nicely fixed to the left edge of
> > the monitor, but no consideration is given to us right-wingers.
>
> Since you know the column that you want to be at the right edge, give a
> numeric argument to C-x <.
I use the following piece of code in order to let emacs calculate
the numeric argument of scroll-left and scroll-right
(setq auto-show-shift-amount 4)
(defun my-recenter ()
"Center point in window horizontally and vertically."
(interactive)
(recenter)
(if truncate-lines
(let ((eol (save-excursion (end-of-line) (current-column)))
(col (current-column))
(ww (window-width)))
(when (> eol ww)
(scroll-right eol)
(cond ((< (- eol col (/ ww 2)) 0)
(scroll-left (- (+ eol auto-show-shift-amount 1) ww)))
((> col (/ ww 2))
(scroll-left (- col (/ ww 2) -1)))
)))))
(global-set-key "\C-l" 'my-recenter)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-02 10:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-30 1:03 pin the right edge of the text to the right edge of the monitor Dan Jacobson
[not found] <mailman.1622.1075480427.928.bug-gnu-emacs@gnu.org>
2004-01-30 23:44 ` Barry Margolin
[not found] ` <mailman.1645.1075506337.928.bug-gnu-emacs@gnu.org>
2004-02-02 10:04 ` Roland Winkler
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).