help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: refill paragraph but visually (like visual-line-mode)?


From: Eli Zaretskii
Subject: Re: refill paragraph but visually (like visual-line-mode)?
Date: Wed, 17 Oct 2018 19:00:19 +0300

> From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
> Cc: help-gnu-emacs@gnu.org
> Date: Wed, 17 Oct 2018 12:54:42 +0200
> 
> > It is possible that making the wrap coordinate controllable by users
> > is not too hard, but Someone™ should look at the relevant code and try
> > making it happen.  Maybe we will be lucky.
> >
> > Wanna try it?
> 
> isn’t it what visual-fill-column-mode does?

No, far from it.  visual-fill-column-mode sets the window's display
margins, it doesn't change anything in the display code.

> >> So indentation is broken, and it hard to correctly read afterwards.
> >> I guess this may be complicated to implement, but as emacs auto
> >> indent works most of time, wouldn’t there a way to put visual indent
> >> too?
> >
> > Could be, but again, Someone™ should work on this.  One potential
> > obstacle to negotiate is that, unlike the existing indentation
> > functions, which traverse the buffer in order to find out the
> > indentation of surrounding lines, the display code cannot easily do
> > that, because the display routines are expected to be able to be
> > called with a buffer position from which to start display, and be able
> > to lay out a single screen line without knowing anything about the
> > neighboring lines.  Some algorithm is needed to calculate the right
> > indentation in those cases.
> 
> I was only thinking about some sort of adaptive-wrap-prefix-mode that
> would use indentation of the first line as adaptive-prefix-wrap already
> does.

As I tried to explain above, this kind of algorithm is usually a
non-starter in the display engine.

> > Patches are welcome to implement any of these useful features.
> 
> Patches? do you fill that would be relevant in main emacs?  maybe
> keeping them as packages for a while before, so that to test them?

No need to submit patches for something visual-fill-column-mode
already does well enough.



reply via email to

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