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#15658: 24.1; (wishlist) Easy way to make a file-local variable also permanent-local Date: Sat, 19 Oct 2013 18:15:04 -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 1382220965 20411 80.91.229.3 (19 Oct 2013 22:16:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2013 22:16:05 +0000 (UTC) To: 15658@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 20 00:16:09 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 1VXeob-0001sJ-2P for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Oct 2013 00:16:09 +0200 Original-Received: from localhost ([::1]:34557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXeoa-0007zM-JB for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Oct 2013 18:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXeoW-0007z6-91 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:16:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXeoV-0002Er-9r for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:16:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXeoV-0002Em-6J for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VXeoU-0002Pj-IG for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: yary Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2013 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15658 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.13822209379238 (code B ref -1); Sat, 19 Oct 2013 22:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Oct 2013 22:15:37 +0000 Original-Received: from localhost ([127.0.0.1]:58325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXeo4-0002Ow-GV for submit@debbugs.gnu.org; Sat, 19 Oct 2013 18:15:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35153) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXeo1-0002Oe-SX for submit@debbugs.gnu.org; Sat, 19 Oct 2013 18:15:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXenv-0001uZ-I1 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 18:15:28 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXenv-0001uV-F9 for submit@debbugs.gnu.org; Sat, 19 Oct 2013 18:15:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXenu-0007xr-FF for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:15:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXent-0001uJ-F7 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:15:26 -0400 Original-Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:49759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXent-0001uF-8d for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2013 18:15:25 -0400 Original-Received: by mail-wg0-f44.google.com with SMTP id n12so5041340wgh.11 for ; Sat, 19 Oct 2013 15:15:24 -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=U0g40BmP64sljBfK56AfeVD4+FK5YU1h9YXpvPtbknU=; b=jZ0wQh3yG0lEO0TwTp8fxlh9HYj8l74g1XCFE0iw8W9+um9oWJ/7sUNnXhIxYYtv5Q bZcEu9aDZGrgNmQsE8wTcaCLDdywc2LGur4n8K3V6T3KL1la/ULzQuM/JDOW0TjRHxOF 2VJTXyL7hOZ5ZchgIEi+AdS7i6PLe23irbhdO5GXy05daMqmX7L8y/mSlnI0xwkMew/F Zu41KpP7TkWCLSKeOSFqPKOJuPUSLB2QBmhSxyTP9bjbxoGy0G45PcAq3P8NfYsPB1sI 8fGDAutb36PRmAoT+havKDHGfXZc470J/PaBpMsxqtwo+RK8rVrayFJHE7MNuYNIfywM BTkw== X-Received: by 10.180.189.132 with SMTP id gi4mr4236302wic.19.1382220924459; Sat, 19 Oct 2013 15:15:24 -0700 (PDT) Original-Received: by 10.194.83.72 with HTTP; Sat, 19 Oct 2013 15:15:04 -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:79408 Archived-At: There are occasional needs to preserve buffer-local variables across major-mode changes. In the specific case of directory-local variables, an automated solution looks to be feasible, see "bug#15577: 24.3; dir-local variables not applied when switching major-mode" File-local variables on the other hand are not as easy to categorize as to their intent- for a particular mode, vs the file contents in general. I propose adding `permanent' as another special "variable name" (along the lines of `mode', `eval', `coding', and `unibyte') to let people mark the file variables they want to remain between mode changes. For example: ; mode: Lisp ; fill-column: 75 ; comment-column: 50 ; permanent: fill-column tab-width would set & keep fill-column at 75 between mode changes, and would preserve between major-mode switches any changes to tab-width. (There is one edge case with this proposal: what would `permanent: eval' do? Re-evaluate all `eval' file variables after a mode change? And `permanent: mode' would have to be ignored or give a warning.) In GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) of 2012-06-10 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --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' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-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 line-number-mode: t transient-mark-mode: t