From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Two problems with directory-local variables Date: Mon, 17 Sep 2018 22:15:07 -0400 Message-ID: References: <87a7ogzgul.fsf@mbork.pl> <1d2129643cecde529cb9b47e4e015c48@webmail.orcon.net.nz> <87y3c0xh44.fsf@mbork.pl> <87k1njyav9.fsf@mail.linkov.net> <475f19d58094495c2a56d829bb7bbdd5@webmail.orcon.net.nz> <87sh27eizs.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537236860 1024 195.159.176.226 (18 Sep 2018 02:14:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Sep 2018 02:14:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 18 04:14:16 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g25Wn-000068-1o for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2018 04:14:13 +0200 Original-Received: from localhost ([::1]:38107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g25Yt-000322-Kn for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2018 22:16:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g25Xu-0002zI-GK for emacs-devel@gnu.org; Mon, 17 Sep 2018 22:15:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g25Xr-0004yA-DA for emacs-devel@gnu.org; Mon, 17 Sep 2018 22:15:22 -0400 Original-Received: from [195.159.176.226] (port=47923 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g25Xr-0004qq-3o for emacs-devel@gnu.org; Mon, 17 Sep 2018 22:15:19 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1g25Ve-00075i-60 for emacs-devel@gnu.org; Tue, 18 Sep 2018 04:13:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:FfGC4vQkb4JA17XTw7o/8tNh+mM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229930 Archived-At: >> On this note, while I don't use the commands myself, I've often wished >> that add-dir-local-variable would generate the dotted-pair syntax, >> because I've often seen confusion about the syntax of dir-locals arising >> from dotted vs non-dotted possibilities, and I feel strongly that the >> dotted syntax is the most readable for these files. Agreed. We should probably have a `print-alist` kind of function for that purpose and then try and make use of it from add-dir-local-variable. > I don't know if something exists that could allow printing dotted syntax for > > (pp-to-string '(eval message "hello")) > > In its implementation I see the references to print-escape-newlines > and print-quoted, but there is no print-dotted. I don't think we could add a print-dotted because as you say we don't want (eval . (message . ("hello" . nil))) and only the human coder can know which cons cell should be printed dotted and which shouldn't. Stefan