From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Baier Newsgroups: gmane.emacs.devel Subject: doc-view functions inside with-current-buffer do not work Date: Mon, 03 Nov 2014 17:16:58 +0100 Message-ID: <87oaso8dj9.fsf@mailbox.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415033117 21894 80.91.229.3 (3 Nov 2014 16:45:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2014 16:45:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 03 17:45:10 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XlKka-0003xr-PI for ged-emacs-devel@m.gmane.org; Mon, 03 Nov 2014 17:45:04 +0100 Original-Received: from localhost ([::1]:36030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKka-0002Aq-9b for ged-emacs-devel@m.gmane.org; Mon, 03 Nov 2014 11:45:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKKH-0005p5-Bo for emacs-devel@gnu.org; Mon, 03 Nov 2014 11:18:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlKK7-0007mr-Gx for emacs-devel@gnu.org; Mon, 03 Nov 2014 11:17:53 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKK7-0007md-An for emacs-devel@gnu.org; Mon, 03 Nov 2014 11:17:43 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XlKK4-0005YW-Mz for emacs-devel@gnu.org; Mon, 03 Nov 2014 17:17:40 +0100 Original-Received: from nat-wh-wh36.rz.uni-karlsruhe.de ([141.70.81.154]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Nov 2014 17:17:40 +0100 Original-Received: from alexander.baier by nat-wh-wh36.rz.uni-karlsruhe.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Nov 2014 17:17:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nat-wh-wh36.rz.uni-karlsruhe.de User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:Xo/We0vZCeRDrWFDy4ZOH4S0TjA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176282 Archived-At: Hello, Consider the following steps: - Define this function: #+BEGIN_SRC emacs-lisp (defun my-doc-view-goto-page (n) (with-current-buffer (get-buffer "test.pdf") (doc-view-goto-page n))) #+END_SRC - C-x C-f test.pdf RET - Evaluating the following snippet: #+BEGIN_SRC emacs-lisp (my-doc-view-goto-page 2) #+END_SRC For me the buffer containing the test.pdf is still displaying the first page of test.pdf. I expected it to show the second. Is this a bug? Note: I waited for doc-view-mode to convert the whole pdf to png images. At least the mode line displays "1/22" and does not change anymore. Regards, -- Alexander Baier