From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Using "Emacs Configure" **and** modifying .emacs Date: Sat, 12 Aug 2017 02:15:22 +0200 Message-ID: <86378xskth.fsf@zoho.com> References: <1502373086.1171866.1069247696.71F9FED4@webmail.messagingengine.com> <8660dvuzsr.fsf@zoho.com> <1502436066.2568371.1070085968.1D25E0E7@webmail.messagingengine.com> <87tw1ekxgo.fsf@127.0.0.1> <867ey9sva2.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1502496993 28671 195.159.176.226 (12 Aug 2017 00:16:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Aug 2017 00:16:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 02:16:28 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgK6L-00075W-BO for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 02:16:25 +0200 Original-Received: from localhost ([::1]:34137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgK6R-0007uL-NO for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Aug 2017 20:16:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgK5l-0007tR-7y for help-gnu-emacs@gnu.org; Fri, 11 Aug 2017 20:15:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgK5i-0001Sv-2y for help-gnu-emacs@gnu.org; Fri, 11 Aug 2017 20:15:49 -0400 Original-Received: from [195.159.176.226] (port=36308 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgK5h-0001Sb-S4 for help-gnu-emacs@gnu.org; Fri, 11 Aug 2017 20:15:46 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dgK5Q-00047D-Tm for help-gnu-emacs@gnu.org; Sat, 12 Aug 2017 02:15:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 49 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:/jJn5FiqoDPI4gQ7ffzJY9Bq42o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113998 Archived-At: Drew Adams wrote: > And that's not hard to do: just use > `customize-variable' instead of `setq', for > user options. How hard is that? If you want > something shorter, define an alias... I don't think it is about being difficult, or long, rather what is the benefit? What kind of function(s) get triggered? Is it to ensure the new value of the variable makes sense? That is, some variant of validating the input? Or is it to control behavior in a wider sense, so that some function, that does something, is set to something depending on the value of the variable? If so (the second case), I would simply have a function, one umbrella function, that branches depending on the variable value and executes the desired function - i.e. no need to change anything, but only act differently depending on the value. It could simply signal an error if the value doesn't make sense, or if there is no corresponding function to execute yet implemented, which amounts to practically the same. If it is about validation, i.e. making sure the variable value makes sense (is within some range or have a certain type; is a member of the input domain set) then I never bothered with that. Some people say you should "always" validate input, but I never bothered. Errors come up to surface anyway almost immediately and I never had a problem with "ghost errors" that linger on in the system for ages... at least none that I'm aware of :) -- underground experts united http://user.it.uu.se/~embe8573