From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Problem with doc-view-previous-major-mode Date: Sat, 13 Apr 2013 16:57:47 +0200 Message-ID: <87r4ieeavo.fsf@rosalinde.fritz.box> References: <878v4odd31.fsf@rosalinde.fritz.box> <87li8op3un.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365865085 2647 80.91.229.3 (13 Apr 2013 14:58:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 14:58:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 13 16:58:09 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UR1ty-0006hV-GP for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2013 16:58:02 +0200 Original-Received: from localhost ([::1]:46067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UR1tx-0006E8-NN for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2013 10:58:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UR1tr-0006Di-MY for emacs-devel@gnu.org; Sat, 13 Apr 2013 10:57:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UR1to-000130-S4 for emacs-devel@gnu.org; Sat, 13 Apr 2013 10:57:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:50483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UR1to-00012m-J1 for emacs-devel@gnu.org; Sat, 13 Apr 2013 10:57:52 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.32]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MYZTg-1U5STF0YC2-00VLis for ; Sat, 13 Apr 2013 16:57:51 +0200 Original-Received: (qmail invoked by alias); 13 Apr 2013 14:57:50 -0000 Original-Received: from i59F57B62.versanet.de (EHLO rosalinde.fritz.box) [89.245.123.98] by mail.gmx.net (mp032) with SMTP; 13 Apr 2013 16:57:50 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19QOnIdpddQhpXGE3oNChrdf98dGwKXhtmA8YqEqZ f7ve3GyNHYzz1E In-Reply-To: (Stefan Monnier's message of "Fri, 12 Apr 2013 12:24:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.19 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158883 Archived-At: On Fri, 12 Apr 2013 12:24:34 -0400 Stefan Monnier wrote: >>>> what happens with -Q. But I have customized the global value of >>>> major-mode to text-mode, >>> Why? >> Because I found that I often wanted to do quick tests in text-mode by >> typing `C-x b a'. > > I see. > >> Your question suggests suggests that this customization is >> ill-advised; > > No. Customizing default-major-mode has been supported "for ever" and > your use case makes sense, but the way it works makes for some annoying > corner cases, such as the one you've bumped into. > > So I'd like to use another mechanism, such that you could still > configure the mode to use for a new buffer created via C-x b, but > without it affecting things like your doc-view case. Do you have something already in the works, or are you soliciting ideas? If the latter, maybe we could add a prefix argument to switch-to-buffer that sets the major-mode (using completion and defaulting to the value of a user option) if the buffer switched to is new. >> And if it is ill-advised, then major-mode shouldn't be customizable, >> should it? > > If I could rewrite history, indeed the default value of major-mode would > not be customizable. When an alternative is in place, the customizability could be obsoleted. Steve Berman