Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Gnus (Emacs's mail client) creates directories ~/Mail/ and ~/News. I don't want to clutter my home folder, how can i change this directories to, say, ~/.emacs.d/mail/ and ~/.emacs.d/news/?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

First i executed apropos-value ~/Mail/. It threw me many variables, that contain this string in their values. On my Debian i installed package emacs24-el so i could track down these variables in code. I ran describe-variable on the variable nnfolder-directory, which value was ~/Mail/. In went to the code and found out it's initialized like this:

(defvoo nnfolder-directory (expand-file-name message-directory))

The same was with the varible nndraft-directory that contained value ~/News/, which actually came from variable gnus-directory. For some reason the directory ~/Mail/archive/ is still created, i think nnfolder-directory is initialized before i set message-directory in init file.

Resume: to change your mail and news directories, put this into init file:

(setq message-directory "~/.emacs.d/mail/")
(setq gnus-directory "~/.emacs.d/news/")
(setq nnfolder-directory "~/.emacs.d/mail/archive")
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.