emacs-devel
[Top][All Lists]
Advanced

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

Re: visual-line-mode and line wrapping


From: Leo
Subject: Re: visual-line-mode and line wrapping
Date: Mon, 24 May 2010 20:18:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On 2010-05-24 18:34 +0100, Stefan Monnier wrote:
>> In the discussion of the trashbin feature, visual-line-mode came up.
>> It seems many of us would like it to be able to wrap lines at
>> a position other than the window edge.
>
> I still haven't heard any good argument for it, as compared to using
> wide fringes, wide margins, or by splitting windows.

There's clearly desire for it. Otherwise Lennart wouldn't have created
that wrap fill mode. Screens are getting wider so having lines of 200
chars is painful to read. Would be nice if 'visual-line-mode' gives user
an option to set a maximum width.

Using fringes or margins (now that I have tried it and I can imagine how
Lennart implement his mode) are all workarounds and they are not much
different than opening up a frame with the desired width but then it is
a waste of screen estate and it has impact on productivity.

> I do think it could make sense in one case: when you want the
> wrap-width to be larger than the window-width.  But AFAICT nobody has
> asked for that yet.
> 
> You can also split the window to set its width as desired. That will let
> you use the extra horizontal space for something useful.

This is also another workaround, something I have been doing myself for
quite a while now with this tiny function.

(defun adhoc-workspace-setup ()
  (interactive)
  (delete-other-windows (get-largest-window))
  (save-selected-window
    (split-window-horizontally (floor (* 0.6 (frame-parameter nil
  'width))))
    (switch-to-buffer-other-window nil t)))

The thing is very easy to lose the setup, C-x 1, switch buffer etc etc.
If I save the setup to a register it also restores the point, something
quite annoying when writing.

>         Stefan

Leo



reply via email to

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