Hi folks,

I just setup notmuch from scratch for the first time in a very long
time, (as in, for the first time since I created notmuch originally).

And first, thanks to everyone who has kept notmuch going along so well!
It's delightful for me to see how much it keeps improving in the time I
have been hands off from the project. You're all wonderful!

When I first tried sending an email message from emacs with notmuch, it
apparently worked, but then the automatic fcc failed, (because I didn't
have a "sent" folder in my local mail store).

The error message I got was not entirely helpful (although it was trying
hard to be). It said:

  Insert failed: (r)etry, (c)reate folder, (i)gnore, or (e)dit the header?

I didn't clue into what "Insert" meant here. And since I was coming just
from having configured msmtp I thought maybe notmuch wasn't successful
in actually sending the email.

I hit (e) since that looked like something that would let me debug

That took me back to the message where I saw "Fcc: sent" and I clued
into the fact that it was an FCC failure here.

At this point, a truly new user might have been stumped, but I started
code diving, (first with "M-x apropos fcc" since I wasn't sure if the
fcc bug I had hit was a notmuch thing or in some deeper layer).

I found notmuch-fcc-handler in the search results, and saw that it was
now defaulting to using "notmuch insert" by default, (which yes, is a
good thing, and better than the plain FCC handling I did originally that
didn't make recently-sent messages available to notmuch until the next
indexing operation).

So now I realized what "Insert" meant in "Insert failed" and I guessed
that the bug was from the fact that the "sent" directory didn't

So I ran "maildirmake ~/mail/sent" and retried sending my mail and
everything worked.

Then, I went back into the code to see why it wasn't clever enough to
make a directory itself. Here I found that
notmuch-maildir-fcc-with-notmuch-insert actually does have code to
create the missing directory, but only if told to with an optional

And the I looked at the code that emitted the error message I saw
originally and finally realized it was giving me the option to create
the missing directory if I had only understood what the message meant
and had pressed "c" to create it.

So, that's the long story of my little confusion this morning. I'm
trying to decide what would be a clean fix here.

Certainly if the code had just created the directory for me, everything
would have been fine. But I guess I can understand why the code doesn't
do that if we're trying to support a case where users are manually
typing random strings in for the Fcc header and might typo something?  I
don't know how much I _really_ care about that use case, (if notmuch
creates a directory based on a typo the mail will still be indexed and
perhaps some notmuch users don't care much about directory names inside
the mail store).

Otherwise, if the message had said:

  Failed to save sent message in local mail store. Directory
  /home/cworth/mail/sent does not exist. Create? (y/n)

Then I definitely would have understood the message and things would
have been much smoother for me.


notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to