From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#4896: DocView: Continuous mode Date: Wed, 16 Dec 2009 11:23:16 +0200 Organization: JURTA Message-ID: <87d42flgc0.fsf@mail.jurta.org> References: <87tyx2anec.fsf@mail.jurta.org> <87ocn8i9qn.fsf@mail.jurta.org> <87aayst364.fsf@thinkpad.tsdh.de> <87aaye1p3u.fsf@mail.jurta.org> <87r5rplcz9.fsf@thinkpad.tsdh.de> <87tywk12rm.fsf@mail.jurta.org> Reply-To: Juri Linkov , 4896@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260956901 14457 80.91.229.12 (16 Dec 2009 09:48:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2009 09:48:21 +0000 (UTC) Cc: 4896@emacsbugs.donarmstrong.com, Stefan Monnier To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 16 10:48:13 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NKqUN-0008Fo-SQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 10:48:12 +0100 Original-Received: from localhost ([127.0.0.1]:35251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKqUN-0004WD-Vb for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 04:48:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKqTr-00040m-C8 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 04:47:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKqTl-0003rC-Mp for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 04:47:38 -0500 Original-Received: from [199.232.76.173] (port=53415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKqTl-0003qf-B1 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 04:47:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:51504) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NKqTk-0002fc-G9 for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 04:47:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBG9lT0Y007547; Wed, 16 Dec 2009 01:47:29 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nBG9eGAn006848; Wed, 16 Dec 2009 01:40:16 -0800 Resent-Date: Wed, 16 Dec 2009 01:40:16 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 16 Dec 2009 09:40:15 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4896 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4896-submit@emacsbugs.donarmstrong.com id=B4896.12609560296127 (code B ref 4896); Wed, 16 Dec 2009 09:40:15 +0000 Original-Received: (at 4896) by emacsbugs.donarmstrong.com; 16 Dec 2009 09:33:49 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBG9Xlkg006123 for <4896@emacsbugs.donarmstrong.com>; Wed, 16 Dec 2009 01:33:48 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.94.242.cable.starman.ee [82.131.94.242]) by mx1.starman.ee (Postfix) with ESMTP id CC6AE3F41DE; Wed, 16 Dec 2009 11:33:39 +0200 (EET) In-Reply-To: <87tywk12rm.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 24 Nov 2009 19:06:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 16 Dec 2009 04:47:38 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33628 Archived-At: >> Maybe we should switch off view-mode in doc-view-mode explicitly? IMO >> doc-view-mode is THE view-mode for PDF/DVI/PS files... > > Thanks. It seems your fix doesn't work. The reason is that > `after-find-file' calls `view-mode-enter' *after* calling > `doc-view-mode' via `normal-mode'. > > However, adding the following line to the end of `doc-view-mode' > seems to work (because `after-find-file' checks for `view-read-only' > before calling `view-mode-enter'): > > (set (make-local-variable 'view-read-only) nil) This still doesn't work in all cases. Typing `v' on a PDF file in Dired activates View-mode (I type RET in Dired when the intention is to *edit* the file, and type `v' when the intention is to *view* the file). Doc-view-mode has no chance to disable view-mode, because view-file (called from dired-view-file) at first visits the file with find-file-noselect that enables doc-view-mode, and after that view-file enables view-mode. View-file doesn't enable view-mode only when the property `mode-class' is `special'. Actually lisp/doc-view.el already contains the necessary line, but it is commented out: ;; (put 'doc-view-mode 'mode-class 'special) I wonder what was the reason for commenting this out? -- Juri Linkov http://www.jurta.org/emacs/