emacs-devel
[Top][All Lists]
Advanced

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

Re: Documentation for custom-file - is not (load custom-file) needed?


From: Lennart Borgman
Subject: Re: Documentation for custom-file - is not (load custom-file) needed?
Date: Wed, 8 Dec 2004 01:44:21 +0100

----- Original Message ----- 
From: "Luc Teirlinck" <address@hidden>

> The situation would be a much bigger mess than I thought when I wrote
> the quote you are responding too.  The user _did_ customize
> `custom-file' through Custom.  But we actually just wrote a setq form
> into .emacs.  Should we now _consider_ `custom-file' to be customized
> through Custom?  Since the user customized it through Custom, he
> probably would believe that things that normally work when setting
> things through Custom work for custom-file too.  But then you have to
> set various properties like custom-saved and others.  (That would be
> done by these named functions I referred to, which could be newly
> written named functions.  If Custom started adding new properties to
> the symbol-plist, which has happened in the past and may happen in the
> future, these functions would need to be updated.)  But the situation
> is worse than that.  If you do not set these properties, you get into
> various anomalies, like the "State" message in a Custom buffer saying
> that `custom-file' was changed outside Custom, which could confuse the
> user.  If you do set them, you get other anomalies, because then
> Custom believes that `custom-file' is defined in the custom file,
> whereas it is not.  It is a mess and there is no need whatsoever to
> get into that mess.

Hi Luc,

I cannot follow all your arguments here, but I see you have an important
point about anomalies. Maybe some of the arguments you have could be removed
if the normal functions used in defcustom were still called AND some other
needed actions where taken for custom-file? (Am I clear enough here?)


Due to your argument about anomalies I have tried to rethink my view. The
code I have written and sent to the list before could perhaps be used, but
some more things must be done. I will try to summarize how I see this to get
it a bit further:

a) custom-file is a special variable and can not be treated only as a normal
"defcustom variable".

b) It is currently treated as a normal "defcustom variable". This should be
changed.


There are various ways to cure this:

1) Just do not make custom-file a "defcustom variable". This is the easiest
and does not fool the user. But it is perhaps not very nice.

2) Keep custom-file a "defcustom variable" and cure the problems.

Way 2 is more job, but maybe not very much. It depends a bit on how far we
want to go on this way. Writing automatically into .emacs is a bit more job
(I have done part of that but it must be tested since it is critical).
However an alternative is telling the user this must be done and how it
should/could look.


What I believe have to be done if way 2 is choosen is

A) Write a new version of custom-buffer-create for just custom-file, say
custom-buffer-custom-file-create. This does not seem to hard to do. (A bit
more minor issue here is whether custom-file should be saved to
custom-set-variables and as I said I do not think it should.)

B) Catch custom-file at various places so it will be customized just through
the new function custom-buffer-file-create. Maybe it should be a new type of
its own instead of custom-variable, but I do not understand the details
there now. This point seems more difficult to me.

Regards,
Lennart





reply via email to

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