Gnus development mailing list
 help / color / mirror / Atom feed
* Fail to set mail directories
@ 2011-06-25 22:14 Philipp Haselwarter
  2011-06-26  8:39 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Haselwarter @ 2011-06-25 22:14 UTC (permalink / raw)
  To: ding

Hi,

I've tried to move my gnus related directories from their default
location. For the most part, it seems to work, but there are a few
variables that seem to somehow magically get reset to the (true) default
values.
This entails for example recreation of ~/Mail/drafts/ as soon as I start
composing mail (although `nndraft-directory' points to
"~/.emacs.d/gnus/News/drafts/").

As far as I can tell, the variables concerned are:

nntp-marks-directory, message-auto-save-directory,
gnus-article-save-directory, gnus-cache-directory,
gnus-kill-files-directory

They should be set up relative to gnus-directory and friends, but it
seems that the default values of those are used.

Strangely enough, when I « C-h v message-auto-save-directory RET », I
get this:

,----
| message-auto-save-directory is a variable defined in `message.el'.
| Its value is "/home/philipp/Mail/drafts/"
| Original value was 
| "/home/philipp/.emacs.d/gnus/Mail/drafts/"
| 
| Documentation:
| *Directory where Message auto-saves buffers if Gnus isn't running.
| If nil, Message won't auto-save.
| 
| You can customize this variable.
| 
| [back]
`----

Right now, my setup is

#+begin_src emacs-lisp
(eval-after-load "gnus" '(require 'my-gnus-config))
#+end_src

here's the relevant section in my-gnus-config:

#+begin_src emacs-lisp
(setq mail-default-directory
      (file-name-as-directory (expand-file-name "gnus" user-emacs-directory))
      gnus-directory
      (file-name-as-directory (expand-file-name "News" mail-default-directory))
      message-directory
      (file-name-as-directory (expand-file-name "Mail" mail-default-directory))
      mail-source-directory message-directory
      smtpmail-queue-dir
      (file-name-as-directory (expand-file-name "queued-mail" message-directory))
      smime-certificate-directory
      (file-name-as-directory (expand-file-name "certs"
      message-directory)))
#+end_src


What am I doing wrong? How do I debug this?


-- 
Philipp Haselwarter




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fail to set mail directories
  2011-06-25 22:14 Fail to set mail directories Philipp Haselwarter
@ 2011-06-26  8:39 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2011-06-26  8:39 UTC (permalink / raw)
  To: ding

On Sun, Jun 26 2011, Philipp Haselwarter wrote:

> #+begin_src emacs-lisp
> (eval-after-load "gnus" '(require 'my-gnus-config))
> #+end_src
>
> here's the relevant section in my-gnus-config:
>
> #+begin_src emacs-lisp
> (setq mail-default-directory
>       (file-name-as-directory (expand-file-name "gnus" user-emacs-directory))
>       gnus-directory
>       (file-name-as-directory (expand-file-name "News" mail-default-directory))
>       message-directory
>       (file-name-as-directory (expand-file-name "Mail" mail-default-directory))
>       mail-source-directory message-directory
>       smtpmail-queue-dir
>       (file-name-as-directory (expand-file-name "queued-mail" message-directory))
>       smime-certificate-directory
>       (file-name-as-directory (expand-file-name "certs"
>       message-directory)))
> #+end_src
>
> What am I doing wrong? How do I debug this?

Well, eval-AFTER-load could imply that during the loading of Gnus
(gnus.elc and many dependencies) several directory variables are
already set, i.e. derived from the original value of `gnus-directory'
and `message-directory´.  So your change of `gnus-directory' and
`message-directory´ is too late.

Setting `gnus-directory' and `message-directory' should be enough.  If
this isn't the case, please report it as a bug.

,----[ <f1> v gnus-directory RET ]
| gnus-directory is a variable defined in `gnus.el'.
| Its value is "~/News/"
| 
| Documentation:
| *Directory variable from which all other Gnus file variables are derived.
| 
| Note that Gnus is mostly loaded when the `.gnus.el' file is read.
| This means that other directory variables that are initialized from
| this variable won't be set properly if you set this variable in `.gnus.el'.
| Set this variable in `.emacs' instead.
| 
| You can customize this variable.
`----

,----[ <f1> v message-directory RET ]
| message-directory is a variable defined in `message.el'.
| Its value is "~/Mail/"
| 
| Documentation:
| *Directory from which all other mail file variables are derived.
| 
| You can customize this variable.
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-26  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-25 22:14 Fail to set mail directories Philipp Haselwarter
2011-06-26  8:39 ` Reiner Steib

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 NNTP newsgroup(s).