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: Sun, 20 Oct 2013 09:00:57 -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 1382274134 28344 80.91.229.3 (20 Oct 2013 13:02:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2013 13:02:14 +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 Sun Oct 20 15:02:17 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 1VXse9-0004Pe-9j for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Oct 2013 15:02:17 +0200 Original-Received: from localhost ([::1]:36064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXse9-0003VD-07 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Oct 2013 09:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXse0-0003V4-SK for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2013 09:02:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXsdu-0001x3-RE for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2013 09:02:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXsdu-0001wz-Nq for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2013 09:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VXsdu-0000rC-3v for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2013 09:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: yary Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Oct 2013 13:02: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.13822740863247 (code B ref 15577); Sun, 20 Oct 2013 13:02:02 +0000 Original-Received: (at 15577) by debbugs.gnu.org; 20 Oct 2013 13:01:26 +0000 Original-Received: from localhost ([127.0.0.1]:58800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXsdJ-0000qI-NE for submit@debbugs.gnu.org; Sun, 20 Oct 2013 09:01:26 -0400 Original-Received: from mail-wg0-f46.google.com ([74.125.82.46]:44665) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXsdH-0000q2-8e for 15577@debbugs.gnu.org; Sun, 20 Oct 2013 09:01:24 -0400 Original-Received: by mail-wg0-f46.google.com with SMTP id m15so5391633wgh.1 for <15577@debbugs.gnu.org>; Sun, 20 Oct 2013 06:01:17 -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=PvWZm2FHfsln45t0A1moAz2Xp7986tHGVh9Z2irIh9c=; b=toM8ZIc1b9D6e0T1qYMctJ+Vxgey+nu8pgrDKNrNYa/wQ/ucpqFF0SyelzsvO9aDyL NpclANd0SINiRgU1zE/yu1s8+yo9Jh39Bf72qL/L4Ea+Wx75f32yRyuRO5p1WnPwawU4 8o2f0L3rY0U8Qt+CqLOUOPIZKChMN8DjnyMwXTsjxI588dau7u4BYRMZVH0hwfaE0Qcm qVpYgkkqHAhFSpaT4TKybZkTiNBfhrAxhujzdGhtW0brFb6rT1WmlNzhFjRFa7HWo7aJ gg1zQAxYN3p2wyQ2lW0B5mWAeahjnoZoN8RrSUqZPZrPZOLLoNk1WFlZVUBNvFO+1/Tb Xf+A== X-Received: by 10.194.104.42 with SMTP id gb10mr9712270wjb.16.1382274077477; Sun, 20 Oct 2013 06:01:17 -0700 (PDT) Original-Received: by 10.194.83.72 with HTTP; Sun, 20 Oct 2013 06:00:57 -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:79417 Archived-At: For anyone following this discussion, I moved the non-dir-local parts to: bug#15658: Easy way to make a file-local variable also permanent-local bug#15659: Simple method for preserving minor-mode >> Moving dir-local setup code to after-change-major-mode-hook would be a >> simple fix for issue #1. File-local (as it is now) in >> after-change-major-mode-hook would cause some problems eg. if a >> file-local sets the mode! > >Obviously if we move the mode-setting part, we introduce a bug, so we >wouldn't move it (it's already handled separately for the same kind of >reasons). Right. So it looks like a patch for moving dir-local setup to after-change-major-mode-hook is in order. Where I fall down in the implementation is figuring out what exactly changes so that I don't change behavior for find-file or kill-all-local-variables, and also don't set dir-locals twice when opening a file (without using defadvice which seems wrong in the core). Plus I'd have to get started as a contributor. Neither are insurmountable, though I think I don't have much more time to devote to these at the moment.