emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Line-wrapping of 80 character long lines


From: Henrik Holm
Subject: Line-wrapping of 80 character long lines
Date: Mon, 2 Dec 2002 09:32:17 -0600

I am not completely certain whether the emacs-devel mailing list is the right forum -- I *think* this is a feature request (in which case, I have found the right forum) but it might be that it is a support question (in which case, hopefully someone will point me in the direction of gnu.emacs.help). I have looked through the '(emacs) Continuation Lines' and '(emacs) Display Custom' info pages, without finding the answer, though.

I really like the feature of Emacs 21 and higher, that the fringes are used instead of the \ character to indicate when a line has been wrapped.

However, there is one part of this behavior that I find a bit misleading: If a line is exactly 80 characters, it gets "wrapped" -- even if it is not needed. (This applies of course when my Emacs window is 80 characters. If the Emacs window is narrrower, for instance 20 cols as in the example below, the behavior will be similar.)

Consider, for instance, the following lines:

;;
12345678901234567890
;;

In an 20 column wide Emacs 21 buffer, it will look like this:

/----------------------\
| ;;                   |
| 12345678901234567890%|
|%                     |
| ;;                   |
\----------------------/

(In the figure above, I've used '%' for the fringe characters)
Granted, the fringe characters do indicate that the third line is in fact the continuation of line 2. But this isn't readily apparent from a glance. Moreover, as long as I'm not using show-trailing-whitespace, the above behavior leads me to think that there are trailing whitespace on that line. What I would like to see is

/----------------------\
| ;;                   |
| 12345678901234567890 |
| ;;                   |
\----------------------/

and, for the case with a 21 character long line in a 20 column window,

/----------------------\
| ;;                   |
| 12345678901234567890%|
|%1                    |
| ;;                   |
\----------------------/

I can see reasons for having it the way it currently is, though, it is now somewhat reminiscent of the way it works in earlier versions of Emacs. It is not exactly the same, because in earlier versions the line would be continued after the 79th character in order to make room for the '\'. I therefore think there are good reasons for not "wrapping" lines of the same length as the number of columns in the current window. Of course, the behavior could be customizable in order to please the traditionalists :-)


Henrik.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]