unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#5476: 23.1.91; bookmark open info node in fundamental mode
Date: Wed, 27 Jan 2010 19:23:57 +0100	[thread overview]
Message-ID: <87tyu7s8xu.fsf@tux.homenetwork> (raw)
In-Reply-To: <m08wblj3w5.fsf@cam.ac.uk>

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	other threads:[~2010-01-27 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-12-08  8:31 ` bug#5476: " Karl Fogel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tyu7s8xu.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).