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: Tue, 26 Jan 2010 08:11:08 +0100 [thread overview]
Message-ID: <877hr5pchf.fsf@tux.homenetwork> (raw)
In-Reply-To: <m08wblj3w5.fsf@cam.ac.uk>
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
next prev parent reply other threads:[~2010-01-26 7:11 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 [this message]
2010-01-26 15:15 ` Stefan Monnier
2010-01-27 18:23 ` Thierry Volpiatto
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=877hr5pchf.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).