(let ((subdir
(cond
((or (not notmuch-fcc-dirs)
- (message-fetch-field "Fcc"))
+ (message-field-value "Fcc"))
;; Nothing set or an existing header.
nil)
notmuch-fcc-dirs)
((and (listp notmuch-fcc-dirs)
- (= 1 (length (car notmuch-fcc-dirs))))
+ (stringp (car notmuch-fcc-dirs)))
;; Old style - no longer works.
(error "Invalid `notmuch-fcc-dirs' setting (old style)"))
((listp notmuch-fcc-dirs)
- (let* ((from (message-fetch-field "From"))
+ (let* ((from (message-field-value "From"))
(match
(catch 'first-match
(dolist (re-folder notmuch-fcc-dirs)
(concat (notmuch-database-path) "/" subdir)))))
;; finally test if fcc points to a valid maildir
- (let ((fcc-header (message-fetch-field "Fcc")))
+ (let ((fcc-header (message-field-value "Fcc")))
(unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)
(cond ((not (file-writable-p fcc-header))
(error (format "No permission to create %s, which does not exist"
(make-directory (concat path "/new/") t)
(make-directory (concat path "/tmp/") t))
((file-regular-p path)
- (error "%s is a file. Can't creat maildir." path))
+ (error "%s is a file. Can't create maildir." path))
(t
(error "I don't know how to create a maildir here"))))