From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10650: view-mode inconsistencies wrt special mode-class Date: Wed, 01 Feb 2012 09:31:44 -0500 Message-ID: References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328106782 9129 80.91.229.3 (1 Feb 2012 14:33:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 14:33:02 +0000 (UTC) Cc: Chong Yidong , 10650@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 01 15:33:01 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 1RsbF5-0001nG-Of for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2012 15:33:00 +0100 Original-Received: from localhost ([::1]:45235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsbF5-0007cM-8Z for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2012 09:32:59 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsbEw-0007ZU-UQ for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2012 09:32:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsbEm-0003vT-RT for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2012 09:32:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsbEm-0003vL-KJ for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2012 09:32:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RsbF7-00006G-IQ for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2012 09:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Feb 2012 14:33:01 +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.1328106735333 (code B ref 10650); Wed, 01 Feb 2012 14:33:01 +0000 Original-Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 14:32:15 +0000 Original-Received: from localhost ([127.0.0.1]:48481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsbEN-00005K-96 for submit@debbugs.gnu.org; Wed, 01 Feb 2012 09:32:15 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:61508) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsbEK-000057-IF for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 09:32:13 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAN1LKU9MCqD0/2dsb2JhbABDrnqBBoFyAQEEAVYjBQsLDiYSFBgNJIgPuGyLXBICAgMGAgQCAQQCAgwGDYQeAQQEHoM5BIhBmnqEWA X-IronPort-AV: E=Sophos;i="4.71,602,1320642000"; d="scan'208";a="160667874" Original-Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Feb 2012 09:31:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id E84B259473; Wed, 1 Feb 2012 09:31:44 -0500 (EST) In-Reply-To: (Glenn Morris's message of "Wed, 01 Feb 2012 02:38:05 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) 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:56346 Archived-At: >>> The Lisp manual (node Basic Major Modes) says: >>> Special mode is a basic major mode for buffers containing text >>> that is produced specially by Emacs, rather than from a file. >> Then again, doc-view-mode is a special mode even though the PDF code is >> rarely if ever generated by Emacs. > I interpret special modes as being applicable to stuff where you won't > ever want to create an empty buffer and just start writing said stuff. > That covers PDFs, tar files, dired buffers, etc. Yes, my understanding of it also revolves around this idea. And I think that's what: If the default-value of major-mode is nil, then creating a new buffer inherits the major-mode of the previously current buffer UNLESS that buffer has a special mode-class, in which case the new buffer gets fundamental mode. (Doesn't seem a very useful feature to me.) is hinting at. Still, this notion of "special mode" seems of little practical value since it only seems to be usable in the above case of setting up the default major mode of a newly created buffer. The default global value of major-mode is not nil, so in 99% of the cases whether a mode is special will have zero effect. I really would be happy to declare that a nil default value for `major-mode' is not supported any more. So we can simply get rid of this "special mode-class" mess. > Personally I think a separate variable controlling which modes are > incompatible with view-mode would be better, but I'm not going to > complain if the definition of special modes is extended to cover this. I'm not sure exactly what's the idea with view-mode's use of special mode class, but IIUC it's that we don't want to enable view-mode in major modes that already have view-mode-like keybindings, which might boil down to something along the lines of "major modes which use suppress-keymap". Stefan