unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* line-move-ignore-invisible and global-disable-point-adjustment
@ 2008-01-04 19:10 Stefan Monnier
  2008-01-05 10:20 ` martin rudalics
  2008-01-05 14:31 ` Richard Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Monnier @ 2008-01-04 19:10 UTC (permalink / raw)
  To: emacs-devel


I propose to remove line-move-ignore-invisible and make line-move use
(not global-disable-point-adjustment) instead.

It is difficult to get line-move working correctly.  Recently there have
been bugs that only appeared for some combinations of
line-move-ignore-invisible and global-disable-point-adjustment, more
specifically for the case where both were nil.

There has not been any compelling evidence that users would ever want to
set both of those to nil or both to t, other than by accident, so by
removing those 2 cases we get to eliminate some bugs and also we get to
avoid having to figure what actually *means* a combination such as "nil
and nil" or "t and t".

If we agree that this is a good change, then comes the second part of
the discussion which is about how to go about doing it: since the value
of the those vars should be the negative of the other, we can't just use
defvaralias, so we'll have to declare line-move-ignore-invisible as
obsolete but still make it work (more or less) as before.


        Stefan

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

* Re: line-move-ignore-invisible and global-disable-point-adjustment
  2008-01-04 19:10 line-move-ignore-invisible and global-disable-point-adjustment Stefan Monnier
@ 2008-01-05 10:20 ` martin rudalics
  2008-01-05 14:31 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: martin rudalics @ 2008-01-05 10:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

 > There has not been any compelling evidence that users would ever want to
 > set both of those to nil or both to t, other than by accident, so by
 > removing those 2 cases we get to eliminate some bugs and also we get to
 > avoid having to figure what actually *means* a combination such as "nil
 > and nil" or "t and t".

We could finally concentrate on finding the "real" bugs here.

 > If we agree that this is a good change, then comes the second part of
 > the discussion which is about how to go about doing it: since the value
 > of the those vars should be the negative of the other, we can't just use
 > defvaralias, so we'll have to declare line-move-ignore-invisible as
 > obsolete but still make it work (more or less) as before.

Give `line-move-ignore-invisible' the initial value `undecided', replace
all occurrences where `line-move-ignore-invisible' is set in current
Emacs by a corresponding setting of `global-disable-point-adjustment',
leave a note in the doc-string of `line-move-ignore-invisible' that this
variable is considered obsolete, and change the manual accordingly.

Now the code in `line-move-1' would do the same thing as usual for
`line-move-ignore-invisible' iff the value of this is _nil_, that is,
someone has explicitly set it despite of the obsolescence warning.  If
it's t and `global-disable-point-adjustment' is t too, the latter would
prevail.

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

* Re: line-move-ignore-invisible and global-disable-point-adjustment
  2008-01-04 19:10 line-move-ignore-invisible and global-disable-point-adjustment Stefan Monnier
  2008-01-05 10:20 ` martin rudalics
@ 2008-01-05 14:31 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2008-01-05 14:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

    I propose to remove line-move-ignore-invisible and make line-move use
    (not global-disable-point-adjustment) instead.

It might be a good idea.  I can't think (off hand) of any reason
why it would be bad.  But I suggest not embedding this decision
into the code, just in case this needs to be reverted.

For the implementation method, I suggest making line-move test both
variables using `or'.

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

end of thread, other threads:[~2008-01-05 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-04 19:10 line-move-ignore-invisible and global-disable-point-adjustment Stefan Monnier
2008-01-05 10:20 ` martin rudalics
2008-01-05 14:31 ` Richard Stallman

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