all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Two problems with directory-local variables
Date: Tue, 18 Sep 2018 03:19:51 +0300	[thread overview]
Message-ID: <87sh27eizs.fsf@mail.linkov.net> (raw)
In-Reply-To: <475f19d58094495c2a56d829bb7bbdd5@webmail.orcon.net.nz> (Phil Sainty's message of "Tue, 18 Sep 2018 12:04:44 +1200")

>> When I tried [add-dir-local-variable] it correctly added
>>   ((nil
>>     (eval message "hello")))
>
> 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.
>
> i.e. To my mind, (eval message "hello") is liable to confuse people,
> whereas (eval . (message "hello")) is rather clear.
>
> Of course we wouldn't want this to end up in the file either:
> (eval . (message . ("hello" . nil)))
>
> I guess we'd need some code to only 'dot' the high level elements,
> but not the values.
>
> I don't suppose anything like that already exists?

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.



  reply	other threads:[~2018-09-18  0:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17  8:08 Two problems with directory-local variables Marcin Borkowski
2018-09-17  9:28 ` Phil Sainty
2018-09-17 15:45   ` Marcin Borkowski
2018-09-17 23:15     ` Juri Linkov
2018-09-18  0:04       ` Phil Sainty
2018-09-18  0:19         ` Juri Linkov [this message]
2018-09-18  2:15           ` Stefan Monnier
2018-09-19 22:38             ` Juri Linkov
2018-09-20  1:42               ` Drew Adams
2018-09-20 20:59                 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sh27eizs.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.