Subject: bug#3438: please make line-move-visual nil

From: "Drew Adams" <[email-masked]>
Date: Mon, 1 Jun 2009 11:26:58 -0700

> > Please see bug report #3438. All of it is worth reading in 
> > this regard. Note in particular his request to have a
> > buffer-local value for line-move-visual, and to have Dired
> > use nil for this.
> 
> >> In dired mode, when the cursor is near the beginning of a very long
> >> filename (as in near the "AaAaAa..." below , I can't move 
> >> down to the next file by "n" or "cursor down" key anymore(!).
> 
> In Dired, <up> and <down> call dired-previous-line and 
> dired-next-line, which should not be affected by line-move-visual.
> I have not been able to reproduce the reported problem (i.e.,
> getting point stuck in Dired). Maybe the reporter has some unusual
> customizations that are getting in the way.

Ah, you're right. And I even remember that I started to mention Dired as an
example of a formatted buffer in my original post in this thread, and removed it
when I realized this was in fact the case (I used Info and Buffer List as
examples). But I forgot about it when I saw the bug report. Thx.

Dired is an exception in this regard among formatted buffers, so you are correct
that Dired's bindings make it irrelevant for the immediate question.

It does illustrate the general idea, however: line movement in formatted buffers
is often different (should often be different) than it is in free-form text
buffers. In Dired, it is particularly different, since we want point to stay on
the file name - we constrain it to one column for vertical movement.

IOW, Dired has its own buffer-local behavior for line movement, which is even
more reflective of the buffer formatting than usual. If anything, this
strengthens the argument for buffer-specific line movement, rather than
weakening it.

More typically (in formatted buffers), we want to reflect the use of newlines
(they are positioned intentionally) and maintain the current column for line
movement, but there is no single, privileged column (e.g. file name) that we
want to constrain point to, as there is in Dired.

Each formatted buffer could individually define its own line-movement commands,
which amounts to just binding `line-move-visual' to nil around a call to
`next-line'. But that would be a bit silly. Better to just let the variable be
buffer-local. And provide nil as the default value for most formatted buffers.

--

BTW, you didn't answer the questions about the poll. How's it coming along?
Where is it?