From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
Cc: Luc Teirlinck <teirllm@dms.auburn.edu>,
Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Documentation for custom-file - is not (load custom-file) needed?
Date: Wed, 8 Dec 2004 18:52:23 +0100 [thread overview]
Message-ID: <002001c4dd4e$b4578a40$0200a8c0@sedrcw11488> (raw)
In-Reply-To: 87u0qwc43f.fsf@jurta.org
----- Original Message -----
From: "Juri Linkov" <juri@jurta.org>
> I wrote:
> > It's too late to make any changes in custom-file (changing its type,
> > etc.) since users might already rely on its current state.
>
> But maybe it is safe to change the type of custom-file from defcustom
> to defvar. I am only concerned about backward compatibility.
> What happens if some users already have customized `custom-file' in
> `custom-set-variables' and it will be removed from this list?
> Perhaps, nothing bad. Moreover, the situation where `custom-file'
> in `custom-set-variables' points to some file other than the file
> where `custom-set-variables' is located, is invalid. It will cause
> duplication of `custom-set-variables' list when Emacs saves customized
> variables next time. So, not adding `custom-file' to the set of
> variables in `custom-set-variables' is the right thing. `custom-file'
> should be purely an internal variable (which is achieved with the
> previous patch).
Hi Juri,
Reading your previous message where you pointed out that a variable
custom-file-loaded could be set by custom-set-variables (a nice idea that
makes things much cleaner) I got maybe a further idea that could make
backward compatibility easier. It is not totally safe, but maybe
sufficiently safe:
The idea is simply to remove custom-file and add a new defvar
custom-file-in-use that is used instead. This way we do not have to care
about if custom-set-variable finds a custom-file setting. It is simply not
used. (Or, rather I cannot find any reasonable situation where the user uses
custom-file if it is not defined by a setq before. Can you?)
Maybe this is just what you intended? I was not sure. I prefer the name
custom-file-in-use instead of custom-file-loaded.
> However, there is one situation when users have to deal with the
> `custom-file' variable. When the user moves `custom-set-variables'
> to a new location in another file, it's needed to tell Emacs about
> this location, so the next invocation of `Custom-save' could write
> customization to the new place. To inform users about that, the next
> 3 lines could be added to the comments of `custom-set-variables':
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> + ;; When you move it to another init file, to tell Emacs about
> + ;; its new location for the current Emacs session, type C-x C-e
> + ;; at the end of this line: (setq custom-file buffer-file-name)
> + ;; For further Emacs sessions just put in your init file
> + ;; (load "custom-file.el"). There is no need to set `custom-file'
> + ;; explicitly in your init files since Emacs can automatically set
> + ;; it to the file name where your customizations were loaded from.
I like the ideas though I would change the text used a bit.
Doing it this way we still leave possibilites for someone who later wants to
make a "customization page" (along what I started with perhaps) for
custom-file-in-use. However custom-file-in-use should never be made a
defcustom variable. I just mean a page that looks similar. Such a feature
could be tested after release of the new Emacs.
- Lennart
next prev parent reply other threads:[~2004-12-08 17:52 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-04 1:53 Documentation for custom-file - is not (load custom-file) needed? Lennart Borgman
2004-12-04 23:35 ` Lennart Borgman
2004-12-05 21:52 ` Richard Stallman
2004-12-06 0:24 ` Luc Teirlinck
2004-12-06 14:10 ` Richard Stallman
2004-12-07 2:40 ` Luc Teirlinck
2004-12-08 4:40 ` Richard Stallman
2004-12-06 2:56 ` Luc Teirlinck
2004-12-07 4:23 ` Richard Stallman
2004-12-05 15:50 ` John Paul Wallington
2004-12-05 17:07 ` Lennart Borgman
2004-12-05 17:33 ` Luc Teirlinck
2004-12-05 22:07 ` Lennart Borgman
2004-12-06 0:46 ` Luc Teirlinck
2004-12-06 1:21 ` Lennart Borgman
2004-12-06 4:02 ` Luc Teirlinck
2004-12-06 13:04 ` Stefan
2004-12-06 18:34 ` Luc Teirlinck
2004-12-06 18:54 ` Stefan Monnier
2004-12-06 21:53 ` Lennart Borgman
2004-12-07 2:34 ` Luc Teirlinck
2004-12-07 9:39 ` Kim F. Storm
2004-12-07 3:27 ` Luc Teirlinck
2004-12-07 2:56 ` Luc Teirlinck
2004-12-08 4:40 ` Richard Stallman
2004-12-07 3:50 ` Luc Teirlinck
2004-12-07 4:23 ` Richard Stallman
2004-12-07 5:39 ` Luc Teirlinck
2004-12-08 0:44 ` Lennart Borgman
2004-12-08 4:35 ` Luc Teirlinck
2004-12-08 17:52 ` Lennart Borgman
2004-12-08 4:42 ` Juri Linkov
2004-12-08 13:27 ` Juri Linkov
2004-12-08 17:52 ` Lennart Borgman [this message]
2004-12-08 18:04 ` Stefan Monnier
2004-12-08 19:56 ` Lennart Borgman
2004-12-08 20:20 ` Stefan Monnier
2004-12-08 22:16 ` Lennart Borgman
2004-12-08 4:40 ` Richard Stallman
2004-12-09 2:20 ` Luc Teirlinck
2004-12-09 2:24 ` Luc Teirlinck
2004-12-09 22:06 ` Richard Stallman
2004-12-10 5:54 ` Juri Linkov
2004-12-10 15:51 ` Lennart Borgman
2004-12-10 17:05 ` Stefan Monnier
2004-12-10 18:36 ` Lennart Borgman
2004-12-10 20:40 ` Stefan Monnier
2004-12-11 1:00 ` Lennart Borgman
2004-12-11 3:38 ` Luc Teirlinck
2004-12-11 3:56 ` Luc Teirlinck
2004-12-11 4:11 ` Luc Teirlinck
2004-12-13 3:49 ` Luc Teirlinck
2004-12-13 9:01 ` Juri Linkov
2004-12-13 15:55 ` Luc Teirlinck
-- strict thread matches above, loose matches on Subject: below --
2004-12-13 19:51 Richard Stallman
2004-12-14 0:34 ` Lennart Borgman
2004-12-14 23:20 ` Richard Stallman
2004-12-14 1:50 ` Luc Teirlinck
2004-12-14 23:20 ` Richard Stallman
2004-12-15 2:51 ` Luc Teirlinck
2004-12-15 23:20 ` Richard Stallman
2004-12-16 0:48 ` Luc Teirlinck
2004-12-16 4:51 ` Luc Teirlinck
2004-12-17 0:54 ` Richard Stallman
2004-12-17 5:41 ` Luc Teirlinck
2004-12-17 13:20 ` Kim F. Storm
2004-12-20 10:56 ` Richard Stallman
2004-12-21 0:48 ` Luc Teirlinck
2004-12-23 0:53 ` Luc Teirlinck
2004-12-25 15:13 ` Richard Stallman
2004-12-26 2:31 ` Luc Teirlinck
2004-12-14 4:14 ` Luc Teirlinck
2004-12-17 15:31 LENNART BORGMAN
2004-12-23 14:07 LENNART BORGMAN
2004-12-23 18:05 ` Luc Teirlinck
2004-12-28 1:06 ` Lennart Borgman
2004-12-28 4:28 ` Luc Teirlinck
2004-12-28 17:25 ` Richard Stallman
2004-12-23 18:34 ` Luc Teirlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002001c4dd4e$b4578a40$0200a8c0@sedrcw11488' \
--to=lennart.borgman.073@student.lu.se \
--cc=emacs-devel@gnu.org \
--cc=teirllm@dms.auburn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).