From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.devel Subject: Re: new buffer - should its mode reflect its name when the name matches auto-mode-alist? Date: Wed, 23 Sep 2009 22:50:42 +0200 Message-ID: <7dbe73ed0909231350i107db072rd17a9e9b45c225e3@mail.gmail.com> References: <7b501d5c0909220747m71565340m36be3026f91f5db8@mail.gmail.com> <230CB35D6D9A419EB943F0A276A78B72@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1253739083 29218 80.91.229.12 (23 Sep 2009 20:51:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Sep 2009 20:51:23 +0000 (UTC) Cc: emacs-devel@gnu.org, Deniz Dogan To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 23 22:51:15 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqYnz-0004t2-CO for ged-emacs-devel@m.gmane.org; Wed, 23 Sep 2009 22:51:15 +0200 Original-Received: from localhost ([127.0.0.1]:34434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqYny-0006Fy-W6 for ged-emacs-devel@m.gmane.org; Wed, 23 Sep 2009 16:51:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqYnu-0006EX-4N for emacs-devel@gnu.org; Wed, 23 Sep 2009 16:51:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqYnp-0006A3-PP for emacs-devel@gnu.org; Wed, 23 Sep 2009 16:51:09 -0400 Original-Received: from [199.232.76.173] (port=60242 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqYnp-00069x-IV for emacs-devel@gnu.org; Wed, 23 Sep 2009 16:51:05 -0400 Original-Received: from mail-ew0-f208.google.com ([209.85.219.208]:48057) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqYnp-00016Q-4M for emacs-devel@gnu.org; Wed, 23 Sep 2009 16:51:05 -0400 Original-Received: by ewy4 with SMTP id 4so1105904ewy.31 for ; Wed, 23 Sep 2009 13:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=P2Uiyfzb7etwQ2bJTqd22rQwC3//ZQs74kuCvZ5vsRU=; b=J4gbMC3rs9TiRqT7JVdGUEuOVbhL427D7oWdQmDkkdXPOg5tyRyGC27IIeH0d2PPU5 BJJwcjQANWsCIDwfXa+zTFNusH5gEbFKBIXErKoQozqF+HK2G4evOibcWP76SMKfp136 YSWtyQAq+tK/YO8NAV17IuSFgOKg9+EZZw+es= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=YoHGaLnGYT+WRiVlq9DGKrL8dz+S0Pf/SXXXsTLXIMXdguDZe2Wr0UrZinvk2WxN+8 BCbhnCOdUpe7a57rfqPwPd58FQAHI4UMTgofUDanbM8Dm2lnr5mUyHWfGo5NOP4GeX7x zjO+NC3NIXooljHYCoPklbbSgJhx2gyD+Wos8= Original-Received: by 10.216.23.207 with SMTP id v57mr600578wev.156.1253739062277; Wed, 23 Sep 2009 13:51:02 -0700 (PDT) In-Reply-To: <230CB35D6D9A419EB943F0A276A78B72@us.oracle.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115561 Archived-At: I would like this behaviour too. From time to time I also do this and it is a tiny annoyance that I have to save the file and then revert it to get the default mode loaded. Of course I sometimes enable the mode manually as well but for some files I do not always know the mode name. On Tue, Sep 22, 2009 at 5:07 PM, Drew Adams wrote: >> > Haven't thought about this before, but I wonder if the mode >> > should respect auto-mode-alist when you create a new buffer? >> > There's no doubt a good reason or >> > two why we don't do this - just wondering. >> > >> > E.g. `C-x b foo.el', where there is no existing buffer >> > foo.el. The mode is >> > Fundamental; should it be Emacs-Lisp instead? >> > >> > (I realize that a new buffer need not be intended to be >> > saved as a file.) >> > >> >> As an end-user and not having contributed anything to Emacs myself, I >> would expect the buffer to "respect" auto-mode-alist, i.e. set the >> mode depending on the buffer name. However, I think the default >> behavior when creating buffers non-interactively should *not* respect >> auto-mode-alist. > > Yes, I meant interactively only, but should have made that clear. Thx. > > > >