unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Andreas Politz <politza@hochschule-trier.de>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 16090@debbugs.gnu.org
Subject: bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark
Date: Fri, 20 Dec 2013 09:00:17 +0100	[thread overview]
Message-ID: <87txe4j6jy.fsf@thinkpad.tsdh.org> (raw)
In-Reply-To: <87a9gbb7wi.fsf@hochschule-trier.de> (Andreas Politz's message of "Sun, 08 Dec 2013 17:54:21 +0100")

Andreas Politz <politza@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





  parent reply	other threads:[~2013-12-20  8:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08 16:54 bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark Andreas Politz
2013-12-09  9:13 ` Tassilo Horn
2013-12-09 12:33   ` Andreas Politz
2013-12-09 14:56     ` Tassilo Horn
2013-12-09 16:55   ` Glenn Morris
2013-12-10  7:28     ` Tassilo Horn
2013-12-10  2:51 ` Stefan Monnier
2013-12-10  7:53   ` Tassilo Horn
2013-12-10 10:02     ` Andreas Politz
2013-12-10 11:58       ` Andreas Politz
2013-12-10 16:56     ` Andreas Politz
2013-12-10 20:07       ` Tassilo Horn
2013-12-10 22:16         ` Andreas Politz
2013-12-11  4:43     ` Stefan Monnier
2013-12-11 19:08       ` Tassilo Horn
2013-12-20  8:00 ` Tassilo Horn [this message]
2013-12-20  8:28   ` Andreas Politz
2013-12-20 13:02     ` Tassilo Horn
2014-04-02 14:43       ` Stefan Monnier
2014-04-04 13:43         ` Tassilo Horn
2014-04-04 15:14           ` Stefan Monnier
2014-04-04 15:53             ` Tassilo Horn
2014-04-04 16:04               ` Glenn Morris
2014-04-04 17:44                 ` Tassilo Horn
2013-12-20 14:33   ` Stefan Monnier
2013-12-20 14:36     ` Tassilo Horn

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=87txe4j6jy.fsf@thinkpad.tsdh.org \
    --to=tsdh@gnu.org \
    --cc=16090@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=politza@hochschule-trier.de \
    /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).