unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Fcc, Maildir, and Emacs message-mode -- a bit of code
@ 2010-01-21 18:36 Jesse Rosenthal
  2010-01-27 14:44 ` Jameson Rollins
  2010-04-22  9:06 ` Sebastian Spaeth
  0 siblings, 2 replies; 35+ messages in thread
From: Jesse Rosenthal @ 2010-01-21 18:36 UTC (permalink / raw)
  To: notmuch


Dear all,

First of all, many thanks to Carl and others for writing notmuch.

Some folks on IRC were bemoaning message-mode's annoying inability to
save sent-mail to a Maildir using Fcc. I mentioned that I had written a
bit of Maildir elisp code for that purpose a while back, and it was
suggested that I share it with the list.

Some caveats:

- I've tested this a good number of times, but not very robustly, since
  I don't actually use it (I found that I prefer blind-copying
  myself). Please test it out somewhere safe, on a maildir you can
  afford to lose.

- The hardlinking performed by `add-name-to-file' might be platform and
  filesystem specific. I'm using linux/ext3, and it works here. I don't
  know what will happen anywhere else.

- I imagine there's a much better implementation inside of Wanderlust,
  if you can dig through all the libraries.

- It's not really commented, but I hope the function names are pretty
  self-explanatory.

- It requires that the directory in the `Fcc:' header already exist and
  be a maildir (i.e. have cur/, new/, and tmp/). It should be pretty
  simple to add in a prompt for creating a directory if it points to a
  nonexistent place.

Anyway, here it is:

http://jkr.acm.jhu.edu/jkr-maildir.el

To use it, set one of the following:

If you want Fcc'd messages to be marked as read:

     (setq message-fcc-handler-function 
          '(lambda (destdir) 
	     (jkr/maildir-write-buffer-to-maildir destdir t)))

If you want Fcc'd messages to be marked as new:

     (setq message-fcc-handler-function 
          '(lambda (destdir) 
	     (jkr/maildir-write-buffer-to-maildir destdir nil)))


Best,
Jesse

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2010-04-27  6:10 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 18:36 Fcc, Maildir, and Emacs message-mode -- a bit of code Jesse Rosenthal
2010-01-27 14:44 ` Jameson Rollins
2010-01-29 13:21   ` Sebastian Spaeth
2010-01-29 14:46     ` Jameson Rollins
2010-01-29 14:54     ` Jesse Rosenthal
2010-04-07 20:04   ` Dirk Hohndel
2010-04-22  9:06 ` Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 1/6] Add elisp file for FCC to maildir solution Sebastian Spaeth
2010-04-22  9:07   ` [PATCH] notmuch.el: Make notmuch-show buffer name first subject, instead of thread-id (supersedes V1--3) Sebastian Spaeth
2010-04-22 13:34     ` Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 2/6] Integrate notmuch-maildir-fcc into notmuch Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 3/6] notmuch-maildir-fcc: rename all jkr/* functions to notmuch-maildir-fcc-* Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 4/6] add documentation example Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 5/6] notmuch-maildir-fcc: use insert-buffer-substring Sebastian Spaeth
2010-04-22  9:07   ` [PATCH 6/6] notmuch-maildir-fcc: replace caddr with (car (cdr (cdr))) Sebastian Spaeth
2010-04-22 23:17   ` Fcc, Maildir, and Emacs message-mode -- a bit of code Dirk Hohndel
2010-04-23  7:13     ` Sebastian Spaeth
2010-04-23 10:08       ` Updated elisp FCC patches (was: Fcc, Maildir, and Emacs message-mode) Sebastian Spaeth
2010-04-23 14:01         ` Dirk Hohndel
2010-04-23 19:01           ` [PATCH 1/4] Add elisp file for FCC to maildir solution Sebastian Spaeth
2010-04-23 19:01           ` [PATCH 2/4] Integrate notmuch-maildir-fcc into notmuch Sebastian Spaeth
2010-04-23 19:01           ` [PATCH 3/4] notmuch-maildir-fcc: elisp syntax fixes Sebastian Spaeth
2010-04-23 19:01           ` [PATCH 4/4] Integrate notmuch-fcc mechansim Sebastian Spaeth
2010-04-23  9:38   ` [PATCH 7/7] " Sebastian Spaeth
2010-04-24 23:10     ` Dirk Hohndel
2010-04-26  8:23       ` [PATCH v3 1/4] Add elisp file for FCC to maildir solution Sebastian Spaeth
2010-04-26 21:21         ` Carl Worth
2010-04-26  8:23       ` [PATCH v3 2/4] Integrate notmuch-maildir-fcc into notmuch Sebastian Spaeth
2010-04-26  8:23       ` [PATCH v3 3/4] notmuch-maildir-fcc: elisp syntax fixes Sebastian Spaeth
2010-04-26  8:23       ` [PATCH v3 4/4] Integrate notmuch-fcc mechansim Sebastian Spaeth
2010-04-27  0:29         ` [PATCH] emacs: fcc should fail at the right time if it doesn't point to a maildir Jesse Rosenthal
2010-04-27  1:33           ` [PATCH] emacs: add prompt to create maildir for fcc if it does not exist Jesse Rosenthal
2010-04-27  3:08             ` [PATCH] emacs: Ensure that message-directory for Fcc has a trailing slash Jesse Rosenthal
2010-04-27  2:51           ` [PATCH] emacs: fcc should fail at the right time if it doesn't point to a maildir Dirk Hohndel
2010-04-27  6:10           ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).