From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14710: add-file-local-variable vs. unquoted string Date: Tue, 25 Jun 2013 23:18:23 +0300 Organization: JURTA Message-ID: <87y59yhrzs.fsf@mail.jurta.org> References: <877ghjl0xm.fsf@jidanni.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372191612 21364 80.91.229.3 (25 Jun 2013 20:20:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 20:20:12 +0000 (UTC) Cc: jidanni@jidanni.org To: 14710@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 22:20:12 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrZim-0000Md-5B for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 22:20:12 +0200 Original-Received: from localhost ([::1]:53084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZil-0002Ge-Ns for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 16:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZih-0002EE-Bj for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrZif-0005Tv-5b for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:20:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZif-0005Ti-3Q for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:20:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UrZid-0000yA-Sh for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:20:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2013 20:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14710 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14710-submit@debbugs.gnu.org id=B14710.13721915723656 (code B ref 14710); Tue, 25 Jun 2013 20:20:03 +0000 Original-Received: (at 14710) by debbugs.gnu.org; 25 Jun 2013 20:19:32 +0000 Original-Received: from localhost ([127.0.0.1]:41030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrZi7-0000wt-72 for submit@debbugs.gnu.org; Tue, 25 Jun 2013 16:19:31 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:59727 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrZi2-0000wh-SN for 14710@debbugs.gnu.org; Tue, 25 Jun 2013 16:19:28 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id BE1F6258B9E91C; Tue, 25 Jun 2013 13:19:24 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 25 Jun 2013 09:06:52 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75591 Archived-At: > 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.