From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13646: mode-specific and file-regexp-specific settings Date: Thu, 07 Feb 2013 11:18:12 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360254700 30677 80.91.229.3 (7 Feb 2013 16:31:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Feb 2013 16:31:40 +0000 (UTC) Cc: 13646@debbugs.gnu.org, viniciusjl@ig.com.br To: Didier Verna Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 07 17:31:59 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 1U3UOE-0006J8-JC for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 17:31:58 +0100 Original-Received: from localhost ([::1]:56134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UNv-0001EU-Oc for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Feb 2013 11:31:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UNs-0001Dm-52 for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:31:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3UBL-0001xB-OC for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:18:53 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3UBL-0001x7-Js for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:18:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U3UCf-0001TO-H8 for bug-gnu-emacs@gnu.org; Thu, 07 Feb 2013 11:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Feb 2013 16:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13646-submit@debbugs.gnu.org id=B13646.13602539935644 (code B ref 13646); Thu, 07 Feb 2013 16:20:01 +0000 Original-Received: (at 13646) by debbugs.gnu.org; 7 Feb 2013 16:19:53 +0000 Original-Received: from localhost ([127.0.0.1]:42216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3UCV-0001Su-Uj for submit@debbugs.gnu.org; Thu, 07 Feb 2013 11:19:52 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:60611) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3UCO-0001SZ-5N; Thu, 07 Feb 2013 11:19:48 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r17GIDRq031355; Thu, 7 Feb 2013 11:18:13 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 337B7B4030; Thu, 7 Feb 2013 11:18:13 -0500 (EST) In-Reply-To: (Didier Verna's message of "Thu, 07 Feb 2013 15:44:35 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4485=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4485> : streams <902222> : uri <1339282> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:70817 Archived-At: retitle 13646 Mode-specific and file-regexp-specific settings thanks > Another (more personal) argument, is that in general, I don't like the > idea of having settings for a single functionality scattered all over > the place. I prefer to see those settings in a centralized place, say > a customization buffer. We all agree. Of course this is like "the expression problem", in that there are various ways to group settings. I think the idea is good, but I don't think the solution should be specific to whitespace.el. Maybe we should instead extend dir-local settings so you can specify a dir-local class via a regexp (and accept several dir-local classes for a given directory, or even allow mapping a directory-regexp directly to a set of vars without going through a class). Also, we should introduce a way to set variables to a value that is mode-dependent. Maybe something like (setq-modes whitespace-style (foo-mode 'face) (bar-mode 'trailing) (t 'tab-mark)) Which could turn into something akin to (setq-default whitespace-style 'tab-mark) (add-hook 'bar-mode-hook (lambda () (setq-local whitespace-style 'trailing))) (add-hook 'foo-mode-hook (lambda () (setq-local whitespace-style 'face))) Stefan