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: Doc-view-mode with View-mode Date: Wed, 03 Feb 2010 00:49:00 +0200 Organization: JURTA Message-ID: <87k4uvyhia.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> <87d42flgc0.fsf@mail.jurta.org> <87y6jcfs9u.fsf_-_@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265151460 32001 80.91.229.12 (2 Feb 2010 22:57:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Feb 2010 22:57:40 +0000 (UTC) Cc: 4896@emacsbugs.donarmstrong.com, Tassilo Horn To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 02 23:57:37 2010 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.69) (envelope-from ) id 1NcRge-0004ea-Gy for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2010 23:57:36 +0100 Original-Received: from localhost ([127.0.0.1]:57566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcRgd-0004HZ-Pm for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2010 17:57:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcRgZ-0004HK-V0 for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2010 17:57:32 -0500 Original-Received: from [199.232.76.173] (port=39283 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcRgZ-0004HC-LA for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2010 17:57:31 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcRgX-00059A-Vq for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2010 17:57:31 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42236) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcRgX-000594-GB for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2010 17:57:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NcRbG-0005Dh-AD; Tue, 02 Feb 2010 17:52:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Feb 2010 22:52:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 4896 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4896-submit@debbugs.gnu.org id=B4896.126515112020059 (code B ref 4896); Tue, 02 Feb 2010 22:52:02 +0000 Original-Received: (at 4896) by debbugs.gnu.org; 2 Feb 2010 22:52:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NcRb7-0005DS-Mz for submit@debbugs.gnu.org; Tue, 02 Feb 2010 17:51:59 -0500 Original-Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NcRb5-0005DL-8Z for 4896@emacsbugs.donarmstrong.com; Tue, 02 Feb 2010 17:51:52 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.99.225.cable.starman.ee [82.131.99.225]) by mx2.starman.ee (Postfix) with ESMTP id 3DD813F406E; Wed, 3 Feb 2010 00:51:40 +0200 (EET) In-Reply-To: (Stefan Monnier's message of "Mon, 01 Feb 2010 21:45:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 02 Feb 2010 17:52:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , 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:34868 Archived-At: >> Stefan, do you remember why you commented out this line? >> When `doc-view-mode' has this `mode-class' property, then >> viewing a PDF file from Dired doesn't activates View-mode. > > Because I think that mode-class is for buffers whose content is > generated from a process or something like that, not from files. > Things like dired, pcl-cvs, ibuffer, shell-mode, compilation-mode, ... > >> (And setting `view-read-only' to nil is not necessary anymore.) > > Why not? Because its value is inessential with (put 'doc-view-mode 'mode-class 'special). Functions `after-find-file', `view-file', `toggle-read-only' check for `mode-class' to not activate view-mode when major mode is special. Do you think we should add another similar property applicable only to disabling view-mode? >> Also I discovered another case: visiting a PDF file from a tar archive >> activates View-mode, because `tar-extract' tries to mimic `view-file' >> but ignores the `mode-class' property. The patch below fixes this bug >> for tar-mode.el by duplicating more code from `view-file'. > >> After feature freeze this duplicate code could be moved >> from `view-file' to `view-buffer'. > > I think the right solution should be to let the major mode say > explicitly that it is mutually-exclusive with view-mode. mode-class=special already says that it is mutually-exclusive with view-mode, and a new similar property could do the same. > And it should be a dynamic property: it should only apply when the > ps/pdf/dvi document is displayed as an image, not when it's displayed > as text. mode-class=special already doesn't disable view-mode when the ps/pdf/dvi document is visited as text because in this case the major mode is not doc-view-mode. -- Juri Linkov http://www.jurta.org/emacs/