2012-04-09 15:34:52 +02:00
|
|
|
|
;;; mu4e-vars.el -- part of mu4e, the mu mail user agent
|
|
|
|
|
;;
|
|
|
|
|
;; Copyright (C) 2011-2012 Dirk-Jan C. Binnema
|
|
|
|
|
|
|
|
|
|
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
|
|
|
|
;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
2012-04-11 00:15:42 +02:00
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
;;
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; Customization
|
2012-04-21 08:30:54 +02:00
|
|
|
|
(require 'mu4e-meta)
|
2012-07-22 23:55:41 +02:00
|
|
|
|
(require 'message)
|
2012-04-09 15:34:52 +02:00
|
|
|
|
|
|
|
|
|
(defgroup mu4e nil
|
|
|
|
|
"mu4e - mu for emacs"
|
|
|
|
|
:group 'local)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-mu-home nil
|
|
|
|
|
"Location of the mu homedir, or nil for the default."
|
|
|
|
|
:type 'directory
|
|
|
|
|
:group 'mu4e
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type '(choice (const :tag "Default location" nil)
|
|
|
|
|
(const :tag "Specify location" string))
|
2012-04-09 15:34:52 +02:00
|
|
|
|
:safe 'stringp)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-mu-binary (executable-find "mu")
|
|
|
|
|
"Name of the mu-binary to use; if it cannot be found in your
|
|
|
|
|
PATH, you can specify the full path."
|
|
|
|
|
:type 'file
|
|
|
|
|
:group 'mu4e
|
|
|
|
|
:safe 'stringp)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-maildir (expand-file-name "~/Maildir")
|
|
|
|
|
"Your Maildir directory; by default, mu4e assumes
|
|
|
|
|
~/Maildir."
|
|
|
|
|
:type 'directory
|
|
|
|
|
:safe 'stringp
|
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
2012-08-27 18:02:06 +02:00
|
|
|
|
(defcustom mu4e-get-mail-command "true"
|
2012-04-09 15:34:52 +02:00
|
|
|
|
"Shell command to run to retrieve new mail; e.g. 'offlineimap' or
|
2012-08-27 18:02:06 +02:00
|
|
|
|
'fetchmail'."
|
2012-04-09 15:34:52 +02:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'mu4e
|
|
|
|
|
:safe 'stringp)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-update-interval nil
|
|
|
|
|
"Number of seconds between automatic calls to retrieve mail and
|
|
|
|
|
update the database. If nil, don't update automatically. Note,
|
|
|
|
|
changes in `mu4e-update-interval' only take effect after restarting
|
2012-05-06 09:28:37 +02:00
|
|
|
|
mu4e."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type '(choice (const :tag "No automatic update" nil)
|
|
|
|
|
(integer :tag "Seconds"))
|
2012-04-09 15:34:52 +02:00
|
|
|
|
:group 'mu4e
|
|
|
|
|
:safe 'integerp)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-attachment-dir (expand-file-name "~/")
|
|
|
|
|
"Default directory for saving attachments."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type 'directory
|
2012-04-09 15:34:52 +02:00
|
|
|
|
:group 'mu4e
|
|
|
|
|
:safe 'stringp)
|
|
|
|
|
|
2012-06-19 16:59:35 +02:00
|
|
|
|
(defcustom mu4e-user-mail-address-regexp "$^"
|
2012-04-09 15:34:52 +02:00
|
|
|
|
"Regular expression matching the user's mail address(es). This is
|
|
|
|
|
used to distinguish ourselves from others, e.g. when replying and
|
2012-06-19 16:59:35 +02:00
|
|
|
|
in :from-or-to headers. By default, match nothing."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type 'regexp
|
2012-06-19 16:59:35 +02:00
|
|
|
|
:group 'mu4e
|
|
|
|
|
:safe 'stringp)
|
|
|
|
|
|
2012-08-28 11:10:56 +02:00
|
|
|
|
(defcustom mu4e-use-fancy-chars nil
|
|
|
|
|
"Whether to use fancy (non-ascii) characters."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type 'boolean
|
2012-08-28 11:10:56 +02:00
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
2012-06-19 16:59:35 +02:00
|
|
|
|
(defcustom mu4e-my-email-addresses `(,user-mail-address)
|
|
|
|
|
"List of e-mail addresses to consider 'my email addresses',
|
|
|
|
|
ie. addresses whose presence in an email imply that it is a
|
|
|
|
|
personal message. This is used when indexing messages."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type '(repeat (string :tag "Address"))
|
2012-06-19 16:59:35 +02:00
|
|
|
|
:group 'mu4e)
|
2012-04-09 15:34:52 +02:00
|
|
|
|
|
|
|
|
|
(defvar mu4e-date-format-long "%c"
|
|
|
|
|
"Date format to use in the message view, in the format of
|
|
|
|
|
`format-time-string'.")
|
|
|
|
|
|
2012-09-08 10:17:43 +02:00
|
|
|
|
(defcustom mu4e-search-results-limit 500
|
2012-04-09 15:34:52 +02:00
|
|
|
|
"Maximum number of search results (or -1 for unlimited). Since
|
|
|
|
|
limiting search results speeds up searches significantly, it's
|
|
|
|
|
useful to limit this. Note, to ignore the limit, use a prefix
|
2012-09-08 10:17:43 +02:00
|
|
|
|
argument (C-u) before invoking the search."
|
|
|
|
|
:type '(choice (const :tag "Unlimited" -1)
|
|
|
|
|
(integer :tag "Limit"))
|
|
|
|
|
:group 'mu4e)
|
2012-04-09 15:34:52 +02:00
|
|
|
|
|
|
|
|
|
(defvar mu4e-debug nil
|
|
|
|
|
"When set to non-nil, log debug information to the *mu4e-log* buffer.")
|
|
|
|
|
|
|
|
|
|
(defvar mu4e-bookmarks
|
|
|
|
|
'( ("flag:unread AND NOT flag:trashed" "Unread messages" ?u)
|
|
|
|
|
("date:today..now" "Today's messages" ?t)
|
|
|
|
|
("date:7d..now" "Last 7 days" ?w)
|
|
|
|
|
("mime:image/*" "Messages with images" ?p))
|
|
|
|
|
"A list of pre-defined queries; these will show up in the main
|
|
|
|
|
screen. Each of the list elements is a three-element list of the
|
|
|
|
|
form (QUERY DESCRIPTION KEY), where QUERY is a string with a mu
|
|
|
|
|
query, DESCRIPTION is a short description of the query (this will
|
|
|
|
|
show up in the UI), and KEY is a shortcut key for the query.")
|
|
|
|
|
|
2012-09-08 10:17:43 +02:00
|
|
|
|
(defcustom mu4e-split-view 'horizontal
|
2012-04-19 20:01:38 +02:00
|
|
|
|
"How to show messages / headers; a symbol which is either: * a
|
|
|
|
|
symbol 'horizontal: split horizontally (headers on top) * a symbol
|
|
|
|
|
'vertical: split vertically (headers on the left). * anything
|
|
|
|
|
else: don't split (show either headers or messages, not both) Also
|
|
|
|
|
see `mu4e-headers-visible-lines' and
|
2012-09-08 10:17:43 +02:00
|
|
|
|
`mu4e-headers-visible-columns'."
|
|
|
|
|
:type '(choice (const :tag "Split horizontally" horizontal)
|
|
|
|
|
(const :tag "Split vertically" vertical)
|
|
|
|
|
(const :tag "Don't split" nil)))
|
2012-04-09 15:34:52 +02:00
|
|
|
|
|
2012-08-14 09:20:27 +02:00
|
|
|
|
(defcustom mu4e-show-images nil
|
|
|
|
|
"Whether to automatically display attached images in the message
|
|
|
|
|
view buffer."
|
2012-09-08 10:17:43 +02:00
|
|
|
|
:type 'boolean
|
2012-08-14 09:20:27 +02:00
|
|
|
|
:group 'mu4e-view)
|
2012-07-19 10:42:38 +02:00
|
|
|
|
|
2012-08-22 17:22:31 +02:00
|
|
|
|
(defcustom mu4e-confirm-quit t
|
|
|
|
|
"Whether to confirm to quit mu4e."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
2012-07-19 10:42:38 +02:00
|
|
|
|
;; crypto
|
|
|
|
|
(defgroup mu4e-crypto nil
|
|
|
|
|
"Crypto-related settings."
|
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-auto-retrieve-keys nil
|
|
|
|
|
"Attempt to automatically retrieve public keys when needed."
|
|
|
|
|
:type 'boolean
|
2012-08-01 16:07:11 +02:00
|
|
|
|
:group 'mu4e-crypto)
|
2012-07-19 10:42:38 +02:00
|
|
|
|
|
2012-09-13 20:10:27 +02:00
|
|
|
|
(defcustom mu4e-decryption-policy t
|
2012-08-01 16:07:11 +02:00
|
|
|
|
"Policy for dealing with encrypted parts. The setting is a symbol:
|
2012-09-13 20:10:27 +02:00
|
|
|
|
* t: try to decrypt automatically
|
2012-08-01 16:07:11 +02:00
|
|
|
|
* `ask': ask before decrypting anything
|
2012-09-13 20:10:27 +02:00
|
|
|
|
* nil: don't try to decrypt anything."
|
|
|
|
|
:type '(choice (const :tag "Try to decrypt automatically" t)
|
2012-09-08 10:17:43 +02:00
|
|
|
|
(const :tag "Ask before decrypting anything" ask)
|
2012-09-13 20:10:27 +02:00
|
|
|
|
(const :tag "Don't try to decrypt anything" nil))
|
2012-08-01 16:07:11 +02:00
|
|
|
|
:group 'mu4e-crypto)
|
2012-07-19 10:42:38 +02:00
|
|
|
|
|
2012-06-18 17:03:24 +02:00
|
|
|
|
;; completion; we put them here rather than in mu4e-compose, as mu4e-utils needs
|
|
|
|
|
;; the variables.
|
|
|
|
|
|
|
|
|
|
(defgroup mu4e-compose nil
|
|
|
|
|
"Message-composition related settings."
|
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
|
|
|
|
;; address completion
|
|
|
|
|
(defcustom mu4e-compose-complete-addresses t
|
|
|
|
|
"Whether to do auto-completion of e-mail addresses."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'mu4e-compose)
|
|
|
|
|
|
2012-06-20 19:42:39 +02:00
|
|
|
|
(defcustom mu4e-compose-complete-only-personal nil
|
2012-06-18 17:03:24 +02:00
|
|
|
|
"Whether to consider only 'personal' e-mail addresses,
|
|
|
|
|
i.e. addresses from messages where user was explicitly in one of
|
2012-09-01 19:06:24 +02:00
|
|
|
|
the address fields (this excludes mailing list messages). See
|
|
|
|
|
`mu4e-my-email-addresses' and the mu-index manpage for details for
|
|
|
|
|
details (in particular, how to define your own e-mail addresses)."
|
2012-06-18 17:03:24 +02:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'mu4e-compose)
|
|
|
|
|
|
2012-06-20 10:29:19 +02:00
|
|
|
|
(defcustom mu4e-compose-complete-only-after "2010-01-01"
|
|
|
|
|
"Consider only contacts last seen after this date. Date must be a
|
|
|
|
|
string, in a format parseable by `org-parse-time-string'. This
|
|
|
|
|
excludes really old contacts. Set to nil to not have any
|
|
|
|
|
time-based restriction."
|
|
|
|
|
:type 'string
|
|
|
|
|
:group 'mu4e-compose)
|
|
|
|
|
|
2012-07-10 10:51:54 +02:00
|
|
|
|
(defcustom mu4e-compose-complete-ignore-address-regexp "no-?reply"
|
2012-06-20 10:29:19 +02:00
|
|
|
|
"Ignore any e-mail addresses for completion if they match this
|
|
|
|
|
regexp."
|
|
|
|
|
:type 'string
|
2012-06-18 17:03:24 +02:00
|
|
|
|
:group 'mu4e-compose)
|
|
|
|
|
|
2012-04-21 08:30:54 +02:00
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
;; Folders
|
|
|
|
|
(defgroup mu4e-folders nil
|
|
|
|
|
"Special folders."
|
|
|
|
|
:group 'mu4e)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-sent-folder "/sent"
|
|
|
|
|
"Your folder for sent messages, relative to `mu4e-maildir',
|
|
|
|
|
e.g. \"/Sent Items\"."
|
|
|
|
|
:type 'string
|
|
|
|
|
:safe 'stringp
|
|
|
|
|
:group 'mu4e-folders)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-drafts-folder "/drafts"
|
|
|
|
|
"Your folder for draft messages, relative to `mu4e-maildir',
|
|
|
|
|
e.g. \"/drafts\""
|
|
|
|
|
:type 'string
|
|
|
|
|
:safe 'stringp
|
|
|
|
|
:group 'mu4e-folders)
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-trash-folder "/trash"
|
|
|
|
|
"Your folder for trashed messages, relative to `mu4e-maildir',
|
|
|
|
|
e.g. \"/trash\"."
|
|
|
|
|
:type 'string
|
|
|
|
|
:safe 'stringp
|
|
|
|
|
:group 'mu4e-folders)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defcustom mu4e-maildir-shortcuts nil
|
|
|
|
|
"A list of maildir shortcuts to enable quickly going to the
|
|
|
|
|
particular for, or quickly moving messages towards them (i.e.,
|
|
|
|
|
archiving or refiling). The list contains elements of the form
|
|
|
|
|
(maildir . shortcut), where MAILDIR is a maildir (such as
|
|
|
|
|
\"/archive/\"), and shortcut a single shortcut character. With
|
|
|
|
|
this, in the header buffer and view buffer you can execute
|
|
|
|
|
`mu4e-mark-for-move-quick' (or 'm', by default) or
|
|
|
|
|
`mu4e-jump-to-maildir' (or 'j', by default), followed by the
|
|
|
|
|
designated shortcut character for the maildir.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Faces
|
|
|
|
|
(defgroup mu4e-faces nil
|
|
|
|
|
"Type faces (fonts) used in mu4e."
|
|
|
|
|
:group 'mu4e
|
|
|
|
|
:group 'faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-unread-face
|
|
|
|
|
'((t :inherit font-lock-keyword-face :bold t))
|
|
|
|
|
"Face for an unread message header."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-moved-face
|
|
|
|
|
'((t :inherit font-lock-comment-face :slant italic))
|
|
|
|
|
"Face for a message header that has been moved to some
|
|
|
|
|
folder (it's still visible in the search results, since we cannot
|
|
|
|
|
be sure it no longer matches)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-trashed-face
|
|
|
|
|
'((t :inherit font-lock-comment-face :strike-through t))
|
|
|
|
|
"Face for an message header in the trash folder."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-draft-face
|
|
|
|
|
'((t :inherit font-lock-string-face))
|
|
|
|
|
"Face for a draft message header (i.e., a message with the draft
|
|
|
|
|
flag set)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-05-11 10:18:00 +02:00
|
|
|
|
(defface mu4e-flagged-face
|
2012-07-10 20:10:00 +02:00
|
|
|
|
'((t :inherit font-lock-constant-face :bold t))
|
2012-05-11 10:18:00 +02:00
|
|
|
|
"Face for a flagged message header."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-07-10 20:10:00 +02:00
|
|
|
|
(defface mu4e-replied-face
|
|
|
|
|
'((t :inherit font-lock-builtin-face :bold nil))
|
|
|
|
|
"Face for a replied (or passed) message header."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-header-face
|
|
|
|
|
'((t :inherit default))
|
|
|
|
|
"Face for a header without any special flags."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-header-title-face
|
|
|
|
|
'((t :inherit font-lock-type-face))
|
|
|
|
|
"Face for a header title in the headers view."
|
|
|
|
|
:group 'mu4e-faces)
|
2012-05-04 23:34:59 +02:00
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-header-highlight-face
|
|
|
|
|
'((t :inherit default :weight bold :underline t))
|
|
|
|
|
"Face for the header at point."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-28 08:09:16 +02:00
|
|
|
|
(defface mu4e-header-marks-face
|
|
|
|
|
'((t :inherit font-lock-preprocessor-face))
|
|
|
|
|
"Face for the mark in the headers list."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-26 21:43:24 +02:00
|
|
|
|
(defface mu4e-view-header-key-face
|
2012-07-22 23:55:41 +02:00
|
|
|
|
'((t :inherit message-header-name :bold t))
|
2012-04-26 21:43:24 +02:00
|
|
|
|
"Face for a header key (such as \"Foo\" in \"Subject:\ Foo\") in
|
|
|
|
|
the message view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-view-header-value-face
|
|
|
|
|
'((t :inherit font-lock-doc-face))
|
|
|
|
|
"Face for a header value (such as \"Re: Hello!\") in the message
|
|
|
|
|
view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-07-16 14:56:26 +02:00
|
|
|
|
(defface mu4e-view-special-header-value-face
|
|
|
|
|
'((t :inherit font-lock-variable-name-face))
|
|
|
|
|
"Face for special header values in the message view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-07-19 10:42:38 +02:00
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-view-link-face
|
2012-07-22 23:55:41 +02:00
|
|
|
|
'((t :inherit link))
|
2012-04-09 15:34:52 +02:00
|
|
|
|
"Face for showing URLs and attachments in the message view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-07-16 11:19:19 +02:00
|
|
|
|
(defface mu4e-view-contact-face
|
|
|
|
|
'((t :inherit font-lock-variable-name-face))
|
|
|
|
|
"Face for showing URLs and attachments in the message view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-highlight-face
|
|
|
|
|
'((t :inherit font-lock-pseudo-keyword-face :bold t))
|
|
|
|
|
"Face for highlighting things."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-title-face
|
|
|
|
|
'((t :inherit font-lock-type-face :bold t))
|
|
|
|
|
"Face for a header title in the headers view."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-16 22:09:42 +02:00
|
|
|
|
(defface mu4e-footer-face
|
|
|
|
|
'((t :inherit font-lock-comment-face))
|
|
|
|
|
"Face for message footers (signatures)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-view-url-number-face
|
|
|
|
|
'((t :inherit font-lock-reference-face :bold t))
|
|
|
|
|
"Face for the number tags for URLs."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-view-attach-number-face
|
|
|
|
|
'((t :inherit font-lock-variable-name-face :bold t))
|
|
|
|
|
"Face for the number tags for attachments."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-1-face
|
|
|
|
|
'((t :inherit font-lock-builtin-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 1)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-2-face
|
|
|
|
|
'((t :inherit font-lock-type-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 2)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-3-face
|
|
|
|
|
'((t :inherit font-lock-variable-name-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 3)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-4-face
|
|
|
|
|
'((t :inherit font-lock-pseudo-keyword-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 4)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-05-20 19:13:27 +02:00
|
|
|
|
(defface mu4e-cited-5-face
|
|
|
|
|
'((t :inherit font-lock-comment-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 5)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-6-face
|
|
|
|
|
'((t :inherit font-lock-comment-delimiter-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 6)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-cited-7-face
|
|
|
|
|
'((t :inherit font-lock-preprocessor-face :bold nil :italic t))
|
|
|
|
|
"Face for cited message parts (level 7)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(defface mu4e-system-face
|
|
|
|
|
'((t :inherit font-lock-comment-face :slant italic))
|
|
|
|
|
"Face for system message (such as the footers for message
|
|
|
|
|
headers)."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
2012-07-19 10:42:38 +02:00
|
|
|
|
(defface mu4e-ok-face
|
|
|
|
|
'((t :inherit font-lock-comment-face :bold t :slant normal))
|
|
|
|
|
"Face for things that are okay."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
(defface mu4e-warning-face
|
|
|
|
|
'((t :inherit font-lock-warning-face :bold t :slant normal))
|
|
|
|
|
"Face for warnings / error."
|
|
|
|
|
:group 'mu4e-faces)
|
|
|
|
|
|
|
|
|
|
|
2012-05-20 19:13:27 +02:00
|
|
|
|
|
2012-07-10 11:11:06 +02:00
|
|
|
|
;; headers info
|
2012-07-10 10:51:54 +02:00
|
|
|
|
(defconst mu4e-header-info
|
2012-07-10 18:15:13 +02:00
|
|
|
|
'( (:attachments .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Attachments"
|
|
|
|
|
:shortname "Atts"
|
2012-07-11 10:36:05 +02:00
|
|
|
|
:help "Message attachments"
|
|
|
|
|
:sortable nil))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:bcc .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Bcc"
|
|
|
|
|
:shortname "Bcc"
|
|
|
|
|
:help "Blind Carbon-Copy recipients for the message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:cc .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Cc"
|
|
|
|
|
:shortname "Cc"
|
|
|
|
|
:help "Carbon-Copy recipients for the message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:date .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Date"
|
|
|
|
|
:shortname "Date"
|
|
|
|
|
:help "Date/time when the message was written"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:flags .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Flags"
|
|
|
|
|
:shortname "Flgs"
|
|
|
|
|
:help "Flags for the message"
|
2012-07-11 10:36:05 +02:00
|
|
|
|
:sortable nil))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:from .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "From"
|
|
|
|
|
:shortname "From"
|
|
|
|
|
:help "The sender of the message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:from-or-to .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "From/To"
|
|
|
|
|
:shortname "From/To"
|
|
|
|
|
:help "Sender of the message if it's not me; otherwise
|
|
|
|
|
the recipient"
|
2012-07-11 10:36:05 +02:00
|
|
|
|
:sortable nil))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:maildir .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Maildir"
|
|
|
|
|
:shortname "Maildir"
|
|
|
|
|
:help "Maildir for this message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:path .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Path"
|
|
|
|
|
:shortname "Path"
|
|
|
|
|
:help "Full filesystem path to the message"
|
|
|
|
|
:sortable t))
|
2012-07-18 16:53:04 +02:00
|
|
|
|
(:signature .
|
|
|
|
|
( :name "Signature"
|
|
|
|
|
:shortname "Sgn"
|
|
|
|
|
:help "Check for the cryptographic signature"
|
2012-09-23 10:42:00 +02:00
|
|
|
|
:sortable nil))
|
2012-09-15 17:24:03 +02:00
|
|
|
|
(:size .
|
|
|
|
|
( :name "Size"
|
|
|
|
|
:shortname "Size"
|
|
|
|
|
:help "Size of the message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:subject .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "Subject"
|
2012-07-10 18:15:13 +02:00
|
|
|
|
:shortname "Subject"
|
2012-07-10 10:51:54 +02:00
|
|
|
|
:help "Subject of the message"
|
|
|
|
|
:sortable t))
|
2012-07-10 18:15:13 +02:00
|
|
|
|
(:to .
|
2012-07-10 10:51:54 +02:00
|
|
|
|
( :name "To"
|
|
|
|
|
:shortname "T"
|
|
|
|
|
:help "Recipient of the message"
|
2012-07-16 14:56:26 +02:00
|
|
|
|
:sortable t)))
|
2012-07-10 10:51:54 +02:00
|
|
|
|
"An alist of all possible header fields and information about
|
|
|
|
|
them.; this is used in the UI (the column headers in the header
|
|
|
|
|
list, and the fields the message view). Most fields should be
|
|
|
|
|
self-explanatory. A special one is `:from-or-to', which is equal to
|
|
|
|
|
`:from' unless `:from' matches `mu4e-user-mail-address-regexp', in
|
|
|
|
|
which case it will be equal to `:to'.")
|
2012-07-18 16:53:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defvar mu4e-custom-header-info nil
|
|
|
|
|
"A list like `mu4e-custom-header-info', but for
|
|
|
|
|
custom (user-specified) headers. Each of the list items is a
|
|
|
|
|
property list with :name (the full-name, as displayed in the
|
|
|
|
|
message view), :shortname (the name as displayed in the headers
|
|
|
|
|
view), :help (some help information, which shows up in the
|
|
|
|
|
tooltip). Furthermore, there are two special fields:
|
|
|
|
|
:headers-func and :message-func, and the values should be functions
|
|
|
|
|
that take a MSG property list as argument, and return a string as
|
|
|
|
|
result.
|
|
|
|
|
Note, :sortable does not work for custom header fields.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-02 16:17:02 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
|
|
|
2012-04-09 15:34:52 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; run-time vars used in multiple places
|
|
|
|
|
|
|
|
|
|
;; headers
|
2012-05-01 21:45:54 +02:00
|
|
|
|
(defconst mu4e~headers-buffer-name "*mu4e-headers*"
|
2012-04-29 21:03:27 +02:00
|
|
|
|
"Name of the buffer for message headers.")
|
2012-09-23 10:42:00 +02:00
|
|
|
|
(defvar mu4e~headers-buffer nil "Buffer for message headers.")
|
2012-04-29 21:03:27 +02:00
|
|
|
|
; view
|
|
|
|
|
(defconst mu4e~view-buffer-name "*mu4e-view*"
|
2012-09-23 10:42:00 +02:00
|
|
|
|
"Name for the message view buffer.")
|
|
|
|
|
|
|
|
|
|
(defconst mu4e~view-embedded-buffer-name " *mu4e-embedded-view*"
|
|
|
|
|
"Name for the embedded message view buffer.")
|
|
|
|
|
|
2012-04-29 21:03:27 +02:00
|
|
|
|
(defvar mu4e~view-buffer nil "The view buffer.")
|
2012-05-02 16:17:02 +02:00
|
|
|
|
|
|
|
|
|
(defvar mu4e~view-msg nil "The message being viewed in view mode.")
|
|
|
|
|
|
2012-06-18 17:03:24 +02:00
|
|
|
|
(defvar mu4e~contacts-for-completion nil
|
|
|
|
|
"List of contacts (ie. 'name <e-mail>'),
|
|
|
|
|
used by the completion functions in mu4e-compose, and filled when
|
|
|
|
|
mu4e starts.")
|
2012-05-02 16:17:02 +02:00
|
|
|
|
|
2012-08-01 16:07:11 +02:00
|
|
|
|
(defvar mu4e~server-props nil
|
|
|
|
|
"Properties we receive from the mu4e server process (in the
|
|
|
|
|
'pong-handler').")
|
|
|
|
|
|
2012-08-14 09:20:27 +02:00
|
|
|
|
(defvar mu4e~headers-last-query nil
|
|
|
|
|
"The present (most recent) query.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
;; our handlers funcs
|
|
|
|
|
;; these handler funcs define what happens when we receive a certain message
|
|
|
|
|
;; from the server
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defun mu4e~default-handler (&rest args)
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"*internal* Dummy handler function."
|
2012-07-10 11:11:06 +02:00
|
|
|
|
(mu4e-error "Not handled: %S" args))
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-error-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each error returned from the server
|
|
|
|
|
process; the function is passed an error plist as argument. See
|
2012-04-23 19:35:14 +02:00
|
|
|
|
`mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-update-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each :update sexp returned from the server
|
|
|
|
|
process; the function is passed a msg sexp as argument. See
|
2012-04-23 19:35:14 +02:00
|
|
|
|
`mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-remove-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each :remove sexp returned from the server
|
|
|
|
|
process, when some message has been deleted. The function is passed
|
|
|
|
|
the docid of the removed message.")
|
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-sent-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each :sent sexp returned from the server
|
|
|
|
|
process, when some message has been sent. The function is passed
|
|
|
|
|
the docid and the draft-path of the sent message.")
|
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-view-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each single message sexp returned from the
|
|
|
|
|
server process. The function is passed a message sexp as
|
2012-04-23 19:35:14 +02:00
|
|
|
|
argument. See `mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-header-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each message returned from the server
|
|
|
|
|
process; the function is passed a msg plist as argument. See
|
2012-04-23 19:35:14 +02:00
|
|
|
|
`mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-found-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for when we received a :found sexp after the
|
|
|
|
|
headers have returns, to report on the number of matches. See
|
2012-04-23 19:35:14 +02:00
|
|
|
|
`mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-erase-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for when we received an :erase sexp after the
|
|
|
|
|
headers have returns, to clear the current headers buffer. See
|
2012-04-23 19:35:14 +02:00
|
|
|
|
`mu4e~proc-filter' for the format.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-compose-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each message returned from the server
|
|
|
|
|
process that is used as basis for composing a new message (ie.,
|
|
|
|
|
either a reply or a forward); the function is passed msg and a
|
2012-04-23 19:35:14 +02:00
|
|
|
|
symbol (either reply or forward). See `mu4e~proc-filter' for the
|
2012-04-11 21:31:52 +02:00
|
|
|
|
format of <msg-plist>.")
|
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-info-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each (:info type ....) sexp received from
|
|
|
|
|
the server process.")
|
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-pong-func 'mu4e~default-handler
|
2012-04-11 21:31:52 +02:00
|
|
|
|
"A function called for each (:pong type ....) sexp received from
|
|
|
|
|
the server process.")
|
2012-04-15 13:22:43 +02:00
|
|
|
|
|
2012-06-18 17:03:24 +02:00
|
|
|
|
(defvar mu4e-contacts-func 'mu4e~default-handler
|
|
|
|
|
"A function called for each (:contacts (<list-of-contacts>) sexp
|
|
|
|
|
received from the server process.")
|
|
|
|
|
|
2012-04-23 19:35:14 +02:00
|
|
|
|
(defvar mu4e-temp-func 'mu4e~default-handler
|
2012-04-15 13:22:43 +02:00
|
|
|
|
"A function called for each (:temp <file> <cookie>) sexp received
|
|
|
|
|
from the server process.")
|
2012-04-11 21:31:52 +02:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-04-09 15:34:52 +02:00
|
|
|
|
(provide 'mu4e-vars)
|
2012-04-11 21:31:52 +02:00
|
|
|
|
;;; End of mu4e-vars.el
|