[Top][All Lists]

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

Re: Change `customize-save-variable' to work under "emacs -Q"?

From: Dave Abrahams
Subject: Re: Change `customize-save-variable' to work under "emacs -Q"?
Date: Fri, 15 Jul 2011 13:01:21 -0400
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin)

on Sun Jul 10 2011, Lars Magne Ingebrigtsen <larsi-AT-gnus.org> wrote:

> If you run "emacs -Q", and you have a piece of code that calls
> `customize-save-variable', it will error out, saying that it won't
> overwrite the conf.
> Would anybody mind if I changed that function to not error out, but
> instead just do a `setq' on the variable in question, if we're running
> under -Q?
> Otherwise all the callers end up doing this very awkward thing:
>       (if (ignore-errors (custom-file))
>           (progn
>             (customize-save-variable 'smtpmail-smtp-server server)
>             (customize-save-variable 'smtpmail-smtp-service port))
>         (setq smtpmail-smtp-server server
>               smtpmail-smtp-service port))

My usual workaround for that and related issues is never to run emacs
with -Q.  Instead I create an empty directory in /tmp and set HOME to
point there:

   HOME=/tmp/test emacs

I think that *could* be a much better behavior for emacs -Q even if it
means you can't access anything you normally reach via ~.
Another option of course would be to populate the test directory with
symlinks to make it look more like my home directory, but I actually
never needed anything like that.

Dave Abrahams
BoostPro Computing

reply via email to

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