Subject: bug#9304: report-emacs-bug fails: /Mail write-protected.

From: Glenn Morris <[email-masked]>
Date: Mon, 15 Aug 2011 17:12:55 -0400

Stefan Klinger wrote:

> Reproduce: Start with a write-protected ~/Mail, run 'emacs -Q', type 'M-x report-emacs-bug'. This fails with the message "make-directory: Creating directory: permission denied, /home/foo/Mail/drafts". No further information is provided.

I was going to say that this won't happen in Emasc 24.1, due to the
changes from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4432,
but it still does.

Perhaps

(defcustom message-auto-save-directory
  (if (file-exists-p message-directory)
      (file-name-as-directory (expand-file-name "drafts" message-directory))
    "~/")

should use `file-writable-p' instead of `file-exists-p'.