Re: notmuch-emacs: Fcc to top-level directory given by database.path
>> notmuch insert --folder= or --folder="" does not work: >> >> String argument for option "folder" must be non-empty. >> Unrecognized option: --folder= >> > This should be fixed in 733ccfabc, as part of 0.26 I have verified this, and it works. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: notmuch-emacs: Fcc to top-level directory given by database.path
Jani Nikulawrites: > On Sat, 23 Sep 2017, David Bremner wrote: >> Do you happen to know if it calls with an empty string as the folder >> name? It would be consistent with searching for that to insert at the >> top level. > > notmuch insert --folder= or --folder="" does not work: > > String argument for option "folder" must be non-empty. > Unrecognized option: --folder= > > It seems that our argument parser doesn't accept empty strings at all, > which is a bit of a limitation. It would be logical for the empty string > to work here, and AFAICT the notmuch insert code would handle this if > the argument was let through the parsing. I agree. Fixing this in the `notmuch insert' argument parser is a better solution. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: notmuch-emacs: Fcc to top-level directory given by database.path
Mark Walterswrites: > 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? ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: notmuch-emacs: Fcc to top-level directory given by database.path
Mark Walterswrites: > Alternatively, does just using / as the folder work? notmuch complains about absolute paths if / is used as the folder. Look at function `notmuch-maildir-add-notmuch-insert-style-fcc-header' in notmuch-maildir-fcc.el. David Bremner writes: > Do you happen to know if it calls with an empty string as the folder > name? It would be consistent with searching for that to insert at the > top level. Setting notmuch-fcc-dirs to "\"\"" fails, if that's what you are asking. I also tried "." as the folder. This works, but if I search using `notmuch search --output=files ...', the filename is of the form "database.path/./cur/some.mail.file". This is not so clean. > In any case I've noted your feature request/bug-report. It doesn't sound > terribly difficult to change, but it will need someone motivated to > think about all of the related details like updating the test suite and > changing docstrings. I can contribute this patch. Shall I make it such that if the folder part of `notmuch-fcc-dirs' is an empty string, then `notmuch insert' is called without a `--folder=' argument? ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
notmuch-emacs: Fcc to top-level directory given by database.path
I am using notmuch-emacs, and I would like to Fcc my sent mail to the top-level directory given by database.path, instead of using a folder like "sent" relative to the top-level directory. The function `notmuch-maildir-notmuch-insert-current-buffer' in notmuch-maildir-fcc.el calls `notmuch insert' with the `--folder=' argument. I would like it to not do this. For my immediate purposes, I have overridden `notmuch-maildir-notmuch-insert-current-buffer' with the following advice. But, it would be nice if this feature existed out of the box. (define-advice notmuch-maildir-notmuch-insert-current-buffer (:override (folder create tags) insert-into-root) (apply 'notmuch-call-notmuch-process :stdin-string (buffer-string) "insert" tags)) ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch