From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mauricio Newsgroups: gmane.emacs.help Subject: Re: Replacing custom-set-variables Date: Mon, 15 Sep 2008 11:06:39 -0300 Message-ID: <48CE6BEF.9080305@yahoo.com> References: <87vdwzcq0e.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1221487678 6027 80.91.229.12 (15 Sep 2008 14:07:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2008 14:07:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 16:08:54 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KfEkX-0006AS-OJ for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2008 16:08:22 +0200 Original-Received: from localhost ([127.0.0.1]:36336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfEjW-0007Ch-N1 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2008 10:07:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KfEjD-0007AO-U0 for help-gnu-emacs@gnu.org; Mon, 15 Sep 2008 10:06:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KfEjB-00075g-88 for help-gnu-emacs@gnu.org; Mon, 15 Sep 2008 10:06:59 -0400 Original-Received: from [199.232.76.173] (port=37402 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KfEjB-00075V-5O for help-gnu-emacs@gnu.org; Mon, 15 Sep 2008 10:06:57 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:49077 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KfEjA-0002Zk-Nm for help-gnu-emacs@gnu.org; Mon, 15 Sep 2008 10:06:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KfEj2-0002Fj-R6 for help-gnu-emacs@gnu.org; Mon, 15 Sep 2008 14:06:48 +0000 Original-Received: from 200-161-121-122.dsl.telesp.net.br ([200.161.121.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Sep 2008 14:06:48 +0000 Original-Received: from briqueabraque by 200-161-121-122.dsl.telesp.net.br with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Sep 2008 14:06:48 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 200-161-121-122.dsl.telesp.net.br User-Agent: Thunderbird 2.0.0.16 (X11/20080724) In-Reply-To: <87vdwzcq0e.fsf@lion.rapttech.com.au> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57629 Archived-At: >> >> In .emacs I have a few variables defined using: >> >> (custom-set-variables >> '(var1 val1) >> '(var2 val2) >> '(var3 val3)) >> >> How can I define those same variables in .emacs >> without using custom-set-variables? >> > > Just use setq e.g. > > (setq var1 value1) > > but don't forget to also remove the corresponding bits in the custom > section. > > but can I ask why you want to do this? > > For a long time, I stuck to using the older (setq ....) method, but now > I've switched to using customize whenever possible. I've noticed that > some 'odd' behavior I used to get with the older traditional method have > gone away now that I'm using customize as much as possible. I do still > have some stuff to convert over and plan to do so one day when I get the > motivation..... > > In particular, I noticed some inconsistent behavior between some > packages that supported customize when I also configured them 'manually' > (and without corresponding settings in the customize section). for some > reason, the default customize setting would override my setq setting. I > never investigated very closely, but suspect it was related to how the > initialization of the custom variables was handled. the quick and easy > solution was to just set the values via customize and remove my hand > crafted version. > > I've also found using customize is also useful in alerting you to > changes in packages after an upgrade - something you generally don't get > using the older manual approach. > > Tim > Based on all comments, maybe a begginer like me would prefer custom-set-... until I learn more about a few emacs details, specially regarding to how modes deal with variables. Best, MaurĂ­cio