unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3438: please make line-move-visual nil
       [not found]                     ` <F412767261564B7894552DF3D4CEFD16@us.oracle.com>
@ 2009-06-01 17:56                       ` Chong Yidong
       [not found]                       ` <87oct7sur8.fsf@cyd.mit.edu>
  1 sibling, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2009-06-01 17:56 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, 'T.V. Raman', emacs-devel, 'ishikawa', ams,
	stephen

"Drew Adams" <drew.adams@oracle.com> writes:

> 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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                       ` <87oct7sur8.fsf@cyd.mit.edu>
@ 2009-06-01 18:26                         ` Drew Adams
       [not found]                         ` <BC1A0392D51547EE8B5FB84DB20E25C6@us.oracle.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 18:26 UTC (permalink / raw)
  To: 'Chong Yidong'
  Cc: 3438, 'T.V. Raman', emacs-devel, 'ishikawa', ams,
	stephen

> > 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?






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                         ` <BC1A0392D51547EE8B5FB84DB20E25C6@us.oracle.com>
@ 2009-06-01 20:11                           ` Stefan Monnier
       [not found]                           ` <jwvoct71zxc.fsf-monnier+emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2009-06-01 20:11 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

> 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.

I don't know if it's typical, but for most of those kinds of buffers you
describe as "formatted", I think they should at least set truncate-lines.

> 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.

Any major mode is free to (set (make-local-variable 'line-move-visual) nil).
As of now, I don't think any mode bothers to do that.

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

I can't think of any poll which would bring any satisfactory answer to
the discussion.


        Stefan





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                           ` <jwvoct71zxc.fsf-monnier+emacs@gnu.org>
@ 2009-06-01 21:00                             ` Drew Adams
       [not found]                             ` <31703F2EAE7D4CAF8E671B0C18916D01@us.oracle.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 21:00 UTC (permalink / raw)
  To: 'Stefan Monnier'
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

> > 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.
> 
> I don't know if it's typical, but for most of those kinds of 
> buffers you describe as "formatted", I think they should at
> least set truncate-lines.

No reason given. Why?

Why should Buffer List or Info or Man output or grep output or C code or Java
code buffers have `truncate-lines' turned on? Because newlines are intentionally
positioned in such modes, they should use `truncate-lines'? Why would that be?

Is this a diversion to some other topic? What's the relation to the topic at
hand, which is `line-move-visual'?

> > 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.
> 
> Any major mode is free to (set (make-local-variable 
> 'line-move-visual) nil).

For those modes that come with Emacs, it is the Emacs code that would need to do
that. It doesn't happen by spontaneous combustion.

I proposed making the variable always buffer-local. If you don't want to do
that, then yes, each mode for which nil is appropriate would need to do that.

Or the opposite: Switch the default to nil, and let the (relatively fewer?)
modes that use primarily free-form text do (set (make-local-variable
'line-move-visual) t).

> As of now, I don't think any mode bothers to do that.

Of course not. Nothing has been done yet about this issue. That's what the
discussion is about: tailoring `line-move-visual' so that it DTRT.

Which means turn itself off, by default, for non free-text modes, that is, code
modes and modes with formatted text. IMHO.

> > BTW, you didn't answer the questions about the poll.
> > How's it coming along?  Where is it?
> 
> I can't think of any poll which would bring any satisfactory answer to
> the discussion.

"Let them eat cake!"

(Or as the right-wing French government official said back in the day, speaking
of the Nouvelle Caledonian independentistes, "Ever since we stopped listening to
them, we don't hear anything from them anymore.") Poll, what poll?






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                             ` <31703F2EAE7D4CAF8E671B0C18916D01@us.oracle.com>
@ 2009-06-01 21:25                               ` Lennart Borgman
       [not found]                               ` <e01d8a50906011425n486b00ack12eaf32dc4ea1e34@mail.gmail.com>
                                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2009-06-01 21:25 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, T.V. Raman, Chong Yidong, emacs-devel, ishikawa, ams,
	stephen

On Mon, Jun 1, 2009 at 11:00 PM, Drew Adams <drew.adams@oracle.com> wrote:
>
> I proposed making the variable always buffer-local. If you don't want to do
> that, then yes, each mode for which nil is appropriate would need to do that.

I think this is a global feature. Making it buffer local by default is
probably not the best then. It would be on the same level as makeing
the binding of C-n/C-p buffer local by default.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                               ` <e01d8a50906011425n486b00ack12eaf32dc4ea1e34@mail.gmail.com>
@ 2009-06-01 21:33                                 ` Drew Adams
       [not found]                                 ` <2E369A57A535414C8193711D4740ACC5@us.oracle.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 21:33 UTC (permalink / raw)
  To: 'Lennart Borgman'
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

> > I proposed making the variable always buffer-local. If you 
> > don't want to do that, then yes, each mode for which nil
> > is appropriate would need to do that.
> 
> I think this is a global feature. Making it buffer local by default is
> probably not the best then.

Why? No reason given.

But you say "then", as if being a global variable is a reason it shouldn't have
a buffer-local value.

> It would be on the same level as makeing
> the binding of C-n/C-p buffer local by default.

Since we have apparently replaced the classic behavior of `next-line', so it
respects `line-move-visual', yes. (But I personally have no problem if we go
back to the classic behavior, with normal line movement in all buffers.)

If a non-nil value of `line-move-visual' is not appropriate for some (most?)
buffers, but (some people think) it is appropriate for some other buffers, then
that's the obvious conclusion: make it buffer-local.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                 ` <2E369A57A535414C8193711D4740ACC5@us.oracle.com>
@ 2009-06-01 21:56                                   ` Lennart Borgman
  0 siblings, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2009-06-01 21:56 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, T.V. Raman, Chong Yidong, emacs-devel, ishikawa, ams,
	stephen

On Mon, Jun 1, 2009 at 11:33 PM, Drew Adams <drew.adams@oracle.com> wrote:
>> > I proposed making the variable always buffer-local. If you
>> > don't want to do that, then yes, each mode for which nil
>> > is appropriate would need to do that.
>>
>> I think this is a global feature. Making it buffer local by default is
>> probably not the best then.
>
> Why? No reason given.

Yes, I think so. In the next sentence. It is a behaviour that is
expected to be the same in most buffers for at least most new users.
It is on the same level as a key binding.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                             ` <31703F2EAE7D4CAF8E671B0C18916D01@us.oracle.com>
  2009-06-01 21:25                               ` Lennart Borgman
       [not found]                               ` <e01d8a50906011425n486b00ack12eaf32dc4ea1e34@mail.gmail.com>
@ 2009-06-01 22:33                               ` Stefan Monnier
       [not found]                               ` <jwvd49nzizc.fsf-monnier+emacs@gnu.org>
  3 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2009-06-01 22:33 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

>> I don't know if it's typical, but for most of those kinds of 
>> buffers you describe as "formatted", I think they should at
>> least set truncate-lines.

> No reason given. Why?

> Why should Buffer List or Info or Man output or grep output or C code
> or Java code buffers have `truncate-lines' turned on? Because newlines
> are intentionally positioned in such modes, they should use
> `truncate-lines'? Why would that be?

Just goes to show that I misunderstood your notion of "formatted".
I was thinking of buffers like pcl-cvs, VC, dired, buffer-list, ibuffer,
... Not info, not man, not Java, not C (not sure about grep, I like to
set it in grep, but I'm not sure if it's a good idea in general).

> Is this a diversion to some other topic? What's the relation to the
> topic at hand, which is `line-move-visual'?

When truncate-lines is non-nil, visual lines and logical lines coincide,
so line-move-visual doesn't make much difference any more (other than
for proportional text, that is).

> I proposed making the variable always buffer-local.

There would be no benefit to it:
  (set (make-local-variable <foo>) <bar>)
is the standard way for major modes to set variables.


        Stefan





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                               ` <jwvd49nzizc.fsf-monnier+emacs@gnu.org>
@ 2009-06-01 22:52                                 ` Drew Adams
       [not found]                                 ` <C42F1A4E73DE4300868812F6A736BEBC@us.oracle.com>
                                                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 22:52 UTC (permalink / raw)
  To: 'Stefan Monnier'
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

> Just goes to show that I misunderstood your notion of "formatted".
> I was thinking of buffers like pcl-cvs, VC, dired, buffer-list,
> ibuffer, ... Not info, not man, not Java, not C (not sure about
> grep, I like to set it in grep, but I'm not sure if it's a good
> idea in general).

I mentioned Info and Buffer List from the beginning. And I mentioned code
buffers and buffers with tabular formatting as well.

The distinction I made is between buffers that are mostly free-form text, where
newlines are typically not intentionally positioned by the user or by Emacs, and
the other buffers, where they are.

Even for Buffer List, Dired, and the rest you mentioned, do you really "think
they should at least set `truncate-lines'? Is that slated for Emacs 23.2?

> > Is this a diversion to some other topic? What's the relation to the
> > topic at hand, which is `line-move-visual'?
> 
> When truncate-lines is non-nil, visual lines and logical 
> lines coincide, so line-move-visual doesn't make much
> difference any more (other than for proportional text, that is).

True, when the line is not wrapped in any way, there is no line-wrapping. Guess
that's one way to skirt the issue. ;-) The relation to this issue is that with
`truncate-lines' the issue is evacuated and the distinction no longer matters?

"We're trying to decide whether to order fish or meat for the group."
"Just don't eat, then it doesn't matter."

> > I proposed making the variable always buffer-local.
> 
> There would be no benefit to it:
>   (set (make-local-variable <foo>) <bar>)
> is the standard way for major modes to set variables.

I have no problem with _how_ the buffer-local value is set, as long as the
default value set for buffers that are not mostly free-form text is nil.

And I have no problem with it not being buffer-local at all, if the default
value is nil.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                 ` <C42F1A4E73DE4300868812F6A736BEBC@us.oracle.com>
@ 2009-06-01 23:12                                   ` Lennart Borgman
  2009-06-01 23:13                                   ` Eli Zaretskii
                                                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2009-06-01 23:12 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, T.V. Raman, Chong Yidong, emacs-devel, ishikawa, ams,
	stephen

On Tue, Jun 2, 2009 at 12:52 AM, Drew Adams <drew.adams@oracle.com> wrote:
>
> The distinction I made is between buffers that are mostly free-form text, where
> newlines are typically not intentionally positioned by the user or by Emacs, and
> the other buffers, where they are.

Is not that a difficult distinction here? (In a word processor it
would be different.) Exactly how do you do the distinction - as simple
as possible, because if it is useful it must be easy to understand?

One point I mentioned before is that code might look scrambled, but
maybe that point could be cured some way? (If it really have to be
cured ...)





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                 ` <C42F1A4E73DE4300868812F6A736BEBC@us.oracle.com>
  2009-06-01 23:12                                   ` Lennart Borgman
@ 2009-06-01 23:13                                   ` Eli Zaretskii
       [not found]                                   ` <E1MBGhJ-00032F-LR@fencepost.gnu.org>
       [not found]                                   ` <e01d8a50906011612i13b27445k8155fb63ac3fd682@mail.gmail.com>
  3 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2009-06-01 23:13 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, tv.raman.tv, cyd, emacs-devel, chiaki.ishikawa, ams,
	stephen

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: "'Chong Yidong'" <cyd@stupidchicken.com>,
>         "'T.V. Raman'" <tv.raman.tv@gmail.com>, <ams@gnu.org>, <eliz@gnu.org>,
>         <stephen@xemacs.org>,
>         "'Andrew W. Nosenko'" <andrew.w.nosenko@gmail.com>,
>         <emacs-devel@gnu.org>, "'ishikawa'" <chiaki.ishikawa@ubin.jp>,
>         <3438@emacsbugs.donarmstrong.com>
> Date: Mon, 1 Jun 2009 15:52:34 -0700
> 
> I mentioned Info and Buffer List from the beginning. And I mentioned code
> buffers and buffers with tabular formatting as well.
> 
> The distinction I made is between buffers that are mostly free-form text, where
> newlines are typically not intentionally positioned by the user or by Emacs, and
> the other buffers, where they are.

Emacs does not reformat text in Info buffers, except for the header
lines and the "bread-crumbs" lines.  The rest is shown as produced by
makeinfo from the Texinfo sources.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                   ` <E1MBGhJ-00032F-LR@fencepost.gnu.org>
@ 2009-06-01 23:23                                     ` Drew Adams
       [not found]                                     ` <62BF90AF958B432AAEAC88ED045DE035@us.oracle.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 23:23 UTC (permalink / raw)
  To: 'Eli Zaretskii'
  Cc: 3438, tv.raman.tv, cyd, emacs-devel, chiaki.ishikawa, ams,
	stephen

> Emacs does not reformat text in Info buffers, except for the header
> lines and the "bread-crumbs" lines.  The rest is shown as produced by
> makeinfo from the Texinfo sources.

Info presents the _user_ with buffers formatted that way.

How Info does that - whether the info.el code does that or makeinfo does it or
Texinfo does it or the input to Texinfo is preformatted that way - is irrelevant
here.

It's about the _user_.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                   ` <e01d8a50906011612i13b27445k8155fb63ac3fd682@mail.gmail.com>
@ 2009-06-01 23:57                                     ` Drew Adams
  0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-01 23:57 UTC (permalink / raw)
  To: 'Lennart Borgman'
  Cc: 3438, 'T.V. Raman', 'Chong Yidong', emacs-devel,
	'ishikawa', ams, stephen

> > The distinction I made is between buffers that are mostly 
> > free-form text, where newlines are typically not
> > intentionally positioned by the user or by Emacs, and
> > the other buffers, where they are.
> 
> Is not that a difficult distinction here? (In a word processor it
> would be different.) Exactly how do you do the distinction - as simple
> as possible, because if it is useful it must be easy to understand?
> 
> One point I mentioned before is that code might look scrambled, but
> maybe that point could be cured some way? (If it really have to be
> cured ...)

The exact decision for any given mode is not the issue.
Please don't make the perfect into the enemy of the good.

Adjustments can always be made later, based on user feedback wrt particular
modes. The important thing is to decide that non-nil `line-move-visual' should
be reserved, by default, for buffers that mostly have free-form text. That
includes text-mode, mail message buffers, and the like.

Don't search for the gray areas as a means to ignore or avoid a useful general
distinction.

Info is such a gray area. Should Info eventually become unformatted? Sure,
maybe, because most of it is just text. Things can evolve. But today, Info's
visual lines end with newlines. It has menus and headers that end in newlines.
It has code samples. But yes, most of it is just text, for which line endings
are, a priori, meaningless. I wouldn't argue much either way, for Info. Another
gray area is *Help*, for similar reasons.

But even if we disagree about how to treat Info or *Help* today, that's not the
point. To "get" the distinction, look at the extremes, not the middle: Buffer
List vs a text paragraph like this one. Think <pre> in HTML vs <p> (no, it's not
exactly the same thing, but that might help you see the distinction).

Is there a gradient from hot to cold? Of course. But not all meals are best hot,
nor all best cold. You like to eat fried chicken cold, and I like it hot. So
what? Does that mean we must pick one, hot or cold, to apply to all food?

There's individual preference, sure, and users can define buffer-local variables
as they see fit individually. But if we're serving meals for the group then we
need to decide, based on some general rules of thumb. Salad is by default cold;
soup is by default hot.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                     ` <62BF90AF958B432AAEAC88ED045DE035@us.oracle.com>
@ 2009-06-02 15:59                                       ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2009-06-02 15:59 UTC (permalink / raw)
  To: Drew Adams
  Cc: 3438, tv.raman.tv, cyd, emacs-devel, chiaki.ishikawa, ams,
	stephen

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <monnier@iro.umontreal.ca>, <cyd@stupidchicken.com>,
>         <tv.raman.tv@gmail.com>, <ams@gnu.org>, <stephen@xemacs.org>,
>         <andrew.w.nosenko@gmail.com>, <emacs-devel@gnu.org>,
>         <chiaki.ishikawa@ubin.jp>, <3438@emacsbugs.donarmstrong.com>
> Date: Mon, 1 Jun 2009 16:23:50 -0700
> 
> > Emacs does not reformat text in Info buffers, except for the header
> > lines and the "bread-crumbs" lines.  The rest is shown as produced by
> > makeinfo from the Texinfo sources.
> 
> Info presents the _user_ with buffers formatted that way.

No, it does not.  It presents the text exactly as it is on disk, as if
it were a simple text file (well, almost; see above).  There's no
formatting anywhere.

We are probably miscommunicating, because I don't imagine you really
believe that Info buffers are formatted in any way.  They are free
text.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                               ` <jwvd49nzizc.fsf-monnier+emacs@gnu.org>
  2009-06-01 22:52                                 ` Drew Adams
       [not found]                                 ` <C42F1A4E73DE4300868812F6A736BEBC@us.oracle.com>
@ 2009-06-12 17:16                                 ` Drew Adams
       [not found]                                 ` <8982B2CF70794451BE7693392E14AA2A@us.oracle.com>
  3 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-12 17:16 UTC (permalink / raw)
  To: emacs-devel; +Cc: 3438

> > I proposed making the variable always buffer-local.

SM> There would be no benefit to it:
SM>   (set (make-local-variable <foo>) <bar>)
SM> is the standard way for major modes to set variables.

Irrelevant. This is not about how to set the variable, but whether the variable
should always be buffer-local.

`truncate-lines', `word-wrap', and similar variables are all always
buffer-local.  `line-move-visual' should be also, for the same reasons.






^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                 ` <8982B2CF70794451BE7693392E14AA2A@us.oracle.com>
@ 2009-06-12 21:45                                   ` Stefan Monnier
       [not found]                                   ` <jwvvdn1dt40.fsf-monnier+emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2009-06-12 21:45 UTC (permalink / raw)
  To: Drew Adams; +Cc: 3438, emacs-devel

> `truncate-lines', `word-wrap', and similar variables are all always
> buffer-local.

`truncate-lines' is always buffer-local. for historical reasons.
`word-wrap' is buffer-local by mistake.


        Stefan







^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#3438: please make line-move-visual nil
       [not found]                                   ` <jwvvdn1dt40.fsf-monnier+emacs@gnu.org>
@ 2009-06-13  0:19                                     ` Drew Adams
  0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2009-06-13  0:19 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: 3438, emacs-devel

> > > > I proposed making the variable always buffer-local.
> > 
> > SM> There would be no benefit to it:
> > SM> (set (make-local-variable <foo>) <bar>)
> > SM> is the standard way for major modes to set variables.
> > 
> > Irrelevant. This is not about how to set the variable, but 
> > whether the variable should always be buffer-local.
> >
> > `truncate-lines', `word-wrap', and similar variables are
> > all always buffer-local.
> 
> `truncate-lines' is always buffer-local. for historical reasons.
> `word-wrap' is buffer-local by mistake.

Why do you consider the latter a mistake? Is the former a mistake too, but won't
be fixed? Why not, if it's misguided?

And `goal-column', `fill-column, `fill-prefix', `left-margin', `comment-column',
`tab-width', `require-final-newline'? Are they also mistakes?

Put it another way: Which variables that have to do with wrapping, filling,
truncating, target columns, and line/buffer endings are *NOT* always
buffer-local? Which are not mistakes?

And what's the _reason_ you call them mistakes? It's easy to dismiss -
"historical", "mistake" - but why shouldn't they be always buffer-local? What
are the criteria for your judgment?

The only reason you gave was that major modes can make variables buffer local if
they need to. That's doesn't speak to why they would or would not do that.

And if that were the answer, then we would not have _any_ variables that are
always buffer-local - we would just leave it up to major modes to make them
buffer-local as needed. Why don't we expect `comment-column' (for instance) to
simply be made buffer-local by each major mode that needs that?






^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2009-06-13  0:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1LQhf7-00080g-Ek@beryx.hq.kred>
     [not found] ` <87eiue83i7.fsf@cyd.mit.edu>
     [not found]   ` <F91A5F0008874B7F8539F4E38C302A80@us.oracle.com>
     [not found]     ` <87my92dmdt.fsf@cyd.mit.edu>
     [not found]       ` <87eiudewtq.fsf@uwakimon.sk.tsukuba.ac.jp>
     [not found]         ` <831vqdubqy.fsf@gnu.org>
     [not found]           ` <E1M8Rbq-0003xe-NF@fencepost.gnu.org>
     [not found]             ` <6161f3180905270548t3012bc1ah161719ae01db0fb5@mail.gmail.com>
     [not found]               ` <E1MAjTy-0005aE-Iy@fencepost.gnu.org>
     [not found]                 ` <jwvzlcsnkyy.fsf-monnier+emacs@gnu.org>
     [not found]                   ` <5f0ff9220906010736paad9321td86fd52326ebe722@mail.gmail.com>
     [not found]                     ` <F412767261564B7894552DF3D4CEFD16@us.oracle.com>
2009-06-01 17:56                       ` bug#3438: please make line-move-visual nil Chong Yidong
     [not found]                       ` <87oct7sur8.fsf@cyd.mit.edu>
2009-06-01 18:26                         ` Drew Adams
     [not found]                         ` <BC1A0392D51547EE8B5FB84DB20E25C6@us.oracle.com>
2009-06-01 20:11                           ` Stefan Monnier
     [not found]                           ` <jwvoct71zxc.fsf-monnier+emacs@gnu.org>
2009-06-01 21:00                             ` Drew Adams
     [not found]                             ` <31703F2EAE7D4CAF8E671B0C18916D01@us.oracle.com>
2009-06-01 21:25                               ` Lennart Borgman
     [not found]                               ` <e01d8a50906011425n486b00ack12eaf32dc4ea1e34@mail.gmail.com>
2009-06-01 21:33                                 ` Drew Adams
     [not found]                                 ` <2E369A57A535414C8193711D4740ACC5@us.oracle.com>
2009-06-01 21:56                                   ` Lennart Borgman
2009-06-01 22:33                               ` Stefan Monnier
     [not found]                               ` <jwvd49nzizc.fsf-monnier+emacs@gnu.org>
2009-06-01 22:52                                 ` Drew Adams
     [not found]                                 ` <C42F1A4E73DE4300868812F6A736BEBC@us.oracle.com>
2009-06-01 23:12                                   ` Lennart Borgman
2009-06-01 23:13                                   ` Eli Zaretskii
     [not found]                                   ` <E1MBGhJ-00032F-LR@fencepost.gnu.org>
2009-06-01 23:23                                     ` Drew Adams
     [not found]                                     ` <62BF90AF958B432AAEAC88ED045DE035@us.oracle.com>
2009-06-02 15:59                                       ` Eli Zaretskii
     [not found]                                   ` <e01d8a50906011612i13b27445k8155fb63ac3fd682@mail.gmail.com>
2009-06-01 23:57                                     ` Drew Adams
2009-06-12 17:16                                 ` Drew Adams
     [not found]                                 ` <8982B2CF70794451BE7693392E14AA2A@us.oracle.com>
2009-06-12 21:45                                   ` Stefan Monnier
     [not found]                                   ` <jwvvdn1dt40.fsf-monnier+emacs@gnu.org>
2009-06-13  0:19                                     ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).