From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Change `customize-save-variable' to work under "emacs -Q"? Date: Mon, 11 Jul 2011 15:04:56 -0400 Message-ID: <87d3hgprjb.fsf@stupidchicken.com> References: <877h7ok9cd.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310411662 4059 80.91.229.12 (11 Jul 2011 19:14:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2011 19:14:22 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: PJ Weisberg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 11 21:14:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QgLvu-0006SM-E5 for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2011 21:14:18 +0200 Original-Received: from localhost ([::1]:60649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgLvt-0004B7-Fa for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2011 15:14:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgLn0-0002Jw-OP for emacs-devel@gnu.org; Mon, 11 Jul 2011 15:05:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QgLmv-0007cZ-48 for emacs-devel@gnu.org; Mon, 11 Jul 2011 15:05:06 -0400 Original-Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]:52165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QgLmu-0007cQ-Pw for emacs-devel@gnu.org; Mon, 11 Jul 2011 15:05:00 -0400 Original-Received: from furball (dhcp128036225145.central.yale.edu [128.36.225.145]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p6BJ4uN3016883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 11 Jul 2011 15:04:57 -0400 In-Reply-To: (PJ Weisberg's message of "Mon, 11 Jul 2011 11:27:08 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.147 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141955 Archived-At: PJ Weisberg writes: > On Monday, July 11, 2011, Chong Yidong wrote: >> Lars Magne Ingebrigtsen writes: >> >>> If you run "emacs -Q", and you have a piece of code that calls >>> `customize-save-variable', it will error out, saying that it won't >>> overwrite the conf. >>> >>> Would anybody mind if I changed that function to not error out, but >>> instead just do a `setq' on the variable in question, if we're running >>> under -Q? >> >> I think this is fine. >> > If the user asks to save a variable for future sessions, but you can > only set it for the current session, *shouldn't* that be an error? Lars had a good point: if we commonly encounter the case where we want to do a "save if possible, otherwise setq" operation, it makes sense to make that easy to do. But, on reflection, maybe (ignore-errors (customize-save-variable ...)) would work just as well.