* bug#5476: 23.1.91; bookmark open info node in fundamental mode
@ 2010-01-25 21:00 Leo
2010-01-25 23:32 ` Thierry Volpiatto
2010-12-08 8:31 ` bug#5476: " Karl Fogel
0 siblings, 2 replies; 8+ messages in thread
From: Leo @ 2010-01-25 21:00 UTC (permalink / raw)
To: 5476
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''
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-25 21:00 bug#5476: 23.1.91; bookmark open info node in fundamental mode Leo
@ 2010-01-25 23:32 ` Thierry Volpiatto
2010-01-26 0:42 ` Leo
2010-01-26 2:09 ` Stefan Monnier
2010-12-08 8:31 ` bug#5476: " Karl Fogel
1 sibling, 2 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2010-01-25 23:32 UTC (permalink / raw)
To: bug-gnu-emacs
Leo <sdl.web@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-25 23:32 ` Thierry Volpiatto
@ 2010-01-26 0:42 ` Leo
2010-01-26 2:09 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: Leo @ 2010-01-26 0:42 UTC (permalink / raw)
To: bug-gnu-emacs
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-25 23:32 ` Thierry Volpiatto
2010-01-26 0:42 ` Leo
@ 2010-01-26 2:09 ` Stefan Monnier
2010-01-26 7:11 ` Thierry Volpiatto
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2010-01-26 2:09 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: bug-gnu-emacs
>> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-26 2:09 ` Stefan Monnier
@ 2010-01-26 7:11 ` Thierry Volpiatto
2010-01-26 15:15 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2010-01-26 7:11 UTC (permalink / raw)
To: bug-gnu-emacs
Stefan Monnier <monnier@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-26 7:11 ` Thierry Volpiatto
@ 2010-01-26 15:15 ` Stefan Monnier
2010-01-27 18:23 ` Thierry Volpiatto
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2010-01-26 15:15 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: bug-gnu-emacs
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: 23.1.91; bookmark open info node in fundamental mode
2010-01-26 15:15 ` Stefan Monnier
@ 2010-01-27 18:23 ` Thierry Volpiatto
0 siblings, 0 replies; 8+ messages in thread
From: Thierry Volpiatto @ 2010-01-27 18:23 UTC (permalink / raw)
To: bug-gnu-emacs
Stefan Monnier <monnier@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5476: bookmark open info node in fundamental mode
2010-01-25 21:00 bug#5476: 23.1.91; bookmark open info node in fundamental mode Leo
2010-01-25 23:32 ` Thierry Volpiatto
@ 2010-12-08 8:31 ` Karl Fogel
1 sibling, 0 replies; 8+ messages in thread
From: Karl Fogel @ 2010-12-08 8:31 UTC (permalink / raw)
To: 5476-done
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-08 8:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-25 21:00 bug#5476: 23.1.91; bookmark open info node in fundamental mode Leo
2010-01-25 23:32 ` Thierry Volpiatto
2010-01-26 0:42 ` Leo
2010-01-26 2:09 ` Stefan Monnier
2010-01-26 7:11 ` Thierry Volpiatto
2010-01-26 15:15 ` Stefan Monnier
2010-01-27 18:23 ` Thierry Volpiatto
2010-12-08 8:31 ` bug#5476: " Karl Fogel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.