From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 04:05:31 2012 Received: (at submit) by debbugs.gnu.org; 30 Jan 2012 09:05:31 +0000 Received: from localhost ([127.0.0.1]:44586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrnB4-0003RS-HI for submit@debbugs.gnu.org; Mon, 30 Jan 2012 04:05:30 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:46888 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrnB2-0003RL-Am for submit@debbugs.gnu.org; Mon, 30 Jan 2012 04:05:29 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RrnAr-0000TZ-EP; Mon, 30 Jan 2012 04:05:17 -0500 From: Glenn Morris To: submit@debbugs.gnu.org Subject: view-mode inconsistencies wrt special mode-class X-Spook: assassinate Indigo Gazprom Mantis Khaddafi rs9512c White X-Ran: Q!3GBRNszI`-F|B!GnkzFJIwOzizg1`}4b%0->wyYW}SLpv6],W,s9a4)^?mvxOx)n@DF! X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 30 Jan 2012 04:05:16 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Package: emacs Version: 24.0.93 Severity: minor emacs -Q M-x view-file RET /path/to/old/rmail/BABYL/file RET -> "Not using View mode because the major mode is special" but: emacs -Q M-x view-file-other-window RET /path/to/old/rmail/BABYL/file/RET -> buffer opened in view mode. This is a silly inconsistency. The test for special mode class was already generalized (bug#5513) from view-file to view-buffer, but none of the other view-mode commands (view-file-other-window, view-file-other-frame, view-buffer-other-window, view-buffer-other-frame) use view-buffer, so this doesn't affect them. The check should probably be moved to view-mode-enter. This is used in a handful of places outside view.el, so maybe an optional argument to control the check will be needed. When this is done, view-mode will treat special mode class consistently, so it can be documented in the manual (the relation between view-mode and special modes does not seem to documented at present). See the Emacs 24 etc/NEWS entry for view buffer. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 15:10:19 2012 Received: (at 10650) by debbugs.gnu.org; 30 Jan 2012 20:10:20 +0000 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 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 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 From: Glenn Morris To: 10650@debbugs.gnu.org Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: 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-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 30 Jan 2012 15:10:01 -0500 In-Reply-To: (Glenn Morris's message of "Mon, 30 Jan 2012 04:05:16 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 18:33:14 2012 Received: (at 10650) by debbugs.gnu.org; 30 Jan 2012 23:33:14 +0000 Received: from localhost ([127.0.0.1]:45857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs0io-0000yW-CG for submit@debbugs.gnu.org; Mon, 30 Jan 2012 18:33:14 -0500 Received: from ps18281.dreamhost.com ([69.163.218.105]:54041 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs0ij-0000yN-RE for 10650@debbugs.gnu.org; Mon, 30 Jan 2012 18:33:13 -0500 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id EC01C451C816; Mon, 30 Jan 2012 15:31:46 -0800 (PST) From: Juri Linkov To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Organization: JURTA References: Date: Tue, 31 Jan 2012 01:29:25 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 30 Jan 2012 15:10:01 -0500") Message-ID: <871uqgkbvu.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10650 Cc: 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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. Another thread worth to read is: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8615 > It would seem better to have some new explicit property for this, rather > than stealing special mode-class. Or a new user option defined in view.el with a list of modes where view-mode should not be activated; with the default value like `(image-mode archive-mode tar-mode)'. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 19:38:20 2012 Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 00:38:20 +0000 Received: from localhost ([127.0.0.1]:45873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs1jn-0002Tc-Us for submit@debbugs.gnu.org; Mon, 30 Jan 2012 19:38:20 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:36087 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs1jl-0002TU-4D for 10650@debbugs.gnu.org; Mon, 30 Jan 2012 19:38:17 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rs1jX-0000yR-Up; Mon, 30 Jan 2012 19:38:03 -0500 From: Glenn Morris To: Juri Linkov Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <871uqgkbvu.fsf@mail.jurta.org> X-Spook: Qaddafi halcon Exon Shell PET Bush Wired dictionary Pine X-Ran: O8]j8WP5>$.x&e'5x4D$(yS-+7TT"~{_aLsb+SkPn0w}}$4nWzkG (Juri Linkov's message of "Tue, 31 Jan 2012 01:29:25 +0200") Message-ID: <51k448u2ok.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Juri Linkov wrote: > Or a new user option defined in view.el with a list of modes where > view-mode should not be activated; with the default value like > `(image-mode archive-mode tar-mode)'. Sounds good to me. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 20:50:19 2012 Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 01:50:19 +0000 Received: from localhost ([127.0.0.1]:45956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs2rS-0004xo-BK for submit@debbugs.gnu.org; Mon, 30 Jan 2012 20:50:18 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12013) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs2rP-0004xb-U5 for 10650@debbugs.gnu.org; Mon, 30 Jan 2012 20:50:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EACdIJ09MCqD0/2dsb2JhbABDrlaBBoFyAQEFViMQCw4mEhQYDSTBGospEgICAwYCBAIBBAICDAYIAgECAYQdAQQEHoM5BIg/mnOEVw X-IronPort-AV: E=Sophos;i="4.71,592,1320642000"; d="scan'208";a="160383278" 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; 30 Jan 2012 20:49:57 -0500 Received: by pastel.home (Postfix, from userid 20848) id 99C9259470; Mon, 30 Jan 2012 20:49:57 -0500 (EST) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Message-ID: References: Date: Mon, 30 Jan 2012 20:49:57 -0500 In-Reply-To: (Glenn Morris's message of "Mon, 30 Jan 2012 04:05:16 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10650 Cc: 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Note that part of the problem here, really is `special mode-class', which is a largely undefined concept both in terms of "what it's supposed to mean" and "what effects does it have". Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 21:51:11 2012 Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 02:51:11 +0000 Received: from localhost ([127.0.0.1]:46007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs3oM-0006KX-UJ for submit@debbugs.gnu.org; Mon, 30 Jan 2012 21:51:11 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:37837 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs3oK-0006KQ-EC for 10650@debbugs.gnu.org; Mon, 30 Jan 2012 21:51:09 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rs3o6-0002sS-Jd; Mon, 30 Jan 2012 21:50:54 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: X-Spook: chameleon man supercomputer Bletchley Park Leitrim X-Ran: :|;#v8{X-Fg[Xn5*[&tOmUZ~'(OehosL#HYd_2I#U?l-YSv~Qq?Rq9slFO2iY:>K`ys~0$ X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 30 Jan 2012 21:50:54 -0500 In-Reply-To: (Stefan Monnier's message of "Mon, 30 Jan 2012 20:49:57 -0500") Message-ID: <9vehugoa9d.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Stefan Monnier wrote: > Note that part of the problem here, really is `special mode-class', > which is a largely undefined concept both in terms of "what it's > supposed to mean" and "what effects does it have". AFAIK, the only documented meaning of special mode-class is: 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.) The only other effect I am aware of it having is the one on view-mode (which isn't documented, and seems unrelated to the previous paragraph.) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 01:17:32 2012 Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 06:17:32 +0000 Received: from localhost ([127.0.0.1]:46172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs723-0002dh-NV for submit@debbugs.gnu.org; Tue, 31 Jan 2012 01:17:32 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:41172 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rs721-0002da-4h for 10650@debbugs.gnu.org; Tue, 31 Jan 2012 01:17:29 -0500 Received: from [155.69.16.255] (port=44508 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Rs71m-0000RB-BQ; Tue, 31 Jan 2012 01:17:14 -0500 From: Chong Yidong To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> Date: Tue, 31 Jan 2012 14:17:07 +0800 In-Reply-To: <9vehugoa9d.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 30 Jan 2012 21:50:54 -0500") Message-ID: <87pqe08kgs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: Stefan Monnier , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris writes: > AFAIK, the only documented meaning of special mode-class is: > > 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.) 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. That's the reason that special modes are never inherited when you make a new buffer, even if major-mode has a nil default value. The major mode itself is not useful without other special "stuff" done by Emacs to populate or process the buffer. Unfortunately, this meaning tends to get obscured by the contents of special-mode-map, where we've tried to "helpfully" set up keybindings like "q" for quit-window. But this is mostly tolerable. I think view-file is right not to enable View mode for special mode, and view-file-other-window/view-file-other-frame should be fixed up similarly. As for view-buffer, it is OK as is. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 12:37:32 2012 Received: (at 10650) by debbugs.gnu.org; 31 Jan 2012 17:37:32 +0000 Received: from localhost ([127.0.0.1]:47489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsHe6-00079e-Rv for submit@debbugs.gnu.org; Tue, 31 Jan 2012 12:37:32 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:33288) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsHe3-00079R-Re for 10650@debbugs.gnu.org; Tue, 31 Jan 2012 12:37:29 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q0VHbAw7028146; Tue, 31 Jan 2012 12:37:10 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 2E338B4168; Tue, 31 Jan 2012 12:37:10 -0500 (EST) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Message-ID: References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> Date: Tue, 31 Jan 2012 12:37:09 -0500 In-Reply-To: <87pqe08kgs.fsf@gnu.org> (Chong Yidong's message of "Tue, 31 Jan 2012 14:17:07 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4118=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4118> : streams <724588> : uri <1057260> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 10650 Cc: Glenn Morris , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > 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. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 02:38:39 2012 Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 07:38:39 +0000 Received: from localhost ([127.0.0.1]:48087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsUm5-0004Ky-Rv for submit@debbugs.gnu.org; Wed, 01 Feb 2012 02:38:38 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:38292 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsUlv-0004Ki-EM for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 02:38:30 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RsUlZ-0003ZA-H3; Wed, 01 Feb 2012 02:38:05 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> X-Spook: kibo number key Abu Ghraib bce Elvis Manfurov cracking oil X-Ran: ;bCZp}:F'.7_hj"|:6Ix7+Ljm0aLPZrn8ju{[^XZDKZQ/\d0P^_SaD\`i(%Ne6WH@Na<5] X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 01 Feb 2012 02:38:05 -0500 In-Reply-To: (Stefan Monnier's message of "Tue, 31 Jan 2012 12:37:09 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Stefan Monnier wrote: >> 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. 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 03:33:00 2012 Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 08:33:00 +0000 Received: from localhost ([127.0.0.1]:48126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsVch-0006LD-8k for submit@debbugs.gnu.org; Wed, 01 Feb 2012 03:32:59 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:39446 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsVce-0006L4-DL for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 03:32:57 -0500 Received: from [155.69.17.225] (port=40800 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RsVcH-0004X8-Ae; Wed, 01 Feb 2012 03:32:34 -0500 From: Chong Yidong To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> Date: Wed, 01 Feb 2012 16:32:23 +0800 In-Reply-To: (Glenn Morris's message of "Wed, 01 Feb 2012 02:38:05 -0500") Message-ID: <87wr877y3s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: Stefan Monnier , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris writes: > Stefan Monnier wrote: > >>> 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. > > 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 changed view-buffer-other-* to behave like view-buffer. (Could have changed view-mode-enter instead, but that is called from other placed in Emacs so it didn't seem worth the risk.) From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 03:33:08 2012 Received: (at control) by debbugs.gnu.org; 1 Feb 2012 08:33:09 +0000 Received: from localhost ([127.0.0.1]:48130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsVcq-0006Lv-4I for submit@debbugs.gnu.org; Wed, 01 Feb 2012 03:33:08 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:39448 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsVco-0006Lo-FK for control@debbugs.gnu.org; Wed, 01 Feb 2012 03:33:06 -0500 Received: from [155.69.17.225] (port=40801 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RsVcS-0004Yo-7l for control@debbugs.gnu.org; Wed, 01 Feb 2012 03:32:44 -0500 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 10650 Date: Wed, 01 Feb 2012 16:32:38 +0800 Message-ID: <87k447gdi1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) close 10650 thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 09:32:15 2012 Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 14:32:15 +0000 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 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" 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 Received: by pastel.home (Postfix, from userid 20848) id E84B259473; Wed, 1 Feb 2012 09:31:44 -0500 (EST) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Message-ID: References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> Date: Wed, 01 Feb 2012 09:31:44 -0500 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10650 Cc: Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >>> 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 12:12:29 2012 Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 17:12:29 +0000 Received: from localhost ([127.0.0.1]:49414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsdjQ-00046g-Dd for submit@debbugs.gnu.org; Wed, 01 Feb 2012 12:12:29 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:54122 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsdjO-00046Z-AJ for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 12:12:27 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rsdj1-000655-25; Wed, 01 Feb 2012 12:12:03 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> X-Spook: PGP constitution Juiliett Class Submarine Forte target X-Ran: eK$,e%FDv|y+98vl1%G>dP){b*JOL1j!805jp&1y{P:*h)9P.//>6yF;xhlw-++t;\}I>\ X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 01 Feb 2012 12:12:03 -0500 In-Reply-To: (Stefan Monnier's message of "Wed, 01 Feb 2012 09:31:44 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 10650 Cc: Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) Stefan Monnier wrote: > 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. Yes, that's what I meant by saying that it doesn't seem a useful feature to me. > 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. Fine by me, although the core functionality is already there of course at very little cost. > 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". Yes, and largely by coincidence IMO many of those modes happen to have special mode-class. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 12:15:37 2012 Received: (at 10650) by debbugs.gnu.org; 1 Feb 2012 17:15:37 +0000 Received: from localhost ([127.0.0.1]:49421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsdmT-0004C0-1A for submit@debbugs.gnu.org; Wed, 01 Feb 2012 12:15:37 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:54214 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsdmR-0004Bu-9x for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 12:15:35 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rsdm4-0006KQ-2B; Wed, 01 Feb 2012 12:15:12 -0500 From: Glenn Morris To: Chong Yidong Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> <87wr877y3s.fsf@gnu.org> X-Spook: AVIP Glock Aldergrove pre-emptive kilo class Ermes X-Ran: GeYG6xQrM%O\"DK4_F8$7sVz}lxytMHcr5,nAi%W}|MqL2yH X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 01 Feb 2012 12:15:12 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: Stefan Monnier , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Chong Yidong wrote: > I changed view-buffer-other-* to behave like view-buffer. > (Could have changed view-mode-enter instead, but that is called from > other placed in Emacs so it didn't seem worth the risk.) Probably not for 24.1 indeed, but the first usage I looked at is in files.el and it duplicates the same logic wrt mode-class: (when (and buffer-read-only view-read-only (not (eq (get major-mode 'mode-class) 'special))) (view-mode-enter)) I'd guess (with no data) that most of the other callers either use something similar, should use something similar but did not think of it, or would not be affected if something similar were added. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 19:46:03 2012 Received: (at 10650) by debbugs.gnu.org; 2 Feb 2012 00:46:03 +0000 Received: from localhost ([127.0.0.1]:49667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RskoM-0008AE-Gb for submit@debbugs.gnu.org; Wed, 01 Feb 2012 19:46:03 -0500 Received: from ps18281.dreamhost.com ([69.163.218.105]:33595 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RskoC-00089p-Hu for 10650@debbugs.gnu.org; Wed, 01 Feb 2012 19:45:58 -0500 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9BD0A451C81A; Wed, 1 Feb 2012 16:44:14 -0800 (PST) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Organization: JURTA References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> Date: Thu, 02 Feb 2012 02:40:45 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 01 Feb 2012 09:31:44 -0500") Message-ID: <87ehuegj8y.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10650 Cc: Glenn Morris , Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> 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". Without using the special mode class or adding a new separate variable, the closest condition to match modes incompatible with view-mode would be: (and (buffer-file-name) (or (derived-mode-p 'special-mode) (equal (keymap-parent (current-local-map)) special-mode-map))) What is worth to note is that these modes don't suppress the special-mode keymap, but inherit from it and override most of its key bindings. But this heuristics is too unreliable, so explicitly declaring incompatible modes is better. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 13:50:07 2012 Received: (at 10650) by debbugs.gnu.org; 2 Feb 2012 18:50:07 +0000 Received: from localhost ([127.0.0.1]:51166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt1jT-0004dn-61 for submit@debbugs.gnu.org; Thu, 02 Feb 2012 13:50:07 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:52053) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt1jQ-0004df-9A for 10650@debbugs.gnu.org; Thu, 02 Feb 2012 13:50:05 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q12InYZN018600; Thu, 2 Feb 2012 13:49:34 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id AD5DC130004; Thu, 2 Feb 2012 13:49:34 -0500 (EST) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Message-ID: References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> <87ehuegj8y.fsf@mail.jurta.org> Date: Thu, 02 Feb 2012 13:49:34 -0500 In-Reply-To: <87ehuegj8y.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 02 Feb 2012 02:40:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4120=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4120> : streams <725170> : uri <1058595> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 10650 Cc: Glenn Morris , Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) >>> 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". > Without using the special mode class or adding a new separate variable, > the closest condition to match modes incompatible with view-mode would be: > (and (buffer-file-name) > (or (derived-mode-p 'special-mode) > (equal (keymap-parent (current-local-map)) special-mode-map))) > What is worth to note is that these modes don't suppress the > special-mode keymap, but inherit from it and override most of its > key bindings. I didn't mean to say that those modes use suppress-keymap directly, jus that their keymap is "suppressed" which is the case for any keymap which inherits from special-mode-map. Here's another heuristic: (eq 'undefined (lookup-key (current-local-map) [remap self-insert-command])) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 15:03:34 2012 Received: (at 10650) by debbugs.gnu.org; 2 Feb 2012 20:03:34 +0000 Received: from localhost ([127.0.0.1]:51298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt2sY-0007AP-70 for submit@debbugs.gnu.org; Thu, 02 Feb 2012 15:03:34 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:56379 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt2sW-0007AI-G3 for 10650@debbugs.gnu.org; Thu, 02 Feb 2012 15:03:33 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rt2s3-0004hZ-KE; Thu, 02 Feb 2012 15:03:03 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> <87ehuegj8y.fsf@mail.jurta.org> X-Spook: airframe SSL cracking Gazprom Rule Psix JPL Kosovo X-Ran: Ttzo^mKb]{pR2bqF;0,r8EqBciK5?gYVH,f>_aj"C&)M2WB`s?jZA|A\jSz:5x~CFP@[Gm X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 02 Feb 2012 15:03:03 -0500 In-Reply-To: (Stefan Monnier's message of "Thu, 02 Feb 2012 13:49:34 -0500") Message-ID: <7xliol80lk.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10650 Cc: Juri Linkov , Chong Yidong , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Why do we even care about not entering view-mode in special mode buffers anyway? If you don't want view-mode, don't ask for it. Is there any motivation for this feature beyond "some guy likes to press v on everything in dired, then complain when he gets what he asked for"? (Sorry, I seem to be going on about this far too much! ;) ) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 16:37:48 2012 Received: (at 10650) by debbugs.gnu.org; 2 Feb 2012 21:37:48 +0000 Received: from localhost ([127.0.0.1]:51362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt4Lk-0001kr-DN for submit@debbugs.gnu.org; Thu, 02 Feb 2012 16:37:48 -0500 Received: from ps18281.dreamhost.com ([69.163.218.105]:60130 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rt4Lh-0001kj-74 for 10650@debbugs.gnu.org; Thu, 02 Feb 2012 16:37:47 -0500 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 494E5451C80C; Thu, 2 Feb 2012 13:36:00 -0800 (PST) From: Juri Linkov To: Glenn Morris Subject: Re: bug#10650: view-mode inconsistencies wrt special mode-class Organization: JURTA References: <9vehugoa9d.fsf@fencepost.gnu.org> <87pqe08kgs.fsf@gnu.org> <87ehuegj8y.fsf@mail.jurta.org> <7xliol80lk.fsf@fencepost.gnu.org> Date: Thu, 02 Feb 2012 23:11:31 +0200 In-Reply-To: <7xliol80lk.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 02 Feb 2012 15:03:03 -0500") Message-ID: <8762fpvvec.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10650 Cc: Chong Yidong , Stefan Monnier , 10650@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Why do we even care about not entering view-mode in special mode buffers > anyway? If you don't want view-mode, don't ask for it. > Is there any motivation for this feature beyond "some guy likes to press > v on everything in dired, then complain when he gets what he asked for"? Not just pressing v in dired, but also other cases like visiting a read-only "special" file when `view-read-only' is non-nil, or typing `C-x C-q C-x C-q' (both cases are handled in files.el) Such special modes as image-mode and archive-mode don't need to activate `view-mode' because in fact they are already "view" modes (as opposed to "edit" modes with enabled self-inserting commands) and they bind own keys to "view" their special (i.e. not plain text) content. From unknown Mon Jun 16 23:52:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 02 Mar 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator