From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: yary Newsgroups: gmane.emacs.bugs Subject: bug#15577: 24.3; dir-local variables not applied when switching major-mode Date: Thu, 10 Oct 2013 19:12:22 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1381446797 26174 80.91.229.3 (10 Oct 2013 23:13:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Oct 2013 23:13:17 +0000 (UTC) Cc: 15577 <15577@debbugs.gnu.org> To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 11 01:13:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VUPPy-0001hT-Hf for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Oct 2013 01:13:18 +0200 Original-Received: from localhost ([::1]:51654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUPPy-0005wL-1t for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2013 19:13:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUPPp-0005w2-F2 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 19:13:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUPPj-0007eY-9t for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 19:13:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUPPj-0007eQ-5v for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 19:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VUPPi-0006du-M7 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2013 19:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: yary Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2013 23:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15577-submit@debbugs.gnu.org id=B15577.138144676625512 (code B ref 15577); Thu, 10 Oct 2013 23:13:02 +0000 Original-Received: (at 15577) by debbugs.gnu.org; 10 Oct 2013 23:12:46 +0000 Original-Received: from localhost ([127.0.0.1]:41791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUPPS-0006dP-3l for submit@debbugs.gnu.org; Thu, 10 Oct 2013 19:12:46 -0400 Original-Received: from mail-wi0-f181.google.com ([209.85.212.181]:45263) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VUPPP-0006dG-0v for 15577@debbugs.gnu.org; Thu, 10 Oct 2013 19:12:44 -0400 Original-Received: by mail-wi0-f181.google.com with SMTP id l12so205780wiv.2 for <15577@debbugs.gnu.org>; Thu, 10 Oct 2013 16:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=FZpPiTRRD/2R/SPpOjhG7/cfaf/PqVUUsGyC98vwe+4=; b=Yo8niw/5ZpoZvqP4Z6thWTv2JsolB9dsw2BbU+vHVylvzFtNEhuiD5VQSwBZf9UBxR 6w+f/LvwjsQX2cDJcVb8H+ZWQM7jnF+ziiGIiu/q+S2T0+0y6Z9DG5yA4AHcBfM2pLuV QhYH5jXtIyaPtJ0yoLWcWmwZ7ZHY4yS2wObLyr1fPN2U8PRnE+tMhIqAGPcaxnC9jrbk XL+yT1l5Z4Y57WbJn9JgudnN0YCCh9VhLmL6f3d9OE4eDoL5R/NcAX7KYw/GaLMs6ci+ QFaOTVXgpnV18PE8EzLAdVChIBlcXhPMONqqsBArvRDsUavPLDgU3+JoiHVoDeaJ2qGA Oy3g== X-Received: by 10.195.13.45 with SMTP id ev13mr14324984wjd.20.1381446762329; Thu, 10 Oct 2013 16:12:42 -0700 (PDT) Original-Received: by 10.194.83.72 with HTTP; Thu, 10 Oct 2013 16:12:22 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:79169 Archived-At: @Glenn "slightly impolite to post the same question to two different places" -Understood, but this is a bug report, different purpose from Stackoverflow question- and thus "are you happy with the answers you have, or do you want Emacs to change?"- both! The answers are a workaround for the current situation, but are slightly imperfect, and as Stefan just wrote the current scheme is "at least undesirable behavior." The problem with the "(add-hook 'after-change-major-mode-hook 'hack-local-variables)" workaround and its variants, is when a major-mode is set by a file-local variable- changing major mode will reload the local variables, which will revert the major-mode again! And the trouble with current Emacs out-of-the-box behavior is not gaining the relevant file-local and dir-local variables for a new major-mode when changing to that major-mode. I'd like to see a well-thought-out solution in some future release.