From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#10650: view-mode inconsistencies wrt special mode-class Date: Mon, 30 Jan 2012 15:10:01 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1327954261 5270 80.91.229.3 (30 Jan 2012 20:11:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 20:11:01 +0000 (UTC) To: 10650@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 30 21:11:00 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrxZ5-0004uW-7m for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2012 21:10:59 +0100 Original-Received: from localhost ([::1]:58436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrxZ4-0002iD-JR for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Jan 2012 15:10:58 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrxYy-0002i7-Ry for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2012 15:10:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrxYx-0007Jo-Ey for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2012 15:10:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrxYx-0007Jf-9b for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2012 15:10:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RrxZ8-0003vY-6E for bug-gnu-emacs@gnu.org; Mon, 30 Jan 2012 15:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jan 2012 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10650 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10650-submit@debbugs.gnu.org id=B10650.132795422015045 (code B ref 10650); Mon, 30 Jan 2012 20:11:02 +0000 Original-Received: (at 10650) by debbugs.gnu.org; 30 Jan 2012 20:10:20 +0000 Original-Received: from localhost ([127.0.0.1]:45646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrxYO-0003ua-RN for submit@debbugs.gnu.org; Mon, 30 Jan 2012 15:10:19 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58862 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrxYL-0003uR-LM for 10650@debbugs.gnu.org; Mon, 30 Jan 2012 15:10:15 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RrxY9-00082T-8b; Mon, 30 Jan 2012 15:10:01 -0500 X-Spook: 64 Vauxhall Cross Fortezza JFK BLU-97 A/B CIDA Armani X-Ran: gzuhmJU~OiwEfV$q]VLXx1gmDvXa[a(&X=;"LqYnnu'xj|0\DiXI-Z8'b X-Hue: yellow X-Attribution: GM In-Reply-To: (Glenn Morris's message of "Mon, 30 Jan 2012 04:05:16 -0500") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:56249 Archived-At: I've changed my mind. I wanted to document _why_ view-file checks for a special mode-class, but I could find no logical explanation. This check was added here: 2003-07-09 Richard M. Stallman * view.el (view-file): If existing buffer's major mode is special, don't go into view mode. Unfortunately this just tells us _what_ was done, not why. Emacs 22's NEWS file says: *** M-x view-file and commands that use it now avoid interfering with special modes such as Tar mode. The only relevant thing I could find from the Emacs mailing lists around this time was: http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-07/msg00031.html Problem: in dired the user hits v instead of RET on some file.zip. This causes lots of Zip-Archive mode keys to be overridden by view mode keys. This isn't compelling to me. I agree with the only posted response: No, you should use RET if you want to run dired-find-file, and v if you want to run dired-view-file. Anyway, it doesn't make much sense to me to steal the special mode-class that tar-mode happens to have and start using it for view-file as well (and it has never been documented anywhere AFAICS). This came up before in some long thread: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4896#153 I think the right solution should be to let the major mode say explicitly that it is mutually-exclusive with view-mode. It would seem better to have some new explicit property for this, rather than stealing special mode-class.