GNU bug report logs - #5476
23.1.91; bookmark open info node in fundamental mode

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 25 Jan 2010 21:02:02 UTC

Severity: normal

Done: Karl Fogel <kfogel <at> red-bean.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 5476 in the body.
You can then email your comments to 5476 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Mon, 25 Jan 2010 21:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Jan 2010 21:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.91; bookmark open info node in fundamental mode
Date: Mon, 25 Jan 2010 21:00:58 +0000
1. Emacs -q
2. C-h i m d emacs RET
3. C-x r m RET
4. C-x r b and select the bookmark in step 3 (It is 'top' in my case)

The info will be opened in fundamental mode. Tested with bookmark.el
from the devel repo.

In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0 AppKit 949.54)
 of 2010-01-01 on victoria.local
Windowing system distributor `Apple Inc.', version 10.5.8
configured using `configure  '--with-mac' '--prefix=/usr/local/opensource/emacs''




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Mon, 25 Jan 2010 23:38:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Tue, 26 Jan 2010 00:32:07 +0100
Leo <sdl.web <at> gmail.com> writes:

> 1. Emacs -q
> 2. C-h i m d emacs RET
> 3. C-x r m RET
> 4. C-x r b and select the bookmark in step 3 (It is 'top' in my case)
>
> The info will be opened in fundamental mode. Tested with bookmark.el
> from the devel repo.
>
> In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0 AppKit 949.54)
>  of 2010-01-01 on victoria.local
> Windowing system distributor `Apple Inc.', version 10.5.8
> configured using `configure  '--with-mac' '--prefix=/usr/local/opensource/emacs''

The bug come from bookmark-default-handler that now doesn't handle
buffer anymore (only file) thus most info functions are not loaded and
`list*' (Cl) also.

I have fixed bookmark-default-handler, but i will not have the time to
clean and provide a patch until end of week.

-- 
Thierry Volpiatto






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Tue, 26 Jan 2010 00:44:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Tue, 26 Jan 2010 00:42:32 +0000
On 2010-01-25 23:32 +0000, Thierry Volpiatto wrote:
> The bug come from bookmark-default-handler that now doesn't handle
> buffer anymore (only file) thus most info functions are not loaded and
> `list*' (Cl) also.
>
> I have fixed bookmark-default-handler, but i will not have the time to
> clean and provide a patch until end of week.

Thanks for the investigation. I will grab the latest copy when your
patch goes in.

Leo






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Tue, 26 Jan 2010 02:10:03 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Mon, 25 Jan 2010 21:09:20 -0500
>> 1. Emacs -q
>> 2. C-h i m d emacs RET
>> 3. C-x r m RET
>> 4. C-x r b and select the bookmark in step 3 (It is 'top' in my case)
>> 
>> The info will be opened in fundamental mode. Tested with bookmark.el
>> from the devel repo.
>> 
>> In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0 AppKit 949.54)
>> of 2010-01-01 on victoria.local
>> Windowing system distributor `Apple Inc.', version 10.5.8
>> configured using `configure  '--with-mac' '--prefix=/usr/local/opensource/emacs''

> The bug come from bookmark-default-handler that now doesn't handle
> buffer anymore (only file) thus most info functions are not loaded and
> `list*' (Cl) also.

> I have fixed bookmark-default-handler,

I'm not sure that would be right.  Instead, the bookmark for the info
buffer should create a bookmark that uses a different handler.


        Stefan






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Tue, 26 Jan 2010 07:17:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Tue, 26 Jan 2010 08:11:08 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> 1. Emacs -q
>>> 2. C-h i m d emacs RET
>>> 3. C-x r m RET
>>> 4. C-x r b and select the bookmark in step 3 (It is 'top' in my case)
>>> 
>>> The info will be opened in fundamental mode. Tested with bookmark.el
>>> from the devel repo.
>>> 
>>> In GNU Emacs 23.1.91.2 (i386-apple-darwin9.8.0, Carbon Version 1.6.0 AppKit 949.54)
>>> of 2010-01-01 on victoria.local
>>> Windowing system distributor `Apple Inc.', version 10.5.8
>>> configured using `configure  '--with-mac' '--prefix=/usr/local/opensource/emacs''
>
>> The bug come from bookmark-default-handler that now doesn't handle
>> buffer anymore (only file) thus most info functions are not loaded and
>> `list*' (Cl) also.
>
>> I have fixed bookmark-default-handler,
>
> I'm not sure that would be right.  Instead, the bookmark for the info
> buffer should create a bookmark that uses a different handler.

Exactly, it's what does Info-bookmark-jump:

,----
|     (bookmark-default-handler
|      (list* "" `(buffer . ,buf) (bookmark-get-bookmark-record bmk)))))
`----

But for that work bookmark-default-handler have to set a buffer-name
with the buffer info given by the handler.

Actually it doesn't, it use only the filename:

,----
|     (if (not file)
|         (signal 'bookmark-error-no-filename (list 'stringp file))
|       (set-buffer (find-file-noselect file))
`----

So we should add in bookmark-default-handler the info given by handler:

,----
|    (let ((file          (bookmark-get-filename bmk-record))
|   =====>(buf           (bookmark-prop-get bmk-record 'buffer))
|         (forward-str   (bookmark-get-front-context-string bmk-record))
|         (behind-str    (bookmark-get-rear-context-string bmk-record))
|         (place         (bookmark-get-position bmk-record)))
`----

And then something like this: (need to clean for bookmark.el)

,----
| (if (and file (file-readable-p file) (not (buffer-live-p buf)))
|     (with-current-buffer (find-file-noselect file) (setq buf  (buffer-name)))
|     ;; No file found.  See if a non-file buffer exists for this.  If not, raise error.
|     (unless (and buf (get-buffer buf))
|       (signal 'file-error `("Jumping to bookmark" "No such file or directory" file))))
| (set-buffer buf) ;>>>>>>>Now we are in the buffer given by the handler
`----

Though we also need a buffer-name entry in bookmark alist to be able to
bookmark also in all non--filenames bookmarks, but that another thing.
(See bookmark-extension.el).


-- 
Thierry Volpiatto






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Tue, 26 Jan 2010 15:16:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Tue, 26 Jan 2010 10:15:38 -0500
> And then something like this: (need to clean for bookmark.el)

> ,----
> | (if (and file (file-readable-p file) (not (buffer-live-p buf)))
> |     (with-current-buffer (find-file-noselect file) (setq buf  (buffer-name)))
> |     ;; No file found.  See if a non-file buffer exists for this.  If not, raise error.
> |     (unless (and buf (get-buffer buf))
> |       (signal 'file-error `("Jumping to bookmark" "No such file or directory" file))))
> | (set-buffer buf) ;>>>>>>>Now we are in the buffer given by the handler
> `----

Again, I think this would be wrong.  The fix has to be elsewhere, not in
the generic handler.  E.g. in Info-bookmark-jump, maybe.


        Stefan






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5476; Package emacs. (Wed, 27 Jan 2010 18:30:04 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Wed, 27 Jan 2010 19:23:57 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> And then something like this: (need to clean for bookmark.el)
>
>> ,----
>> | (if (and file (file-readable-p file) (not (buffer-live-p buf)))
>> |     (with-current-buffer (find-file-noselect file) (setq buf  (buffer-name)))
>> |     ;; No file found.  See if a non-file buffer exists for this.  If not, raise error.
>> |     (unless (and buf (get-buffer buf))
>> |       (signal 'file-error `("Jumping to bookmark" "No such file or directory" file))))
>> | (set-buffer buf) ;>>>>>>>Now we are in the buffer given by the handler
>> `----
>
> Again, I think this would be wrong.  The fix has to be elsewhere, not in
> the generic handler.  E.g. in Info-bookmark-jump, maybe.

So you have to change completely the way bookmark handlers are
implemented.I think it will create repeated code:
Function similar to bookmark-default-handler (nearly the same) but
specialized for info, if you want to create handler for Gnus, again a
similar function with repeated code, etc...
Or maybe you have a better idea ? ;-)

Actually, bookmark-default-handler, the generic handler, handle only
filename  and return an error if we don't give a filename, IMHO that's
wrong, it should handle filenames _and_ buffers.
With bookmark-default-handler build this way it is then easy to create
handlers for everything (e.g info, gnus, w3m etc...).

-- 
Thierry Volpiatto






Reply sent to Karl Fogel <kfogel <at> red-bean.com>:
You have taken responsibility. (Wed, 08 Dec 2010 08:26:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Wed, 08 Dec 2010 08:26:02 GMT) Full text and rfc822 format available.

Message #28 received at 5476-done <at> debbugs.gnu.org (full text, mbox):

From: Karl Fogel <kfogel <at> red-bean.com>
To: 5476-done <at> debbugs.gnu.org
Subject: Re: bookmark open info node in fundamental mode
Date: Wed, 08 Dec 2010 03:31:38 -0500
I cannot reproduce this using the steps given.  Can you?  Closing for
now, since it's been a while since the report and bookmark.el has
undergone many changes since then.

(See also http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5550#25 .)

-Karl




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Jan 2011 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 170 days ago.

Previous Next


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