From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#8586: 23.3.50; Directory-local variable ignored when file-local variables set mode Date: Mon, 23 May 2011 13:04:34 -0400 Message-ID: References: <87vcxwzw47.fsf@sc3d.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1306170323 9233 80.91.229.12 (23 May 2011 17:05:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 May 2011 17:05:23 +0000 (UTC) Cc: 8586@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 23 19:05:15 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QOYZ1-0005iA-Pg for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 May 2011 19:05:07 +0200 Original-Received: from localhost ([::1]:59697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOYZ1-0006Ya-6Z for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 May 2011 13:05:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOYYx-0006WL-Kf for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 13:05:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOYYw-000546-NU for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 13:05:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOYYw-00053o-KJ for bug-gnu-emacs@gnu.org; Mon, 23 May 2011 13:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QOYYv-0006bl-OD; Mon, 23 May 2011 13:05:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87vcxwzw47.fsf@sc3d.org> Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 May 2011 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8586 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8586-submit@debbugs.gnu.org id=B8586.130617028525369 (code B ref 8586); Mon, 23 May 2011 17:05:01 +0000 Original-Received: (at 8586) by debbugs.gnu.org; 23 May 2011 17:04:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOYYf-0006b6-7b for submit@debbugs.gnu.org; Mon, 23 May 2011 13:04:45 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QOYYc-0006am-SK for 8586@debbugs.gnu.org; Mon, 23 May 2011 13:04:43 -0400 Original-Received: from localhost ([127.0.0.1]:38422) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOYYV-0000MS-GS; Mon, 23 May 2011 13:04:35 -0400 X-Spook: high security Treasury CISU Glock AMW fissionable militia X-Ran: B@VxQg&OGP=i|5ZZQ}0T[dJfM[[+?#3vWkmJ\,Cx+Zy>&4|{"=):tm8)<)HPgen:J_>9?L X-Hue: magenta X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 23 May 2011 13:05:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:46661 Archived-At: Reuben Thomas wrote: > While it would fix this bug, I'm not sure I approve: it looks as > though it makes things more complicated, and when the "real fix" > eventually arrives, would presumably have to remain in place for those > who'd adopted this partial solution in the mean time...not great. These comments don't apply. This isn't a partial solution, and no-one needs to "adopt" anything. I'm making set-auto-mode respect mode: cookies whether they be at the start or end of the file. That's how it should work, IMO. It also removes the "major mode must be specified first" restriction (bug#5239). The only issue I see with it is that normal-mode will be less efficient than it could be, because set-auto-mode and hack-local-variables may parse similar regions of the file in similar ways. Ideally, the file would be parsed only once to get coding:, mode: and variables, which would then be applied (also allowing bug#7169 to be fixed). But this is not straightforward to do, because these features are currently spread over at least 4 functions, so I don't see it happening any time soon.