help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: void variable problem


From: Tim X
Subject: Re: void variable problem
Date: Thu, 24 Mar 2011 07:09:05 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Haines Brown <haines@HistoricalMaterialism.info> writes:

> Thank you and Eli for pointing out what should have been obvious to me. 
>
> I was blissfully unaware of the Customize feature of emacs, and wonder
> why you recommend it in this case. As best I can make out, it creates a
> set of values for variables. But I don't see that the synonyms command
> requires setting values for variables, unless it is the name and
> location of the thesaurus and cache, which at this point I simply define
> in .emacs initiatialization. Why is it better to do it some other way?
>

One of the advantages of using custom is that it does some basic type
checking to ensure you enter a value of the correct type and reduces the
need for the user to understand some of the underlying code requirements
of elisp. 

In this case, your mistake was to specify the file location wihtout
using quotes around the value. Emacs saw the value you entered as a
symbol rather than a value (to understand this, you really need to know
about how elisp reads and evaluates input etc). Many users don't want to
dive into the specifics of elisp, they just want to customize some
value. Here is where customize helps. In this case (guessing as I've not
seen the custom definition), the variable you were setting would likely
be defined as being a 'string', which means that when you entered
/home/somedir/somefile the custom mechanism would have saved that as
"/home/sodmedir/somefile" and the user can stay blissfully ignorant of
elisp evaluation, self-evaluating forms, symbols, functions, arguments,
quoting, etc. 

On the other hand, if your someone who prefers to manage configuration
settings manually, then you will need to know about thses low level
issues, how to use the backtrace effectively and a number of common
idioms for defining structures, manipulating various objects etc. 

Tim




-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]