unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Drew Adams <drew.adams@oracle.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Two problems with directory-local variables
Date: Thu, 20 Sep 2018 23:59:12 +0300	[thread overview]
Message-ID: <874lejx4ef.fsf@mail.linkov.net> (raw)
In-Reply-To: <db13b6ab-a5de-476d-bb2f-b50e8b0c36fe@default> (Drew Adams's message of "Wed, 19 Sep 2018 18:42:42 -0700 (PDT)")

> I don't think there's a good design for this. Whatever some designer's intention
> beforehand might be, the result will be misleading in at least some contexts.
>
> And the problem is that when it's misleading (showing some dots but not
> others it can be even more confusing for users than consistently doing either
> what we do now - no dots for a list cdr, at all levels - or adding dots at all levels.
>
> I think (so far, but I might change my mind if I see a good argument) that this
> is really something that users of Lisp just have to get used to. It can be a
> gotcha - like getting used to quoting (when to quote and when not to). Lisp
> has a few such gotchas.
>
> We could I suppose have `print-dot-levels', like we have `print-level', to give
> code control over the level (top-down). That might be a little better than
> `print-dotted' (Boolean). But is it really worth it (needed)? I tend not to
> think it's worth it to have just a top-level `print-alist', in any case (and the
> alist might not be at top level).
>
> As Stefan said, "only the human coder can know which cons cell should be
> printed dotted and which shouldn't." I'd change "cell" to "cells", but
> otherwise I pretty much agree.

The root cause of the problem is requiring the alist value to be stored
in the CDR that prints with confusing dotted syntax especially bad for
hand-editing, instead of storing the value in the CAR of the CDR printed
with simpler list syntax.



      reply	other threads:[~2018-09-20 20:59 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
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 [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=874lejx4ef.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).