Commit graph

11 commits

Author SHA1 Message Date
Sebastian Spaeth
fc73737ff5 Easier way to define a fcc directory
In the common case that a user only has one FCC (save outgoing mail in
the Mail directory, it is now possible to simply configure a string
such as "Sent" in the notmuch-fcc-dirs variable. More complex options,
depending on a users email address, are possible and described in the
variable customization help text.

The whole function notmuch-fcc-header-setup has been cleaned up a
little while working on that.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03 16:50:46 -07:00
Jesse Rosenthal
80a9078716 emacs: Remove conditional from notmuch-fcc-initialization.
The fcc code would only initialize if notmuch-fcc-dirs was set. This was
a problem if you reset the variable, or added the variable later during
initialization. Now we always add the fcc hook, but it doesn't do
anything unless notmuch-fcc-dirs are set.
2010-04-27 09:42:40 -07:00
Carl Worth
173a195da9 emacs: Delete some trailing whitespace.
That managed to sneak in with some recent improvements to the Fcc code.
2010-04-26 23:09:08 -07:00
Jesse Rosenthal
24a7a10af2 emacs: Ensure that message-directory for Fcc has a trailing slash
Use `file-name-as-directory' to ensure that message-directory has a
trailing slash so it can be combined with the notmuch-fcc-dirs
correctly.
2010-04-26 23:06:54 -07:00
Jesse Rosenthal
07c8eb1db6 emacs: add prompt to create maildir for fcc if it does not exist.
If the user specifies a maildir that does not exist, prompt the user to
see whether a maildir should be created. This will fail, with the
relevant explanation, if the location is not writable, or if a file
already exists in that location. If the location is a dir, but not a
maildir, this will add /tmp/cur/new to it.
2010-04-26 23:06:50 -07:00
Jesse Rosenthal
9b85872ed4 emacs: fcc should fail at the right time if it doesn't point to a maildir
Throw an error after the maildir is generated but before the message
is sent. This change allows the user to edit the maildir if it fails,
so that it will point to a correct place.

Note that this changes the previous behavior which always overwrote
the existing Fcc line. Now, an Fcc line is only auto-generated if
there isn't one already there.

The ideal change would be to prompt to create a maildir. This should
enable a place for doing that in a future patch.
2010-04-26 23:06:36 -07:00
Carl Worth
2b49f4631c emacs: Fix to generate error if fcc directory is not a maildir
Previously this was just a message that was almost impossible for the
user to see. Now, the user gets to see the error message, and is
presented with a buffer that actually contains the Fcc header of
interest.
2010-04-26 14:56:46 -07:00
Sebastian Spaeth
4b34effca5 Integrate notmuch-fcc mechansim
I have gone wild and added a defcustom "notmuch-fcc-dirs".
Depending on the value of that variable we will not do any
maildir fcc at all (nil, the default), or it is of the format
(("defaultsentbox")
 ("full name <email@address>" . "Work/sentbox")
 ("full name2 <email2@address2>" . "Work2/sentbox"))

The outbox name will be concatenated with the message mode
variable "message-directory" which is "~/Mail/" by default.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-26 12:00:13 -07:00
Sebastian Spaeth
c000c4b394 notmuch-maildir-fcc: elisp syntax fixes
1)use insert-buffer-substring

Rather than the insert-buffer. Emacs complains that it is for interactive use
and not for use within elisp. So use insert-buffer-substring which does the
same thing when not handed any 'begin' 'end' parameters.

2)replace caddr with (car (cdr (cdr)))

The former requires 'cl to be loaded and during make install emacs complained
about not knowing it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-26 11:58:43 -07:00
Sebastian Spaeth
36245db69d Integrate notmuch-maildir-fcc into notmuch
Require notmuch-maildir-fcc and also install it.
Rename all jkr/* functions to notmuch-maildir-fcc-*

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-26 11:58:34 -07:00
Jesse Rosenthal
1775893720 Add elisp file for FCC to maildir solution
File grabbed from http://jkr.acm.jhu.edu/jkr-maildir.el
but not integrated yet.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-04-26 11:54:15 -07:00