GNU bug report logs -
#16090
24.3.50; [PATCH] error when jumping to a doc-view bookmark
Previous Next
Full log
Message #50 received at 16090 <at> debbugs.gnu.org (full text, mbox):
Andreas Politz <politza <at> hochschule-trier.de> writes:
> (let ((page (bookmark-prop-get bmk 'page)))
> (when (not (eq major-mode 'doc-view-mode))
> (doc-view-toggle-display))
> ! (run-with-idle-timer 0 nil
> ! (lambda (buffer page)
> ! (when (and (buffer-live-p buffer)
> ! (window-live-p (get-buffer-window buffer 0)))
> ! (with-selected-window (get-buffer-window buffer 0)
> ! (doc-view-goto-page page))))
> ! (current-buffer) page))))
I just want to mention that even this timer-version acts wrongly when
the display-func of `bookmark-jump' doesn't select the window, because
`get-buffer-window' prefers the selected window.
I don't think that's too much an issue, though, because the provided
interactive bookmark functions use as display-functions only pop- and
switch-to-buffer which will select the window, and then the patch works
fine.
So I'm in favor of committing the patch [before 24.4 is released!] cause
in any case it's better than not being able to open bookmarks to
document files altogether.
The only cleaner way to get it right (I can see) was to change
bookmark.el so that it determines/creates the window to show the buffer
before calling the bookmark handler. But that's a much larger change
possibly affecting many people that have their own bookmark-jump
functions.
Bye,
Tassilo
This bug report was last modified 11 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.