* fix mkdir / interaction with 'move-to-maildir'
This commit is contained in:
@ -708,12 +708,16 @@ not provided, function asks for it."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(with-current-buffer mu4e-hdrs-buffer
|
(with-current-buffer mu4e-hdrs-buffer
|
||||||
(let* ((target (or target (mu4e-ask-maildir "Move message to: ")))
|
(let* ((target (or target (mu4e-ask-maildir "Move message to: ")))
|
||||||
|
(target (if (string= (substring target 0 1) "/")
|
||||||
|
target
|
||||||
|
(concat "/" target)))
|
||||||
(fulltarget (concat mu4e-maildir target)))
|
(fulltarget (concat mu4e-maildir target)))
|
||||||
(when (or (file-directory-p fulltarget)
|
(when (or (file-directory-p fulltarget)
|
||||||
(and (yes-or-no-p
|
(and (yes-or-no-p
|
||||||
(format "%s does not exist. Create now?" fulltarget))
|
(format "%s does not exist. Create now?" fulltarget))
|
||||||
(mu4e-proc-mkdir fulltarget)))
|
(mu4e-proc-mkdir fulltarget)))
|
||||||
(mu4e-hdrs-mark 'move target)
|
(sleep-for 1) ;; ugly
|
||||||
|
(mu4e-hdrs-mark 'move target)
|
||||||
(mu4e-next-header)))))
|
(mu4e-next-header)))))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -401,6 +401,10 @@ set to e.g. '/drafts'; if this works, we will receive (:info :path
|
|||||||
<path> :docid <docid>)."
|
<path> :docid <docid>)."
|
||||||
(mu4e-proc-send-command "add \"%s\" \"%s\"" path maildir))
|
(mu4e-proc-send-command "add \"%s\" \"%s\"" path maildir))
|
||||||
|
|
||||||
|
(defun mu4e-proc-mkdir (maildir)
|
||||||
|
"Update the message database for MAILDIR."
|
||||||
|
(mu4e-proc-send-command "mkdir \"%s\"" maildir))
|
||||||
|
|
||||||
(defun mu4e-proc-save (docid partidx path)
|
(defun mu4e-proc-save (docid partidx path)
|
||||||
"Save attachment PARTIDX from message with DOCID to PATH."
|
"Save attachment PARTIDX from message with DOCID to PATH."
|
||||||
(mu4e-proc-send-command "save %d %d \"%s\"" docid partidx path))
|
(mu4e-proc-send-command "save %d %d \"%s\"" docid partidx path))
|
||||||
|
|||||||
Reference in New Issue
Block a user