From: Juri Linkov <juri@jurta.org>
To: 14710@debbugs.gnu.org
Cc: jidanni@jidanni.org
Subject: bug#14710: add-file-local-variable vs. unquoted string
Date: Tue, 25 Jun 2013 23:18:23 +0300 [thread overview]
Message-ID: <87y59yhrzs.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvhagmbaza.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 25 Jun 2013 09:06:52 -0400")
> Good point. I fixed it with the patch below, which uses
> read-from-minibuffer (with a non-nil `read' argument) instead of
> read-string, so it re-uses the check that was already used when reading
> an Elisp expression.
FWIW, when I wrote `read-file-local-variable-value' I copied its code:
(read (read-string (format "Add %s with value (use quotes for strings): "
variable)
nil 'set-variable-value-history
(format "%S" ...
from `set-variable':
(read
(read-string prompt nil
'set-variable-value-history
(format "%S" ...
So `set-variable' seems to have the same problem, although
after entering a string without quotes with e.g.
`M-x set-variable RET compile-command RET a b c RET'
it checks `custom-type' of the entered value and reports the
error "Value `a' does not match type string of compile-command".
Perhaps this is not too problematic as long as `set-variable' is used
only for customizable options, and not for ordinary variables.
next prev parent reply other threads:[~2013-06-25 20:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 20:16 bug#14710: add-file-local-variable vs. unquoted string jidanni
2013-06-24 23:40 ` Juri Linkov
2013-06-24 23:56 ` Glenn Morris
2013-06-25 6:10 ` Juri Linkov
2013-06-25 6:56 ` martin rudalics
2013-06-25 7:42 ` Andreas Schwab
2013-06-25 13:06 ` Stefan Monnier
2013-06-25 20:18 ` Juri Linkov [this message]
2013-06-26 0:51 ` Stefan Monnier
2013-06-25 13:56 ` jidanni
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=87y59yhrzs.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=14710@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
/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).