info-gnus-english
[Top][All Lists]
Advanced

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

Re: .gnus init file


From: Ed C.
Subject: Re: .gnus init file
Date: Wed, 04 Feb 2015 22:08:12 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

Tassilo Horn <tsdh@gnu.org> writes:

> Emanuel Berg <embe8573@student.uu.se> writes:
>
>>> I have both .emacs and .gnus in ~\ (w32 24.4) and am
>>> manually transfering gnus stuff from .emacs to .gnus
>>> Is there a way to have options > customize write to
>>> a custom-set-variables paragraph in .gnus instead of
>>> in .emacs or does all the gnus stuff set through
>>> customize have to stay in .emacs
>>
>> No, those files don't mean anything as such. As long
>> as the files get read, you can put whatever option in
>> whatever file.
>
> That's not what was asked.  The question was if it's possible to tell
> the Customize interface to store Gnus-related stuff in ~/.gnus and all
> other stuff in ~/.emacs.
>
> Well, I tend to say "possibly, yes".  There's a variable for the file
> which is used to store Customize settings:
>
> ,----[ C-h v custom-file RET ]
> | custom-file is a variable defined in `cus-edit.el'.
> | Its value is nil
> | 
> | Documentation:
> | File used for storing customization information.
> | The default is nil, which means to use your init file
> | as specified by `user-init-file'.  If the value is not nil,
> | it should be an absolute file name.
> | 
> | You can set this option through Custom, if you carefully read the
> | last paragraph below.  However, usually it is simpler to write
> | something like the following in your init file:
> | 
> | (setq custom-file "~/.emacs-custom.el")
> | (load custom-file)
> | 
> | Note that both lines are necessary: the first line tells Custom to
> | save all customizations in this file, but does not load it.
> | 
> | When you change this variable outside Custom, look in the
> | previous custom file (usually your init file) for the
> | forms `(custom-set-variables ...)'  and `(custom-set-faces ...)',
> | and copy them (whichever ones you find) to the new custom file.
> | This will preserve your existing customizations.
> | 
> | If you save this option using Custom, Custom will write all
> | currently saved customizations, including the new one for this
> | option itself, into the file you specify, overwriting any
> | `custom-set-variables' and `custom-set-faces' forms already
> | present in that file.  It will not delete any customizations from
> | the old custom file.  You should do that manually if that is what you
> | want.  You also have to put something like `(load "CUSTOM-FILE")
> | in your init file, where CUSTOM-FILE is the actual name of the
> | file.  Otherwise, Emacs will not load the file when it starts up,
> | and hence will not set `custom-file' to that file either.
> | 
> | You can customize this variable.
> `----
>
> So basically, if you manage to set this variable buffer-locally to
> "/home/user/.gnus" in Customize buffers related to Gnus stuff, it'll
> probably work.  But that setting needs to be installed before the custom
> options are inserted there, because else their current values wouldn't
> be read from the right file.
>
> However, even if you manage to get there, that's also no salvation
> because some Customize commands like `customize-apropos' will let you
> customize options from different groups, and then a buffer-local value
> of custom-file won't do the trick.
>
> So long story short: I'd suggest you either don't mess with
> `custom-file' and let Emacs put it in `user-init-file', or you set it to
> a separate file which is loaded from ~/.emacs as suggested in the docs
> above.  Splitting into per-package custom-files doesn't seem to be
> possible, and IMHO the value is questionable anyhow.  I mean, the since
> the customizations are sorted alphabetically, they are somehow grouped
> by package anyway.
>
> Bye,
> Tassilo

Thanks Emanual and Tassilo. For now this is tmi but I'm concatenating
all the sample .emacs, .gnus, and .el files into a large gnusstuff.txt
file for reference. Tassilo did understand my question about multiple
custom-set-variables paragraphs in different init files (.emacs, .gnus,
maybe others). Maybe the comment instead of " ;; Your init file should
contain only one such instance." should say that only one init file
should contain an instance. And then a note to see custom-file variable.
So I will experiment with adding things related only to gnus from my
gnusstuff.txt file to either .emacs or .gnus but will avoid the advanced
stuff. When I first ran gnus I read about 100000 usenet groups names
that went I know not where in my laptop, subscribed to 4 of them (not
likely to even need more than a dozen), and then specified only 100 or
200 most recent for access (reading). The oldest headers show first in
the summary buffer instead of the most recent (wouldn't that be the
rational default?). My m. o. in dealing with email and posting is to
have anything more than a month old just disappear somehow or another
unless I explicitly save an article. So what I need (besides reading the
whole gnus manual and understanding what the common gnus-.* variables
do) is just the absolute minimum settings needed in .emacs and .gnus to
send and receive email. 
Finally, I should confess that my webmail is somehow redirected through
gmail. If I google on gmail and then just click on the top link I am
conected to my main sysmatrex.net webmail account. I think I should be
able to connect the same way through gnus but I might have to wait until
I can try it  back home where I usually deal with both email and groups
using Thunderbird.

Thank again,

Ed


reply via email to

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