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: Wed, 9 Oct 2013 16:14:00 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1381349710 27621 80.91.229.3 (9 Oct 2013 20:15:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2013 20:15:10 +0000 (UTC) To: 15577@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 22:15:13 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 1VU0A5-0005Zv-44 for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2013 22:15:13 +0200 Original-Received: from localhost ([::1]:43746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU0A4-0008Rn-BS for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2013 16:15:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU0A0-0008PO-1r for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:15:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VU09u-0002tP-VV for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:15:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU09u-0002t0-Rm for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VU09u-0008Ma-8P for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: yary Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2013 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138134967232091 (code B ref -1); Wed, 09 Oct 2013 20:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Oct 2013 20:14:32 +0000 Original-Received: from localhost ([127.0.0.1]:38542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VU09P-0008LX-B0 for submit@debbugs.gnu.org; Wed, 09 Oct 2013 16:14:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47264) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VU09L-0008LL-UZ for submit@debbugs.gnu.org; Wed, 09 Oct 2013 16:14:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VU09K-0002j2-50 for submit@debbugs.gnu.org; Wed, 09 Oct 2013 16:14:27 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU09K-0002iy-2a for submit@debbugs.gnu.org; Wed, 09 Oct 2013 16:14:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU09I-00081a-Aw for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:14:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VU09G-0002i8-MZ for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:14:24 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:35876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VU09G-0002i4-CL for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2013 16:14:22 -0400 Original-Received: by mail-wi0-f182.google.com with SMTP id ez12so1476890wid.15 for ; Wed, 09 Oct 2013 13:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=j/45ITTET18EbG2oOxrUDu6WGptHg4dCWWkN2yZUSHI=; b=uKqKTTpDJM6/2SfoLMvJzzVWHejpFTB9Q5n7hlh2gp+GwkXXD975Fq3GwlOINtdqU1 4F8UIznsjpqfcN73EPUppc14yIA8sH1fhIOyRc6if0bAyZEAobL6gyVzmAXMwbcL2buz bo+8OLqSHx1+bO18SjtrHG0oSA9Xug5xPmbkbgqK0Tjkq1LTgM3txmXB0XdvWcAF0WS+ 0F7Qy9vawM0jtK7hoyFA5Tr7YEFjvmBJrVa5kdnFJ16fgdj2I9/QOQSYV+WnOXRuX+lD p9AkfYPiepmJ3fQbCImQtQkwTUz/4erg6ui4asagHzU/ps566S3LVi62iw6ihrUtpp2h 95JA== X-Received: by 10.194.78.78 with SMTP id z14mr8489640wjw.32.1381349660843; Wed, 09 Oct 2013 13:14:20 -0700 (PDT) Original-Received: by 10.194.83.72 with HTTP; Wed, 9 Oct 2013 13:14:00 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:79121 Archived-At: This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgment at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': If I create a ".dir-locals.el" that applies to all major modes, such as: ((nil . ((tab-width . 3)))) It works when first opening any file under that directory- good. But, if I switch the buffer's major-mode, it loses the directory-local tab-width - and I've seen it lose other variables as well. An alternate case showing the same is to have a ".dir-locals.el" like: ((js-mode . ((tab-width . 3)))) and opening a non-JS file in the directory, such as an HTML file, and then switching to js-mode. Since I'm now editing the file in js-mode, I would want it to read the js-mode dir-local variables. Losing dir-locals seems like a bug to me, though perhaps there is a reason for it. I did notice from other dir-local-related bugs that they require some thought as to how to handle edge cases... In GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' Important settings: value of $LANG: ENU locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Info Minor modes in effect: yas-global-mode: t yas-minor-mode: t global-auto-complete-mode: t diff-auto-refine-mode: t recentf-mode: t desktop-save-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums conf-mode sh-script smie executable info dos org-table org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb face-remap gtags js json moz imenu thingatpt vc-git js2-mode-autoloads finder-inf undo-tree-autoloads package multi-web-mode mumamo-fun mumamo-chunks amrita desktop-autosave hide-lines yasnippet help-mode auto-complete-config auto-complete popup flymake-jslint flymake php-mode etags cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align speedbar sb-image ezimage dframe psvn derived log-edit pcvs-util add-log diff-mode elp ediff-merg ediff-diff ediff-wind ediff-mult ediff-help ediff-init ediff-util dired emacsw32 w32-integ w32shell w32-grep rebind ourcomments-widgets ourcomments-util rx cus-edit cus-start cus-load uniquify recentf tree-widget mm-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio password-cache url-vars mailcap gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs ido grep compile comint ansi-color ring bookmark pp apropos mumamo byte-opt warnings bytecomp byte-compile cconv advice help-fns advice-preload sgml-mode ruby-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok mumamo-cmirr flyspell ispell desktop cc-engine cc-vars cc-defs new-key-seq-widget edmacro kmacro wid-edit hfyview easy-mmode easymenu htmlfontify cl-macs gv cl cl-lib noprint nxhtml-loader emacsw32-eol time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32 multi-tty emacs)