concept of margin comes to emacs?

On Aug 12, 4:31 am, Teemu Likonen wrote:
> On 2009-08-12 11:23 (UTC), Vincent Lefevre wrote:
> > Otherwise one can still use the Long Lines mode (longlines-mode, that
> > was already present in Emacs 22), which shows the logical lines in
> > some other way: with a character ("|" in Emacs 22, "¶" in Emacs 23) in
> > a different color at the end of the logical line (but with the
> > longlines mode, the show-trailing-whitespace variable has no effect).
> One can pretty much replace longlines-mode with this:
> (visual-line-mode 1)
> (whitespace-newline-mode 1)
> (setq fill-column 999999)
> This is nicer because longlines-mode is a hack which actually modifies
> the buffer in order to differentiate between hard and soft newlines.
> Emacs 23 has this proper way of doing it.

there's one functionality in longlines-mode that the above does not replace thoguh. Namely, setting up a right margin.

with longlines-mode, the rigth margin is the value of fill-column.

sometimes your window is wide, and you don't want long lines to go from left to all the way to the right. In word processors, you can set a right margin. Similarly, you can go into longlines-mode, and set fill-column to 50 or so.

typically, emacs geeks will say “you can just adjust your window width so your window isn't as wide”. But that solution is not so good, because you do want wide window in general, just not when displaying that particular file. For example, imagine word processors doesn't have the right margin feature, and for every file, they'll need to adjust window size in order to display the lines right.

I hope some concept of ruler/margin can come to emacs.

∑ http://xahlee.org/

No comments:

Post a Comment