From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: precedence of auto-mode-alist and magic-fallback-mode-alist Date: Sat, 08 Dec 2007 23:45:28 +0000 Message-ID: <475B2C98.2000307@gnu.org> References: <87ejdxi7tl.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1197157550 6436 80.91.229.12 (8 Dec 2007 23:45:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2007 23:45:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 09 00:45:59 2007 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 1J19Mt-00042Z-77 for ged-emacs-devel@m.gmane.org; Sun, 09 Dec 2007 00:45:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J19Mc-00033L-1m for ged-emacs-devel@m.gmane.org; Sat, 08 Dec 2007 18:45:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J19MY-00033F-9T for emacs-devel@gnu.org; Sat, 08 Dec 2007 18:45:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J19MW-000331-O9 for emacs-devel@gnu.org; Sat, 08 Dec 2007 18:45:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J19MW-00032y-Io for emacs-devel@gnu.org; Sat, 08 Dec 2007 18:45:36 -0500 Original-Received: from outmail1.freedom2surf.net ([194.106.33.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J19MW-0006Tc-6U for emacs-devel@gnu.org; Sat, 08 Dec 2007 18:45:36 -0500 Original-Received: from [192.168.249.28] (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail1.freedom2surf.net (Postfix) with ESMTP id 4C3C4503AE; Sat, 8 Dec 2007 23:45:35 +0000 (GMT) User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <87ejdxi7tl.fsf@escher.local.home> X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:84900 Archived-At: Stephen Berman wrote: > On GNU Emacs 23.0.50.3 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of > 2007-11-29 on escher I do the following: > > 1. emacs -Q > 2. M-x browse-url-emacs RET http://www.gnu.org RET > 3. After a short time a buffer www.gnu.org pops up containing the HTML > source of the gnu.org home page. This buffer is in Org mode, because > auto-mode-alist takes precedence over magic-fallback-mode-alist (if I > save the buffer as "testme" then C-x C-f opens the file in html-mode). > > I don't remember if cases like this were considered when this precedence > relation was established. If not, is the above an argument against this > precedence relation, or just evidence that we can't always DTRT, or is > it a bug that can be fixed while retaining the current precedence > relation? > The word fallback in the variable name suggests that it is intended to work this way. There is a corresponding magic-mode-alist which has higher priority. But the real bug is that www.gnu.org is being treated as a filename after being fetched by browse-url. It shouldn't be going anywhere near auto-mode-alist.