aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-maildir-fcc.el
Commit message (Collapse)AuthorAge
* emacs: derive correct timestamp in FCC unique nameGravatar Jesse Rosenthal2012-06-22
| | | | | | | | | | | | | | | | Previously, the timestamp at the beginning of the FCC unique maildir name was derived incorrectly, thanks to an integer overflow. This changes the derivation of timestamp to use a float, and so will get the number correct at least until 2038. (It is still formatted with "%d" so it will show up as an integer.) Should we need to change it in the next 26 years to take the unix millenium into account, it will be invisible to users. This change is mostly a question of consistency, since the unique name is arbitrary anyway. But since most people use timestamps, and that was the original intention here as well, we might as well. Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
* emacs: logically group def{custom,face}sGravatar Pieter Praet2012-01-19
| | | | | | | | | | | | | | | | | | | | | To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now consistently ordered as they appear @ defcustom's docstring (OCD much?). Proper defgroup docstrings and various other improvements by courtesy of Austin Clements.
* Don't quote lambda formsGravatar Aaron Ecay2011-12-21
| | | | | | This generates byte-compiler warnings on (at least) current trunk versions of Emacs. The quote is not necessary; lambda forms are self-quoting.
* fix sum moar typos [error messages]Gravatar Pieter Praet2011-06-23
| | | | | | | | Various typo fixes in error messages within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just error messages.
* Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup'Gravatar Dmitry Kurochkin2011-06-23
| | | | | | | | | | | This error occurs when `notmuch-fcc-dirs' is set to a list. The error was in the `notmuch-fcc-dirs' format check which was changed in an incompatible way from 0.4 to 0.5. The fix was extracted from a bigger patch series by David Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org". Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* Use message-field-value instead of message-fetch-field in FCC header setup.Gravatar Dmitry Kurochkin2011-06-03
| | | | | | | | | | | | | | For message-fetch-field the buffer is expected to be narrowed to just the header of the message. That is not the case when notmuch-fcc-header-setup is run, hence a wrong header value may be returned. E.g. when forwarding an email, (message-fetch-field "From") returns the From header value of the forwarded email. Message-field-value is the same as message-fetch-field, only narrows the buffer to the headers first. Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
* emacs: Use truenames for Fcc paths.Gravatar David Edmondson2010-12-07
| | | | | | Appease the test suite by using the true name for the Fcc directory path, otherwise a value for `notmuch-database-path' which includes symbolic links causes test suite failures.
* emacs: Improve the definition and use of `notmuch-fcc-dirs'.Gravatar David Edmondson2010-11-11
| | | | | | | | | | | | | | | | | | | | | Re-work the declaration and definition of `notmuch-fcc-dirs'. The variable now allows three types of values: - nil: no Fcc header is added, - a string: the value of `notmuch-fcc-dirs' is the name of the folder to use, - a list: the folder is chosen based on the From address of the current message using a list of regular expressions and corresponding folders: ((\"Sebastian@SSpaeth.de\" . \"privat\") (\"spaetz@sspaeth.de\" . \"OUTBOX.OSS\") (\".*\" . \"defaultinbox\")) If none of the regular expressions match the From address, no Fcc header will be added.
* Move notmuch-fcc-header-setup to message-header-setup-hook.Gravatar Rob Browning2010-10-27
| | | | | | | | | Call notmuch-fcc-header-setup from message-header-setup-hook rather than message-send-hook. This allows you to see what's going to happen, and to make manual adjustments if desired. Gnus does something similar. Signed-off-by: Rob Browning <rlb@defaultvalue.org>
* emacs: Enable FCC (to a directory named "sent") by default.Gravatar Carl Worth2010-10-27
| | | | | | Now that the FCC code is fixed to use the notmuch database path, we can actually enable this by default, which should be highly useful for all new users of notmuch.
* emacs: Change FCC to be relative to notmuch mail store, not message-directoryGravatar Carl Worth2010-10-27
| | | | | | | | | | | | | Otherwise, FCC is too hard to use, (user must set it and also set message- directory variable to match notmuch mail datbase path). As a rule, I'd like for users of notmuch to not be required to muck around with non-notmuch mail settings in emacs. The above is only really possible now thanks to the recent addition of the "notmuch config get" command which allows emacs to query the currently configured notmuch database path. This also now allows an absolute-path FCC to be set if desired.
* Easier way to define a fcc directoryGravatar Sebastian Spaeth2010-06-03
| | | | | | | | | | | | | 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>
* emacs: Remove conditional from notmuch-fcc-initialization.Gravatar Jesse Rosenthal2010-04-27
| | | | | | | 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.
* emacs: Delete some trailing whitespace.Gravatar Carl Worth2010-04-26
| | | | That managed to sneak in with some recent improvements to the Fcc code.
* emacs: Ensure that message-directory for Fcc has a trailing slashGravatar Jesse Rosenthal2010-04-26
| | | | | | 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.
* emacs: add prompt to create maildir for fcc if it does not exist.Gravatar Jesse Rosenthal2010-04-26
| | | | | | | | 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.
* emacs: fcc should fail at the right time if it doesn't point to a maildirGravatar Jesse Rosenthal2010-04-26
| | | | | | | | | | | | | 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.
* emacs: Fix to generate error if fcc directory is not a maildirGravatar Carl Worth2010-04-26
| | | | | | | 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.
* Integrate notmuch-fcc mechansimGravatar Sebastian Spaeth2010-04-26
| | | | | | | | | | | | | | 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>
* notmuch-maildir-fcc: elisp syntax fixesGravatar Sebastian Spaeth2010-04-26
| | | | | | | | | | | | | | | 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>
* Integrate notmuch-maildir-fcc into notmuchGravatar Sebastian Spaeth2010-04-26
| | | | | | | Require notmuch-maildir-fcc and also install it. Rename all jkr/* functions to notmuch-maildir-fcc-* Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Add elisp file for FCC to maildir solutionGravatar Jesse Rosenthal2010-04-26
File grabbed from http://jkr.acm.jhu.edu/jkr-maildir.el but not integrated yet. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>