From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: dir-locals.el take precedence over user's mode-hook changes Date: Tue, 30 Dec 2008 17:54:05 -0800 (PST) Message-ID: <200812310154.mBV1s5at001247@mothra.ics.uci.edu> References: <200812241903.mBOJ3SjQ009445@mothra.ics.uci.edu> <87wsdpp9q8.fsf@jurta.org> <87sko5dxko.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1230688469 24130 80.91.229.12 (31 Dec 2008 01:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2008 01:54:29 +0000 (UTC) Cc: Tom Tromey , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 31 02:55:37 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LHqJ5-0003sU-Cw for ged-emacs-devel@m.gmane.org; Wed, 31 Dec 2008 02:55:35 +0100 Original-Received: from localhost ([127.0.0.1]:57764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHqHr-0002Hs-Gc for ged-emacs-devel@m.gmane.org; Tue, 30 Dec 2008 20:54:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LHqHn-0002Hn-5r for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:54:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LHqHl-0002Hb-IY for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:54:13 -0500 Original-Received: from [199.232.76.173] (port=49378 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHqHl-0002HY-Bo for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:54:13 -0500 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:60711) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LHqHk-0007I2-Pv for emacs-devel@gnu.org; Tue, 30 Dec 2008 20:54:13 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mBV1s5j7020814; Tue, 30 Dec 2008 17:54:05 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mBV1s5at001247; Tue, 30 Dec 2008 17:54:05 -0800 (PST) In-Reply-To: <87sko5dxko.fsf@jurta.org> (Juri Linkov's message of "Wed, 31 Dec 2008 01:59:03 +0200") Original-Lines: 42 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mBV1s5j7020814 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107439 Archived-At: Juri Linkov writes: > > So rather than "just" switch the order, we need to find a way for the > > user to be able to cleanly specify which behavior he wants on a case by > > case basis. > > Maybe something like > > ;; Pre-Local Variables: > ;; End: > > for variables set before mode hook or > > ;; Post-Local Variables: > ;; End: > > after mode hook. > > >> `bug-reference-url-format' set in Local Variables to the string > >> "http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s" > >> (BTW, this file-local variable should be moved to .dir-locals.el) > > > > Could you explain why you think it should be in dir-locals rather than > > in the file? > > In the Emacs tree we have more than 50 ChangeLog files and counting. > Many ChangeLog entries refer to the bug database and repeat the same > setting: > > ;; bug-reference-url-format: "http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=%s" > > Since this setting is project-wide it is better to have it in one place. > So e.g. later after changing the url only one place needs to be changing. > > >> And when I try to enable `bug-reference-mode' using the following hook: > >> (add-hook 'change-log-mode-hook 'bug-reference-mode) It would be even nicer to be able to turn on this minor mode in .dir-locals.el which together with setting bug-reference-url-format to the right value, would make this feature work for everyone by default with not .emacs changes. Same goes about being able to turn on minor modes in using "Local Variables".