From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 17:04:40 2013 Received: (at submit) by debbugs.gnu.org; 24 Jun 2013 21:04:40 +0000 Received: from localhost ([127.0.0.1]:39097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrDwG-00045D-F8 for submit@debbugs.gnu.org; Mon, 24 Jun 2013 17:04:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56032) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrDwE-00044w-5j for submit@debbugs.gnu.org; Mon, 24 Jun 2013 17:04:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrDw7-0005o6-8f for submit@debbugs.gnu.org; Mon, 24 Jun 2013 17:04:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_20,T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDw7-0005nx-5g for submit@debbugs.gnu.org; Mon, 24 Jun 2013 17:04:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDw5-0001EU-2Y for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2013 17:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrDw1-0005kz-2i for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2013 17:04:28 -0400 Received: from caiajhbdcaid.dreamhost.com ([208.97.132.83]:52103 helo=homiemail-a4.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrDw0-0005jq-Q7 for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2013 17:04:25 -0400 Received: from homiemail-a4.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a4.g.dreamhost.com (Postfix) with ESMTP id 2CFBC51C069 for ; Mon, 24 Jun 2013 14:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=v4sQRVJ81R+rTk4FRIgx/d639bw=; b=B6I+ZawCLs8+h1EQ 5aMoeyrGOEjgeI3BpPPM+RclOrLyE83jZw2om9tAapMxirZc1WWJwv6lYUhnhOHk 7JNeE6VGnTE2lcvKR1y4qTIOb9CK1qq0tMVWpSh71kKLnvc977XG1j+23xaEbd12 g0kXgm2jzPWE23oI3zUcEzpYfcM= Received: from jidanni.org (114-26-40-214.dynamic.hinet.net [114.26.40.214]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a4.g.dreamhost.com (Postfix) with ESMTPSA id E4D2251C05F for ; Mon, 24 Jun 2013 14:04:22 -0700 (PDT) From: jidanni@jidanni.org To: bug-gnu-emacs@gnu.org Subject: add-file-local-variable vs. unquoted string Date: Tue, 25 Jun 2013 04:16:05 +0800 Message-ID: <877ghjl0xm.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Try M-x add-file-local-variable compile-command a b c Note how b c are thrown away. Yes the user should have typed "a b c", but still some warning should be printed upon throwing them away. Package: emacs-snapshot Version: 2:20130618-1 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 19:50:22 2013 Received: (at 14710) by debbugs.gnu.org; 24 Jun 2013 23:50:22 +0000 Received: from localhost ([127.0.0.1]:39189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrGWc-0002K8-1w for submit@debbugs.gnu.org; Mon, 24 Jun 2013 19:50:22 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:56704 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrGWa-0002Jw-1L for 14710@debbugs.gnu.org; Mon, 24 Jun 2013 19:50:20 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 0C678258B9E915; Mon, 24 Jun 2013 16:50:17 -0700 (PDT) From: Juri Linkov To: jidanni@jidanni.org Subject: Re: bug#14710: add-file-local-variable vs. unquoted string Organization: JURTA References: <877ghjl0xm.fsf@jidanni.org> Date: Tue, 25 Jun 2013 02:40:40 +0300 In-Reply-To: <877ghjl0xm.fsf@jidanni.org> (jidanni@jidanni.org's message of "Tue, 25 Jun 2013 04:16:05 +0800") Message-ID: <8738s7t6ok.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14710 Cc: 14710@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Try > M-x add-file-local-variable > compile-command > a b c > > Note how b c are thrown away. That's because `add-file-local-variable' takes care about writing only correct values that could be read later without errors. > Yes the user should have typed "a b c", > but still some warning should be printed upon throwing them away. I have no idea how such a warning could be produced, and even if we will found a way to detect the situation when it should be displayed, you won't see it anyway because it will be instantaneously overwritten in the echo area by another recently added message: "For this change to take effect revisit file using `revert-buffer'". From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 19:56:54 2013 Received: (at 14710) by debbugs.gnu.org; 24 Jun 2013 23:56:55 +0000 Received: from localhost ([127.0.0.1]:39198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrGcw-0002Uu-HJ for submit@debbugs.gnu.org; Mon, 24 Jun 2013 19:56:54 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57726 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrGcu-0002Um-SD for 14710@debbugs.gnu.org; Mon, 24 Jun 2013 19:56:53 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UrGct-0000Oy-Qq; Mon, 24 Jun 2013 19:56:51 -0400 From: Glenn Morris To: Juri Linkov Subject: Re: bug#14710: add-file-local-variable vs. unquoted string References: <877ghjl0xm.fsf@jidanni.org> <8738s7t6ok.fsf@mail.jurta.org> X-Spook: Bruxelles South Africa Saddam Hussein Blowpipe S Key X-Ran: K4s1n1,kFwQ_6SE$w"v@B~4uOm7ng-=|I"1'q"q`eB|ITqf'lPJQ]BJpS-E7,jv#xc+_g8 X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 24 Jun 2013 19:56:51 -0400 In-Reply-To: <8738s7t6ok.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 25 Jun 2013 02:40:40 +0300") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: 14710 Cc: 14710@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.1 (------) Juri Linkov wrote: > displayed, you won't see it anyway because it will be instantaneously > overwritten in the echo area by another recently added message: > "For this change to take effect revisit file using `revert-buffer'". Could use display-warning. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 02:14:59 2013 Received: (at 14710) by debbugs.gnu.org; 25 Jun 2013 06:15:00 +0000 Received: from localhost ([127.0.0.1]:39462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrMWp-0003SQ-Ix for submit@debbugs.gnu.org; Tue, 25 Jun 2013 02:14:59 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:55312 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrMWn-0003SI-QU for 14710@debbugs.gnu.org; Tue, 25 Jun 2013 02:14:58 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 1BD07258B9E938; Mon, 24 Jun 2013 23:14:55 -0700 (PDT) From: Juri Linkov To: Glenn Morris Subject: Re: bug#14710: add-file-local-variable vs. unquoted string Organization: JURTA References: <877ghjl0xm.fsf@jidanni.org> <8738s7t6ok.fsf@mail.jurta.org> Date: Tue, 25 Jun 2013 09:10:00 +0300 In-Reply-To: (Glenn Morris's message of "Mon, 24 Jun 2013 19:56:51 -0400") Message-ID: <87k3liai8n.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14710 Cc: 14710@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) >> displayed, you won't see it anyway because it will be instantaneously >> overwritten in the echo area by another recently added message: >> "For this change to take effect revisit file using `revert-buffer'". > > Could use display-warning. display-warning pops up a new window, and this changes the window configuration that might be undesirable for users. I wonder why display-warning doesn't support the warning display in the echo area? I see no problem with displaying multi-line messages in the echo area. But anyway for the given report it seems too late to display the warning after a wrong value is inserted to the buffer. I suggest to display the warning before entering a string value by changing the prompt from Add compile-command with value: a b c to Add compile-command with value (use quotes for strings): "a b c" === modified file 'lisp/files-x.el' --- lisp/files-x.el 2013-06-19 22:39:41 +0000 +++ lisp/files-x.el 2013-06-25 06:09:04 +0000 @@ -88,7 +88,8 @@ (defun read-file-local-variable-value (v (format "Add %s with value: " variable)) default)) (t - (read (read-string (format "Add %s with value: " variable) + (read (read-string (format "Add %s with value (use quotes for strings): " + variable) nil 'set-variable-value-history (format "%S" (cond ((eq variable 'unibyte) t) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 02:56:56 2013 Received: (at 14710) by debbugs.gnu.org; 25 Jun 2013 06:56:56 +0000 Received: from localhost ([127.0.0.1]:39518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNBP-0004aH-J1 for submit@debbugs.gnu.org; Tue, 25 Jun 2013 02:56:55 -0400 Received: from mout.gmx.net ([212.227.15.15]:49453) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNBL-0004Zz-Sh for 14710@debbugs.gnu.org; Tue, 25 Jun 2013 02:56:53 -0400 Received: from mailout-de.gmx.net ([10.1.76.32]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Ljfl8-1UG6YH1Q8u-00bauV for <14710@debbugs.gnu.org>; Tue, 25 Jun 2013 08:56:45 +0200 Received: (qmail invoked by alias); 25 Jun 2013 06:56:45 -0000 Received: from 62-47-49-71.adsl.highway.telekom.at (EHLO [62.47.49.71]) [62.47.49.71] by mail.gmx.net (mp032) with SMTP; 25 Jun 2013 08:56:45 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+rid9bsN6rnZFs00g1DJO+Fbm8g5/70QsXMeJ1FK ju7J3ybRitmxvb Message-ID: <51C93F23.6020602@gmx.at> Date: Tue, 25 Jun 2013 08:56:35 +0200 From: martin rudalics MIME-Version: 1.0 To: Juri Linkov Subject: Re: bug#14710: add-file-local-variable vs. unquoted string References: <877ghjl0xm.fsf@jidanni.org> <8738s7t6ok.fsf@mail.jurta.org> <87k3liai8n.fsf@mail.jurta.org> In-Reply-To: <87k3liai8n.fsf@mail.jurta.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14710 Cc: Glenn Morris , 14710@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > display-warning pops up a new window, and this changes the > window configuration that might be undesirable for users. It could use `with-help-window' so `q' removes the window as quietly as possible. > I wonder why display-warning doesn't support the warning display > in the echo area? I see no problem with displaying multi-line > messages in the echo area. Strictly spoken, this changes the window configuration as well because it has to change the size of at least one other window. martin From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 03:42:21 2013 Received: (at 14710) by debbugs.gnu.org; 25 Jun 2013 07:42:21 +0000 Received: from localhost ([127.0.0.1]:39580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNtM-0005zJ-NS for submit@debbugs.gnu.org; Tue, 25 Jun 2013 03:42:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52294 helo=mx2.suse.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNtI-0005z8-Ll for 14710@debbugs.gnu.org; Tue, 25 Jun 2013 03:42:17 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 12083A52D8; Tue, 25 Jun 2013 09:42:15 +0200 (CEST) From: Andreas Schwab To: Juri Linkov Subject: Re: bug#14710: add-file-local-variable vs. unquoted string References: <877ghjl0xm.fsf@jidanni.org> <8738s7t6ok.fsf@mail.jurta.org> <87k3liai8n.fsf@mail.jurta.org> X-Yow: I'm continually AMAZED at th'breathtaking effects of WIND EROSION!! Date: Tue, 25 Jun 2013 09:42:14 +0200 In-Reply-To: <87k3liai8n.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 25 Jun 2013 09:10:00 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: 14710 Cc: Glenn Morris , 14710@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.1 (------) Juri Linkov writes: > - (read (read-string (format "Add %s with value: " variable) > + (read (read-string (format "Add %s with value (use quotes for strings): " > + variable) Just say it's a sexp. Strings are not special here. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 09:07:01 2013 Received: (at 14710-done) by debbugs.gnu.org; 25 Jun 2013 13:07:01 +0000 Received: from localhost ([127.0.0.1]:40018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrSxZ-0001yd-E8 for submit@debbugs.gnu.org; Tue, 25 Jun 2013 09:07:01 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:27061) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrSxW-0001yI-PD for 14710-done@debbugs.gnu.org; Tue, 25 Jun 2013 09:06:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFMCppA/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDYhCBrEfkA6NYYMpA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFMCppA/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDYhCBrEfkA6NYYMpA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="17111330" Received: from 76-10-154-64.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.154.64]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Jun 2013 09:06:47 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 597F6AE246; Tue, 25 Jun 2013 09:06:52 -0400 (EDT) From: Stefan Monnier To: jidanni@jidanni.org Subject: Re: bug#14710: add-file-local-variable vs. unquoted string Message-ID: References: <877ghjl0xm.fsf@jidanni.org> Date: Tue, 25 Jun 2013 09:06:52 -0400 In-Reply-To: <877ghjl0xm.fsf@jidanni.org> (jidanni@jidanni.org's message of "Tue, 25 Jun 2013 04:16:05 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 14710-done Cc: 14710-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Try > M-x add-file-local-variable > compile-command > a b c > Note how b c are thrown away. > Yes the user should have typed "a b c", > but still some warning should be printed upon throwing them away. 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. Stefan === modified file 'lisp/files-x.el' --- lisp/files-x.el 2013-06-18 20:38:43 +0000 +++ lisp/files-x.el 2013-06-25 12:59:31 +0000 @@ -71,12 +69,14 @@ (format "Add %s with value: " variable)) default)) (t - (read (read-string (format "Add %s with value: " variable) - nil 'set-variable-value-history - (format "%S" + (let ((default (format "%S" (cond ((eq variable 'unibyte) t) ((boundp variable) - (symbol-value variable)))))))))) + (symbol-value variable))))) + (minibuffer-completing-symbol t)) + (read-from-minibuffer (format "Add %s with value: " variable) + nil read-expression-map t + 'set-variable-value-history))))) (defun read-file-local-variable-mode () "Read per-directory file-local variable's mode using completion. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 09:57:54 2013 Received: (at 14710-done) by debbugs.gnu.org; 25 Jun 2013 13:57:54 +0000 Received: from localhost ([127.0.0.1]:40463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrTkm-0003gU-WE for submit@debbugs.gnu.org; Tue, 25 Jun 2013 09:57:53 -0400 Received: from caiajhbdcbhh.dreamhost.com ([208.97.132.177]:32965 helo=homiemail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrTji-0003fA-SX for 14710-done@debbugs.gnu.org; Tue, 25 Jun 2013 09:56:48 -0400 Received: from homiemail-a7.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTP id DD5C225C062; Tue, 25 Jun 2013 06:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=+UimwsH3S7H9eMy4SdoCIBbJN9I=; b=KrMktsJTcsnQv BaZwSrTHzCkcqvcyE5wvtuZRqxyoCgfvJy0qd1VytIoaSZbRDlIoXkXO7i9qm2Qu LbEwMiaEBEGoe/6tIMx+nABQHoUnVmhOoJQcbw0SmWKVE4AYqsACyZmbPJD2RYeR OkcrroeHrNfUB1IaMYLRu2IFfbDIOM= Received: from jidanni.org (36-234-7-56.dynamic-ip.hinet.net [36.234.7.56]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPSA id 8C25325C06D; Tue, 25 Jun 2013 06:56:45 -0700 (PDT) From: jidanni@jidanni.org To: monnier@iro.umontreal.ca Subject: Re: bug#14710: add-file-local-variable vs. unquoted string References: Date: Tue, 25 Jun 2013 21:56:42 +0800 Message-ID: <87fvw6pa3p.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14710-done Cc: 14710-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) You're a wiz. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 16:19:32 2013 Received: (at 14710) by debbugs.gnu.org; 25 Jun 2013 20:19:32 +0000 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 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 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) From: Juri Linkov To: 14710@debbugs.gnu.org Subject: Re: bug#14710: add-file-local-variable vs. unquoted string Organization: JURTA References: <877ghjl0xm.fsf@jidanni.org> Date: Tue, 25 Jun 2013 23:18:23 +0300 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Jun 2013 09:06:52 -0400") Message-ID: <87y59yhrzs.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14710 Cc: monnier@iro.umontreal.ca, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 25 20:51:16 2013 Received: (at 14710) by debbugs.gnu.org; 26 Jun 2013 00:51:16 +0000 Received: from localhost ([127.0.0.1]:41384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Urdx5-0000RG-R7 for submit@debbugs.gnu.org; Tue, 25 Jun 2013 20:51:16 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8236) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Urdx3-0000Qs-VZ for 14710@debbugs.gnu.org; Tue, 25 Jun 2013 20:51:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppA/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFMCppA/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="17169884" Received: from 76-10-154-64.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.64]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Jun 2013 20:51:03 -0400 Received: by pastel.home (Postfix, from userid 20848) id EC6C1678F1; Tue, 25 Jun 2013 20:51:07 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#14710: add-file-local-variable vs. unquoted string Message-ID: References: <877ghjl0xm.fsf@jidanni.org> <87y59yhrzs.fsf@mail.jurta.org> Date: Tue, 25 Jun 2013 20:51:07 -0400 In-Reply-To: <87y59yhrzs.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 25 Jun 2013 23:18:23 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 14710 Cc: 14710@debbugs.gnu.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > So `set-variable' seems to have the same problem, although Indeed, thanks, Stefan From unknown Thu Aug 14 18:40:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Jul 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator