From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: .dir-locals.el vs. guix-devel-mode Date: Mon, 28 Sep 2015 22:05:19 +0200 Message-ID: <87eghi1f9c.fsf@T420.taylan> References: <871tdm6i0i.fsf@gmail.com> <8737y28fss.fsf@gnu.org> <87d1x57yhg.fsf@gmail.com> <87si5zwqqu.fsf@gnu.org> <878u7qybjn.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgef9-0005aE-8k for guix-devel@gnu.org; Mon, 28 Sep 2015 16:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zgef8-0001vM-EB for guix-devel@gnu.org; Mon, 28 Sep 2015 16:04:39 -0400 In-Reply-To: <878u7qybjn.fsf_-_@gmail.com> (Alex Kost's message of "Mon, 28 Sep 2015 15:26:52 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost writes: > [...] > > More generally, I'm strongly against using "eval" in .dir-locals. IMO > this file should be used only to set local variables, and ideally it > shouldn't evaluate an arbitrary code. Just to clarify: I suppose you mean using eval for things other than which Emacs can automatically determine to be safe. E.g. (eval . (put 'foo 'scheme-indent-function )) for integer is safe; Emacs will eval that silently if I'm not mistaken. But for things where Emacs pesters the user because it finds it "unsafe," I find that very annoying. > So I think .dir-locals.el is not the proper place for indentation rules. > IMHO they should be moved to "guix-devel.el" and the manual should > recommend using 'guix-devel-mode' for editing guix package files as it > provides the proper indenting, highlighting and some useful key > bindings. IMO anything that can be put into .dir-locals.el without making Emacs pester the user should be put there. It's a delight for a Guix newb to get such settings automatically, because otherwise M-q and TAB will break existing correct indentation in edited source files, which is very annoying, and also it might lead to extra patch review round-trips when the user creates a patch with wrong indentation without noticing. Just my two cents as a passerby in this thread... Taylan