mu icon indicating copy to clipboard operation
mu copied to clipboard

mu mkdir is not integrated into mu4e

Open pyluyten opened this issue 11 years ago • 2 comments
trafficstars

up to you to see this as a bug or a feature, but I'd expect mu4e-main to offer some mu4e-mkdir as a wrapper to mu mkdir, eg on <+> key from mu4e-main-view.

Coding this as-is would be trivial. Except, i don't know about refreshing (mu4e-get-maildirs) result, and there's https://github.com/djcb/mu/issues/68, too.... depending on this, on the future it might be reasonnable to offer to imap-encode user input to create the dir... but that's another story.

pyluyten avatar Sep 26 '14 20:09 pyluyten

I wrote "trivial" but forgot about separator.


(defun pyl/mu4e-create-dir (&optional prompted)
  (interactive "MEnter folder name : ")
  (let ((full (concat
            mu4e-maildir
            (funcall mu4e-completing-read-function "Parent dir : " (mu4e-get-maildirs))
        "." ; only works-for-me.
        prompted)))
  (async-shell-command
      (concat "mu mkdir " full))))

pyluyten avatar Sep 26 '14 22:09 pyluyten

In the view, if you move to a folder that does not exist mu4e offers to create it. However, the move fails. I find I have to unmark and then mark for move again.

While that sounds like another bug report, my point is create is supported just in an awkward way.

shaleh avatar Jun 03 '17 18:06 shaleh

Not planning to add maildir make as a main-view command, but the second point is valid; they should be created when needed, as per #628.

djcb avatar Feb 12 '23 09:02 djcb