notmuch-emacs: Fcc to top-level directory given by database.path

Jani Nikula jani at nikula.org
Mon Oct 2 09:03:54 PDT 2017


On Mon, 02 Oct 2017, Arun Isaac <arunisaac at systemreboot.net> wrote:
> Mark Walters <markwalters1009 at gmail.com> writes:
>
>> Incidentally, I think "/" is an alternative for the fcc line which
>> already works, which is "\"/\" in notmuch-fcc-dirs.
>
> Perhaps, notmuch should be made to tolerate a "/" at the beginning of the
> Fcc folder argument. That is, notmuch should not complain about absolute
> paths, and it should interpret these as relative to the root. To
> maintain backward compatibility, we could add a "/" at the beginning if
> it is not already there.
>
> So,
>
> "/" => database.path
> "/sent" => database.path/sent
> "sent" => database.path/sent
>
> etc.
>
> Is this a better idea?

At the cli notmuch insert level, I'd actually rather do the opposite and
be even stricter about folder being relative. I just had to look at the
code for other reasons, and it seems to accept all sorts of weird combos
with "/" and "." that I think should be rejected. Or at the very least
sanitized. Otherwise we end up with filenames with "//" or "/./" in
them, probably confusing notmuch later on.

I'd argue notmuch insert --folder="" should Fcc to the mail store root,
but alas that doesn't work at the cli level. It doesn't appear to work
at the emacs level either, but perhaps notmuch-emacs could translate ""
to dropping the --folder argument? Could even add that as a choice
option in notmuch-fcc-dirs customization. Mark?

BR,
Jani.


More information about the notmuch mailing list