From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#16090: 24.3.50; [PATCH] error when jumping to a doc-view bookmark Date: Fri, 20 Dec 2013 09:00:17 +0100 Message-ID: <87txe4j6jy.fsf@thinkpad.tsdh.org> References: <87a9gbb7wi.fsf@hochschule-trier.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387526474 13001 80.91.229.3 (20 Dec 2013 08:01:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Dec 2013 08:01:14 +0000 (UTC) Cc: 16090@debbugs.gnu.org To: Andreas Politz , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 20 09:01:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vtv1L-0004eI-5G for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 09:01:19 +0100 Original-Received: from localhost ([::1]:48202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtv1K-0007sU-Ni for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Dec 2013 03:01:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtv1C-0007sE-LN for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 03:01:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtv16-0003mD-9v for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 03:01:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtv16-0003m9-15 for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 03:01:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vtv14-0006g9-IX for bug-gnu-emacs@gnu.org; Fri, 20 Dec 2013 03:01:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Dec 2013 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 16090-submit@debbugs.gnu.org id=B16090.138752642925609 (code B ref 16090); Fri, 20 Dec 2013 08:01:02 +0000 Original-Received: (at 16090) by debbugs.gnu.org; 20 Dec 2013 08:00:29 +0000 Original-Received: from localhost ([127.0.0.1]:59414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtv0V-0006et-Qm for submit@debbugs.gnu.org; Fri, 20 Dec 2013 03:00:28 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53044) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vtv0O-0006eX-0x for 16090@debbugs.gnu.org; Fri, 20 Dec 2013 03:00:21 -0500 Original-Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 4631A20E04; Fri, 20 Dec 2013 03:00:19 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 20 Dec 2013 03:00:19 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=O82tAiFeYzfwOXV3LPi3ahAR+zs=; b=GoqmgdQ2UQVREiPl1HR3qA48xuDR 9b+b9LrRudixMgtFJZWbBNgMJVN1bdki97qW0Gz7KKCUrNJ6o+TcIwH5F8yGkHbE N5VO5MnOm2P/p/4bc3KgrqNam3KuNapfY09XsqWq7piDxDSSUStum765OlLe7QEo vgk8o4wtBlJgHMU= X-Sasl-enc: w0uAsNAc4542E79mFfLqYl2Lsp0cl3kEELpuLJ8vI27v 1387526418 Original-Received: from thinkpad.tsdh.org (unknown [91.67.164.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 989666800BA; Fri, 20 Dec 2013 03:00:18 -0500 (EST) In-Reply-To: <87a9gbb7wi.fsf@hochschule-trier.de> (Andreas Politz's message of "Sun, 08 Dec 2013 17:54:21 +0100") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:82263 Archived-At: Andreas Politz 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