bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5476: 23.1.91; bookmark open info node in fundamental mode


From: Thierry Volpiatto
Subject: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Wed, 27 Jan 2010 19:23:57 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux)

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








reply via email to

[Prev in Thread] Current Thread [Next in Thread]