GNU bug report logs - #1175
23.0.60; bookmark code regression

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 15 Oct 2008 21:00:02 UTC

Severity: normal

Tags: wontfix

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1175 in the body.
You can then email your comments to 1175 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.60; bookmark code regression
Date: Wed, 15 Oct 2008 13:51:27 -0700
Please, please restore the sane behavior of `bookmark-jump-noselect'
as it was for Emacs 22: it should return a cons (BUFFER . POINT)
when a bookmark is located.
 
This breaks third-party code that calls `bookmark-jump-noselect'.
 
 
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-10-03 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
 





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 1175 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: 1175 <at> debbugs.gnu.org
Subject: Re: 23.0.60; bookmark code regression
Date: Thu, 16 Oct 2008 13:36:34 -0400
Stefan, I guess this is your change.

"Drew Adams" <drew.adams <at> oracle.com> wrote:

> Please, please restore the sane behavior of `bookmark-jump-noselect'
> as it was for Emacs 22: it should return a cons (BUFFER . POINT)
> when a bookmark is located.
> 
> This breaks third-party code that calls `bookmark-jump-noselect'.
 




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 1175 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 1175 <at> debbugs.gnu.org
Subject: Re: 23.0.60; bookmark code regression
Date: Tue, 21 Oct 2008 12:54:56 -0400
> Please, please restore the sane behavior of `bookmark-jump-noselect'
> as it was for Emacs 22: it should return a cons (BUFFER . POINT) when
> a bookmark is located.

I discussed with Stefan.  Since bookmark-jump-noselect is an internal
function of bookmark.el, we don't guarantee that its behavior is
unchanged across Emacs versions.  Furthermore, the
bookmark-jump-noselect not only returned (BUFFER . POINT) but also
preserved the current buffer (and point) instead of changing buffer and
moving point, whereas the new version does change buffer and point.  So
it doesn't make sense to change the return value of the new version.




Tags added: wontfix Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Tue, 21 Oct 2008 17:05:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #22 received at 1175 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Chong Yidong'" <cyd <at> stupidchicken.com>
Cc: <1175 <at> debbugs.gnu.org>
Subject: RE: 23.0.60; bookmark code regression
Date: Tue, 21 Oct 2008 10:53:09 -0700
> > Please, please restore the sane behavior of `bookmark-jump-noselect'
> > as it was for Emacs 22: it should return a cons (BUFFER . 
> > POINT) when a bookmark is located.
> 
> I discussed with Stefan.  Since bookmark-jump-noselect is an internal
> function of bookmark.el, we don't guarantee that its behavior is
> unchanged across Emacs versions.  Furthermore, the
> bookmark-jump-noselect not only returned (BUFFER . POINT) but also
> preserved the current buffer (and point) instead of changing 
> buffer and moving point, whereas the new version does change buffer
> and point.  So it doesn't make sense to change the return value of
> the new version.

I was afraid you might come back with a copout such as saying it is an
internal-only function. I disagree, obviously, or I wouldn't have filed the bug.

This is analogous to `find-file-noselect'. `bookmark-jump-noselect' is an
obvious choice for some function to call, to obtain the bookmark buffer and
buffer position. Without actually displaying it - perhaps because some other
display mechanism is preferred or perhaps because some other manipulation is to
be performed.

You have decided to couple (hard-code) obtaining the buffer and position with
the act of displaying it. Bad design.

It is irrelevant whether the old and new `bookmark-jump-noselect's differ in
which buffer and position are current after they are called. No one asked you to
preserve the current buffer and point - that's not what this is about. This bug
is about the return value (only).

What's important is to be able to obtain the buffer and position indicated by
the argument BOOKMARK. The only function that does that (er, did that) is
`bookmark-jump-noselect'.

This is what I must do now, to give you an idea:

(let ((cell  (bookmark-jump-noselect bookmark)))
  (when (> emacs-major-version 22) ; UGLY HACK
   (setq cell (cons (current-buffer) (point))))
  (when cell
    ...))

You've given no reason why `bookmark-jump-noselect' should *not* continue to
return (BUFFER . POINT) - none whatsoever.

And you even phrase your refusal in terms of not wanting to *change*: "it
doesn't make sense to change the return value of the new version". What
chutzpah. Emacs 23 has not even been released, so please don't speak of
"changing" from the Emacs 23 behavior to what has always been the behavior
before. That language betrays a myopic view of Emacs development: any difference
from the current behavior is interpreted as a "change" request.

Change is what you've done (with no discussion or change request ;-), it is not
what I'm requesting. You've changed the return value. Please *do not* change it
- return the same value as Emacs always has: (BUFFER . POINT). Restore the
behavior that's been broken.

There is, BTW, nothing truly "internal" when it comes to Emacs, especially when
it comes to Emacs Lisp. And in this case, there is no reason to consider
`buffer-jump-noselect' somehow off-limits for use by others.

And as to guarantees about things not changing from one release to another -
that's a joke. You've never guaranteed backward compatibility even for the most
non-internal of features. Backward compatibility is hardly one of the strong
points of Emacs development. AFAICT, it is no concern whatsoever of the
developers. Whenever it is brought up it is rebuked as a non-concern.

Please reconsider. 

1. There is no other function that provides the buffer and position of a
bookmark. That is one of the obvious uses/purposes of `buffer-jump-noselect' -
or at least it has been until the behavior was broken by this change. Sure, a
user can write such a function using the hack shown above, but s?he shouldn't
have to.

2. There is no reason not to return the same value as before: (BUFFER . POINT).
You have given no such reason, and the return value is not specially used by the
current code. There is no harm in continuing to return something that can be
useful outside `bookmark.el'.

Please try to think more openly, not so narrowly, about the changes you make.
Coupling determination of bookmark location with display is just plain bad. And
unnecessary - nothing is gained by that coupling, and nothing will be lost by
decoupling the two a bit.







Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #27 received at 1175 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Richard M. Stallman" <rms <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>, 1175 <at> debbugs.gnu.org
Cc: cyd <at> stupidchicken.com, bug-submit-list <at> donarmstrong.com,
        1175 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#1175: 23.0.60; bookmark code regression
Date: Wed, 22 Oct 2008 02:20:57 -0400
    This is analogous to `find-file-noselect'. `bookmark-jump-noselect' is an
    obvious choice for some function to call, to obtain the bookmark buffer and
    buffer position. Without actually displaying it - perhaps because some other
    display mechanism is preferred or perhaps because some other manipulation is to
    be performed.

I agree with you.

    Emacs 23 has not even been released, so please don't speak of
    "changing" from the Emacs 23 behavior to what has always been the behavior
    before.

You are right here too.  Compatibility with past Emacs releases
is more important, generally speaking, than avoiding changes in
the sources now.  I am sure this function isn't used in very many places
in Emacs, so changing it back to be compatible won't be a lot of work.

    There is, BTW, nothing truly "internal" when it comes to Emacs,
    especially when it comes to Emacs Lisp.

That doesn't really matter.  There are functions which users should
not call, and if they do, they are out of luck when we change them.

But `bookmark-jump-noselect' should not be treated that way; it is too
natural and useful.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1175; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #37 received at 1175 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 1175 <at> debbugs.gnu.org, "Drew Adams" <drew.adams <at> oracle.com>
Subject: Re: bug#1175: 23.0.60; bookmark code regression
Date: Mon, 27 Oct 2008 09:32:52 -0400
>> Please, please restore the sane behavior of `bookmark-jump-noselect'
>> as it was for Emacs 22: it should return a cons (BUFFER . POINT) when
>> a bookmark is located.
> I discussed with Stefan.  Since bookmark-jump-noselect is an internal
> function of bookmark.el, we don't guarantee that its behavior is
> unchanged across Emacs versions.  Furthermore, the
> bookmark-jump-noselect not only returned (BUFFER . POINT) but also
> preserved the current buffer (and point) instead of changing buffer and
> moving point, whereas the new version does change buffer and point.  So
> it doesn't make sense to change the return value of the new version.

I think there's a slight disagreement: I think it's worthwhile to
preserve the old semantics of bookmark-jump-noselect, but not by
changing the current one: instead, we should rename b-j-n to something
else and write a new b-j-n wrapper.


        Stefan




Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #42 received at 1175-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: 1175-done <at> debbugs.gnu.org
Subject: Re: 23.0.60; bookmark code regression 
Date: Wed, 29 Oct 2008 13:44:55 -0400
I've checked in code that renames bookmark-jump-noselect to
bookmark-handle-bookmark, with a bookmark-jump-noselect wrapper.




bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Thu, 27 Nov 2008 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.