Fixed emacs docstrings to be consistent. No functional change.
- removed some (accidental) indentation
- removed some trailing newlines
- added trailing periods where missing (some exclusions)
13 files changed:
(declare-function company-manual-begin "company")
(defvar notmuch-address-last-harvest 0
(declare-function company-manual-begin "company")
(defvar notmuch-address-last-harvest 0
- "Time of last address harvest")
+ "Time of last address harvest.")
(defvar notmuch-address-completions (make-hash-table :test 'equal)
"Hash of email addresses for completion during email composition.
(defvar notmuch-address-completions (make-hash-table :test 'equal)
"Hash of email addresses for completion during email composition.
- This variable is set by calling `notmuch-address-harvest'.")
+This variable is set by calling `notmuch-address-harvest'.")
(defvar notmuch-address-full-harvest-finished nil
"t indicates that full completion address harvesting has been
(defvar notmuch-address-full-harvest-finished nil
"t indicates that full completion address harvesting has been
"Determines how internal address completion generates candidates.
This should be a list of the form '(DIRECTION FILTER), where
"Determines how internal address completion generates candidates.
This should be a list of the form '(DIRECTION FILTER), where
- DIRECTION is either sent or received and specifies whether the
- candidates are searched in messages sent by the user or received
- by the user (note received by is much faster), and FILTER is
- either nil or a filter-string, such as \"date:1y..\" to append
- to the query."
+DIRECTION is either sent or received and specifies whether the
+candidates are searched in messages sent by the user or received
+by the user (note received by is much faster), and FILTER is
+either nil or a filter-string, such as \"date:1y..\" to append
+to the query."
:type '(list :tag "Use internal address completion"
(radio
:tag "Base completion on messages you have"
:type '(list :tag "Use internal address completion"
(radio
:tag "Base completion on messages you have"
The completed address is passed as an argument to each function.
Note that this hook will be invoked for completion in headers
The completed address is passed as an argument to each function.
Note that this hook will be invoked for completion in headers
-matching `notmuch-address-completion-headers-regexp'.
-"
+matching `notmuch-address-completion-headers-regexp'."
:type 'hook
:group 'notmuch-address
:group 'notmuch-hooks)
:type 'hook
:group 'notmuch-address
:group 'notmuch-hooks)
(message "calling notmuch-address-message-insinuate is no longer needed"))
(defcustom notmuch-address-use-company t
(message "calling notmuch-address-message-insinuate is no longer needed"))
(defcustom notmuch-address-use-company t
- "If available, use company mode for address completion"
+ "If available, use company mode for address completion."
:type 'boolean
:group 'notmuch-send
:group 'notmuch-address)
:type 'boolean
:group 'notmuch-send
:group 'notmuch-address)
(defvar notmuch-address-harvest-procs '(nil . nil)
"The currently running harvests.
(defvar notmuch-address-harvest-procs '(nil . nil)
"The currently running harvests.
-The car is a partial harvest, and the cdr is a full harvest")
+The car is a partial harvest, and the cdr is a full harvest.")
(defun notmuch-address-harvest (&optional addr-prefix synchronous callback)
"Collect addresses completion candidates.
(defun notmuch-address-harvest (&optional addr-prefix synchronous callback)
"Collect addresses completion candidates.
(defcustom notmuch-draft-save-plaintext 'ask
"Should notmuch save/postpone in plaintext messages that seem
(defcustom notmuch-draft-save-plaintext 'ask
"Should notmuch save/postpone in plaintext messages that seem
- like they are intended to be sent encrypted
+like they are intended to be sent encrypted
(i.e with an mml encryption tag in it)."
:type '(radio
(const :tag "Never" nil)
(i.e with an mml encryption tag in it)."
:type '(radio
(const :tag "Never" nil)
(defvar notmuch-draft-encryption-tag-regex
"<#\\(part encrypt\\|secure.*mode=.*encrypt>\\)"
(defvar notmuch-draft-encryption-tag-regex
"<#\\(part encrypt\\|secure.*mode=.*encrypt>\\)"
- "Regular expression matching mml tags indicating encryption of part or message")
+ "Regular expression matching mml tags indicating encryption of part or message.")
(defvar notmuch-draft-id nil
(defvar notmuch-draft-id nil
- "Message-id of the most recent saved draft of this message")
+ "Message-id of the most recent saved draft of this message.")
(make-variable-buffer-local 'notmuch-draft-id)
(defun notmuch-draft--mark-deleted ()
(make-variable-buffer-local 'notmuch-draft-id)
(defun notmuch-draft--mark-deleted ()
:type 'boolean)
(defvar notmuch-hello-hidden-sections nil
:type 'boolean)
(defvar notmuch-hello-hidden-sections nil
- "List of sections titles whose contents are hidden")
+ "List of sections titles whose contents are hidden.")
(defvar notmuch-hello-first-run t
"True if `notmuch-hello' is run for the first time, set to nil
(defvar notmuch-hello-first-run t
"True if `notmuch-hello' is run for the first time, set to nil
the string it returns is used as the query. If nil is returned,
the entry is hidden.
the string it returns is used as the query. If nil is returned,
the entry is hidden.
-Otherwise, FILTER is ignored.
-"
+Otherwise, FILTER is ignored."
(cond
((functionp filter) (funcall filter query))
((stringp filter)
(cond
((functionp filter) (funcall filter query))
((stringp filter)
(defvar notmuch-emacs-version)
(defun notmuch-hello-versions ()
(defvar notmuch-emacs-version)
(defun notmuch-hello-versions ()
- "Display the notmuch version(s)"
+ "Display the notmuch version(s)."
(interactive)
(let ((notmuch-cli-version (notmuch-cli-version)))
(message "notmuch version %s"
(interactive)
(let ((notmuch-cli-version (notmuch-cli-version)))
(message "notmuch version %s"
options))
(defun notmuch-hello-insert-inbox ()
options))
(defun notmuch-hello-insert-inbox ()
- "Show an entry for each saved search and inboxed messages for each tag"
+ "Show an entry for each saved search and inboxed messages for each tag."
(notmuch-hello-insert-searches "What's in your inbox"
(append
notmuch-saved-searches
(notmuch-hello-insert-searches "What's in your inbox"
(append
notmuch-saved-searches
:filter "tag:inbox"))
(defun notmuch-hello-insert-alltags ()
:filter "tag:inbox"))
(defun notmuch-hello-insert-alltags ()
- "Insert a section displaying all tags and associated message counts"
+ "Insert a section displaying all tags and associated message counts."
(notmuch-hello-insert-tags-section
nil
:initially-hidden (not notmuch-show-all-tags-list)
(notmuch-hello-insert-tags-section
nil
:initially-hidden (not notmuch-show-all-tags-list)
where KEY is a key binding, LABEL is a string label to display in
the buffer, and ACTION is a nullary function to call. LABEL may
be null, in which case the action will still be bound, but will
where KEY is a key binding, LABEL is a string label to display in
the buffer, and ACTION is a nullary function to call. LABEL may
be null, in which case the action will still be bound, but will
-not appear in the pop-up buffer.
-"
+not appear in the pop-up buffer."
(let* ((items (notmuch-jump--format-actions action-map))
;; Format the table of bindings and the full prompt
(let* ((items (notmuch-jump--format-actions action-map))
;; Format the table of bindings and the full prompt
will appear in a buffer named \"*Notmuch errors*\" and an error
will be signaled.
will appear in a buffer named \"*Notmuch errors*\" and an error
will be signaled.
-Otherwise the output will be returned"
+Otherwise the output will be returned."
(with-temp-buffer
(let* ((status (apply #'call-process notmuch-command nil t nil args))
(output (buffer-string)))
(with-temp-buffer
(let* ((status (apply #'call-process notmuch-command nil t nil args))
(output (buffer-string)))
(defun notmuch-describe-key (actual-key binding prefix ua-keys tail)
(defun notmuch-describe-key (actual-key binding prefix ua-keys tail)
- "Prepend cons cells describing prefix-arg ACTUAL-KEY and ACTUAL-KEY to TAIL
+ "Prepend cons cells describing prefix-arg ACTUAL-KEY and ACTUAL-KEY to TAIL.
It does not prepend if ACTUAL-KEY is already listed in TAIL."
(let ((key-string (concat prefix (key-description actual-key))))
It does not prepend if ACTUAL-KEY is already listed in TAIL."
(let ((key-string (concat prefix (key-description actual-key))))
(cdr xplist)))
(defun notmuch-split-content-type (content-type)
(cdr xplist)))
(defun notmuch-split-content-type (content-type)
- "Split content/type into 'content' and 'type'"
+ "Split content/type into 'content' and 'type'."
(split-string content-type "/"))
(defun notmuch-match-content-type (t1 t2)
(split-string content-type "/"))
(defun notmuch-match-content-type (t1 t2)
- "Return t if t1 and t2 are matching content types, taking wildcards into account"
+ "Return t if t1 and t2 are matching content types, taking wildcards into account."
(let ((st1 (notmuch-split-content-type t1))
(st2 (notmuch-split-content-type t2)))
(if (or (string= (cadr st1) "*")
(let ((st1 (notmuch-split-content-type t1))
(st2 (notmuch-split-content-type t2)))
(if (or (string= (cadr st1) "*")
:group 'notmuch-send)
(defcustom notmuch-maildir-use-notmuch-insert 't
:group 'notmuch-send)
(defcustom notmuch-maildir-use-notmuch-insert 't
- "Should fcc use notmuch insert instead of simple fcc"
+ "Should fcc use notmuch insert instead of simple fcc."
:type '(choice :tag "Fcc Method"
(const :tag "Use notmuch insert" t)
(const :tag "Use simple fcc" nil))
:type '(choice :tag "Fcc Method"
(const :tag "Use notmuch insert" t)
(const :tag "Use simple fcc" nil))
Sets the Fcc header based on the values of `notmuch-fcc-dirs'.
Originally intended to be use a hook function, but now called directly
Sets the Fcc header based on the values of `notmuch-fcc-dirs'.
Originally intended to be use a hook function, but now called directly
(set-buffer-modified-p nil))
(define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
(set-buffer-modified-p nil))
(define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
- "Notmuch message composition mode. Mostly like `message-mode'"
+ "Notmuch message composition mode. Mostly like `message-mode'."
(notmuch-address-setup))
(put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
(notmuch-address-setup))
(put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
A thread is a forest or list of trees. A tree is a two element
list where the first element is a message, and the second element
A thread is a forest or list of trees. A tree is a two element
list where the first element is a message, and the second element
-is a possibly empty forest of replies.
-"
+is a possibly empty forest of replies."
(let ((args '("show" "--format=sexp" "--format-version=4")))
(if notmuch-show-process-crypto
(setq args (append args '("--decrypt=true"))))
(let ((args '("show" "--format=sexp" "--format-version=4")))
(if notmuch-show-process-crypto
(setq args (append args '("--decrypt=true"))))
;; Mapping functions across collections of messages.
(defun notmuch-query-map-aux (mapper function seq)
;; Mapping functions across collections of messages.
(defun notmuch-query-map-aux (mapper function seq)
- "private function to do the actual mapping and flattening"
+ "Private function to do the actual mapping and flattening."
(apply 'append
(mapcar
(lambda (tree)
(apply 'append
(mapcar
(lambda (tree)
seq)))
(defun notmuch-query-map-threads (fn threads)
seq)))
(defun notmuch-query-map-threads (fn threads)
- "apply FN to every thread in THREADS. Flatten results to a list.
+ "Apply FN to every thread in THREADS. Flatten results to a list.
See the function notmuch-query-get-threads for more information."
(notmuch-query-map-aux 'notmuch-query-map-forest fn threads))
(defun notmuch-query-map-forest (fn forest)
See the function notmuch-query-get-threads for more information."
(notmuch-query-map-aux 'notmuch-query-map-forest fn threads))
(defun notmuch-query-map-forest (fn forest)
- "apply function to every message in a forest. Flatten results to a list.
+ "Apply function to every message in a forest. Flatten results to a list.
See the function notmuch-query-get-threads for more information.
"
(notmuch-query-map-aux 'notmuch-query-map-tree fn forest))
(defun notmuch-query-map-tree (fn tree)
See the function notmuch-query-get-threads for more information.
"
(notmuch-query-map-aux 'notmuch-query-map-tree fn forest))
(defun notmuch-query-map-tree (fn tree)
- "Apply function FN to every message in TREE. Flatten results to a list
+ "Apply function FN to every message in TREE. Flatten results to a list.
See the function notmuch-query-get-threads for more information."
(cons (funcall fn (car tree)) (notmuch-query-map-forest fn (cadr tree))))
See the function notmuch-query-get-threads for more information."
(cons (funcall fn (car tree)) (notmuch-query-map-forest fn (cadr tree))))
;; Predefined queries
(defun notmuch-query-get-message-ids (&rest search-terms)
;; Predefined queries
(defun notmuch-query-get-message-ids (&rest search-terms)
- "Return a list of message-ids of messages that match SEARCH-TERMS"
+ "Return a list of message-ids of messages that match SEARCH-TERMS."
(notmuch-query-map-threads
(lambda (msg) (plist-get msg :id))
(notmuch-query-get-threads search-terms)))
(notmuch-query-map-threads
(lambda (msg) (plist-get msg :id))
(notmuch-query-get-threads search-terms)))
(make-variable-buffer-local 'notmuch-show-indent-content)
(defvar notmuch-show-attachment-debug nil
(make-variable-buffer-local 'notmuch-show-indent-content)
(defvar notmuch-show-attachment-debug nil
- "If t log stdout and stderr from attachment handlers
+ "If t log stdout and stderr from attachment handlers.
When set to nil (the default) stdout and stderr from attachment
handlers is discarded. When set to t the stdout and stderr from
When set to nil (the default) stdout and stderr from attachment
handlers is discarded. When set to t the stdout and stderr from
:group 'notmuch-show)
(defmacro with-current-notmuch-show-message (&rest body)
:group 'notmuch-show)
(defmacro with-current-notmuch-show-message (&rest body)
- "Evaluate body with current buffer set to the text of current message"
+ "Evaluate body with current buffer set to the text of current message."
`(save-excursion
(let ((id (notmuch-show-get-message-id)))
(let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))
`(save-excursion
(let ((id (notmuch-show-get-message-id)))
(let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))
nil))))
(defun notmuch-show-create-part-overlays (button beg end)
nil))))
(defun notmuch-show-create-part-overlays (button beg end)
- "Add an overlay to the part between BEG and END"
+ "Add an overlay to the part between BEG and END."
;; If there is no button (i.e., the part is text/plain and the first
;; part) or if the part has no content then we don't make the part
;; If there is no button (i.e., the part is text/plain and the first
;; part) or if the part has no content then we don't make the part
t))
(defun notmuch-show-record-part-information (part beg end)
t))
(defun notmuch-show-record-part-information (part beg end)
- "Store PART as a text property from BEG to END"
+ "Store PART as a text property from BEG to END."
;; Record part information. Since we already inserted subparts,
;; don't override existing :notmuch-part properties.
;; Record part information. Since we already inserted subparts,
;; don't override existing :notmuch-part properties.
(list win-id-combo (notmuch-show-get-message-ids-for-open-messages))))
(defun notmuch-show-get-query ()
(list win-id-combo (notmuch-show-get-message-ids-for-open-messages))))
(defun notmuch-show-get-query ()
- "Return the current query in this show buffer"
+ "Return the current query in this show buffer."
(if notmuch-show-query-context
(concat notmuch-show-thread-id
" and ("
(if notmuch-show-query-context
(concat notmuch-show-thread-id
" and ("
(define-key map "G" 'notmuch-show-stash-git-send-email)
(define-key map "?" 'notmuch-subkeymap-help)
map)
(define-key map "G" 'notmuch-show-stash-git-send-email)
(define-key map "?" 'notmuch-subkeymap-help)
map)
- "Submap for stash commands")
+ "Submap for stash commands.")
(fset 'notmuch-show-stash-map notmuch-show-stash-map)
(defvar notmuch-show-part-map
(fset 'notmuch-show-stash-map notmuch-show-stash-map)
(defvar notmuch-show-part-map
(define-key map "m" 'notmuch-show-choose-mime-of-part)
(define-key map "?" 'notmuch-subkeymap-help)
map)
(define-key map "m" 'notmuch-show-choose-mime-of-part)
(define-key map "?" 'notmuch-subkeymap-help)
map)
- "Submap for part commands")
+ "Submap for part commands.")
(fset 'notmuch-show-part-map notmuch-show-part-map)
(defvar notmuch-show-mode-map
(fset 'notmuch-show-part-map notmuch-show-part-map)
(defvar notmuch-show-mode-map
#'notmuch-show-imenu-extract-index-name-function))
(defun notmuch-tree-from-show-current-query ()
#'notmuch-show-imenu-extract-index-name-function))
(defun notmuch-tree-from-show-current-query ()
- "Call notmuch tree with the current query"
+ "Call notmuch tree with the current query."
(interactive)
(notmuch-tree notmuch-show-thread-id
notmuch-show-query-context
(notmuch-show-get-message-id)))
(defun notmuch-unthreaded-from-show-current-query ()
(interactive)
(notmuch-tree notmuch-show-thread-id
notmuch-show-query-context
(notmuch-show-get-message-id)))
(defun notmuch-unthreaded-from-show-current-query ()
- "Call notmuch unthreaded with the current query"
+ "Call notmuch unthreaded with the current query."
(interactive)
(notmuch-unthreaded notmuch-show-thread-id
notmuch-show-query-context
(interactive)
(notmuch-unthreaded notmuch-show-thread-id
notmuch-show-query-context
(notmuch-show-message-visible props (plist-get props :match))))
(defun notmuch-show-goto-first-wanted-message ()
(notmuch-show-message-visible props (plist-get props :match))))
(defun notmuch-show-goto-first-wanted-message ()
- "Move to the first open message and mark it read"
+ "Move to the first open message and mark it read."
(goto-char (point-min))
(unless (notmuch-show-message-visible-p)
(notmuch-show-next-open-message))
(goto-char (point-min))
(unless (notmuch-show-message-visible-p)
(notmuch-show-next-open-message))
(view-buffer buf 'kill-buffer-if-not-modified))))
(defun notmuch-show-choose-mime-of-part (mime-type)
(view-buffer buf 'kill-buffer-if-not-modified))))
(defun notmuch-show-choose-mime-of-part (mime-type)
- "Choose the mime type to use for displaying part"
+ "Choose the mime type to use for displaying part."
(interactive
(list (completing-read "Mime type to use (default text/plain): "
(mailcap-mime-types) nil nil nil nil "text/plain")))
(interactive
(list (completing-read "Mime type to use (default text/plain): "
(mailcap-mime-types) nil nil nil nil "text/plain")))
:group 'notmuch-tag)
(define-widget 'notmuch-tag-format-type 'lazy
:group 'notmuch-tag)
(define-widget 'notmuch-tag-format-type 'lazy
- "Customize widget for notmuch-tag-format and friends"
+ "Customize widget for notmuch-tag-format and friends."
:type '(alist :key-type (regexp :tag "Tag")
:extra-offset -3
:value-type
:type '(alist :key-type (regexp :tag "Tag")
:extra-offset -3
:value-type
are in TAGS but are not in ORIG-TAGS) are shown using formats
from `notmuch-tag-added-formats' and tags which have not been
changed (the normal case) are shown using formats from
are in TAGS but are not in ORIG-TAGS) are shown using formats
from `notmuch-tag-added-formats' and tags which have not been
changed (the normal case) are shown using formats from
(let* ((tag-state (cond ((not (member tag tags)) 'deleted)
((not (member tag orig-tags)) 'added)))
(formatted-tag (gethash (cons tag tag-state) notmuch-tag--format-cache 'missing)))
(let* ((tag-state (cond ((not (member tag tags)) 'deleted)
((not (member tag orig-tags)) 'added)))
(formatted-tag (gethash (cons tag tag-state) notmuch-tag--format-cache 'missing)))
'tag-changes' will contain the tags that are about to be added or removed as
a list of strings of the form \"+TAG\" or \"-TAG\".
'query' will be a string containing the search query that determines
'tag-changes' will contain the tags that are about to be added or removed as
a list of strings of the form \"+TAG\" or \"-TAG\".
'query' will be a string containing the search query that determines
-the messages that are about to be tagged"
+the messages that are about to be tagged."
:type 'hook
:options '(notmuch-hl-line-mode)
:type 'hook
:options '(notmuch-hl-line-mode)
'tag-changes' will contain the tags that were added or removed as
a list of strings of the form \"+TAG\" or \"-TAG\".
'query' will be a string containing the search query that determines
'tag-changes' will contain the tags that were added or removed as
a list of strings of the form \"+TAG\" or \"-TAG\".
'query' will be a string containing the search query that determines
-the messages that were tagged"
+the messages that were tagged."
:type 'hook
:options '(notmuch-hl-line-mode)
:group 'notmuch-hooks)
:type 'hook
:options '(notmuch-hl-line-mode)
:group 'notmuch-hooks)
;; this variable distinguishes the unthreaded display from the normal tree display
(defvar notmuch-tree-unthreaded nil
;; this variable distinguishes the unthreaded display from the normal tree display
(defvar notmuch-tree-unthreaded nil
- "A buffer local copy of argument unthreaded to the function notmuch-tree")
+ "A buffer local copy of argument unthreaded to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-unthreaded)
(defgroup notmuch-tree nil
(make-variable-buffer-local 'notmuch-tree-unthreaded)
(defgroup notmuch-tree nil
("authors" . "%-20s")
((("tree" . "%s")("subject" . "%s")) ." %-54s ")
("tags" . "(%s)"))
("authors" . "%-20s")
((("tree" . "%s")("subject" . "%s")) ." %-54s ")
("tags" . "(%s)"))
- "Result formatting for Tree view. Supported fields are: date,
- authors, subject, tree, tags. Tree means the thread tree
- box graphics. The field may also be a list in which case
- the formatting rules are applied recursively and then the
- output of all the fields in the list is inserted
- according to format-string.
+ "Result formatting for tree view. Supported fields are: date,
+authors, subject, tree, tags. Tree means the thread tree
+box graphics. The field may also be a list in which case
+the formatting rules are applied recursively and then the
+output of all the fields in the list is inserted
+according to format-string.
Note the author string should not contain
Note the author string should not contain
- whitespace (put it in the neighbouring fields instead).
- For example:
+whitespace (put it in the neighbouring fields instead).
+For example:
(setq notmuch-tree-result-format \(\(\"authors\" . \"%-40s\"\)
(setq notmuch-tree-result-format \(\(\"authors\" . \"%-40s\"\)
- \(\"subject\" . \"%s\"\)\)\)"
+ \(\"subject\" . \"%s\"\)\)\)"
:type '(alist :key-type (string) :value-type (string))
:group 'notmuch-tree)
:type '(alist :key-type (string) :value-type (string))
:group 'notmuch-tree)
("authors" . "%-20s")
((("subject" . "%s")) ." %-54s ")
("tags" . "(%s)"))
("authors" . "%-20s")
((("subject" . "%s")) ." %-54s ")
("tags" . "(%s)"))
- "Result formatting for unthreaded Tree view. Supported fields are: date,
- authors, subject, tree, tags. Tree means the thread tree
- box graphics. The field may also be a list in which case
- the formatting rules are applied recursively and then the
- output of all the fields in the list is inserted
- according to format-string.
+ "Result formatting for unthreaded tree view. Supported fields are: date,
+authors, subject, tree, tags. Tree means the thread tree
+box graphics. The field may also be a list in which case
+the formatting rules are applied recursively and then the
+output of all the fields in the list is inserted
+according to format-string.
Note the author string should not contain
Note the author string should not contain
- whitespace (put it in the neighbouring fields instead).
- For example:
+whitespace (put it in the neighbouring fields instead).
+For example:
(setq notmuch-tree-result-format \(\(\"authors\" . \"%-40s\"\)
(setq notmuch-tree-result-format \(\(\"authors\" . \"%-40s\"\)
- \(\"subject\" . \"%s\"\)\)\)"
+ \(\"subject\" . \"%s\"\)\)\)"
:type '(alist :key-type (string) :value-type (string))
:group 'notmuch-tree)
:type '(alist :key-type (string) :value-type (string))
:group 'notmuch-tree)
;; Faces for messages that do not match the query.
(defface notmuch-tree-no-match-face
'((t (:foreground "gray")))
;; Faces for messages that do not match the query.
(defface notmuch-tree-no-match-face
'((t (:foreground "gray")))
- "Default face used in tree mode face for non-matching messages"
+ "Default face used in tree mode face for non-matching messages."
:group 'notmuch-tree
:group 'notmuch-faces)
:group 'notmuch-tree
:group 'notmuch-faces)
:group 'notmuch-faces)
(defvar notmuch-tree-previous-subject
:group 'notmuch-faces)
(defvar notmuch-tree-previous-subject
- "The subject of the most recent result shown during the async display")
+ "The subject of the most recent result shown during the async display.")
(make-variable-buffer-local 'notmuch-tree-previous-subject)
(defvar notmuch-tree-basic-query nil
(make-variable-buffer-local 'notmuch-tree-previous-subject)
(defvar notmuch-tree-basic-query nil
- "A buffer local copy of argument query to the function notmuch-tree")
+ "A buffer local copy of argument query to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-basic-query)
(defvar notmuch-tree-query-context nil
(make-variable-buffer-local 'notmuch-tree-basic-query)
(defvar notmuch-tree-query-context nil
- "A buffer local copy of argument query-context to the function notmuch-tree")
+ "A buffer local copy of argument query-context to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-query-context)
(defvar notmuch-tree-target-msg nil
(make-variable-buffer-local 'notmuch-tree-query-context)
(defvar notmuch-tree-target-msg nil
- "A buffer local copy of argument target to the function notmuch-tree")
+ "A buffer local copy of argument target to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-target-msg)
(defvar notmuch-tree-open-target nil
(make-variable-buffer-local 'notmuch-tree-target-msg)
(defvar notmuch-tree-open-target nil
- "A buffer local copy of argument open-target to the function notmuch-tree")
+ "A buffer local copy of argument open-target to the function notmuch-tree.")
(make-variable-buffer-local 'notmuch-tree-open-target)
(defvar notmuch-tree-message-window nil
(make-variable-buffer-local 'notmuch-tree-open-target)
(defvar notmuch-tree-message-window nil
(call-interactively #',func)))))
(defun notmuch-tree-inherit-from-message-pane (sym)
(call-interactively #',func)))))
(defun notmuch-tree-inherit-from-message-pane (sym)
- "Return value of SYM in message-pane if open, or tree-pane if not"
+ "Return value of SYM in message-pane if open, or tree-pane if not."
(if (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(symbol-value sym))
(symbol-value sym)))
(defun notmuch-tree-button-activate (&optional button)
(if (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(symbol-value sym))
(symbol-value sym)))
(defun notmuch-tree-button-activate (&optional button)
- "Activate BUTTON or button at point
+ "Activate BUTTON or button at point.
This function does not give an error if there is no button."
(interactive)
This function does not give an error if there is no button."
(interactive)
Some useful entries are:
:headers - Property list containing the headers :Date, :Subject, :From, etc.
Some useful entries are:
:headers - Property list containing the headers :Date, :Subject, :From, etc.
-:tags - Tags for this message"
+:tags - Tags for this message."
(save-excursion
(beginning-of-line)
(get-text-property (point) :notmuch-message-properties)))
(save-excursion
(beginning-of-line)
(get-text-property (point) :notmuch-message-properties)))
(notmuch-show-update-tags new-tags)))))))
(defun notmuch-tree-tag (tag-changes)
(notmuch-show-update-tags new-tags)))))))
(defun notmuch-tree-tag (tag-changes)
- "Change tags for the current message"
+ "Change tags for the current message."
(interactive
(list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
(notmuch-tag (notmuch-tree-get-message-id) tag-changes)
(interactive
(list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
(notmuch-tag (notmuch-tree-get-message-id) tag-changes)
(notmuch-search query)))
(defun notmuch-tree-to-tree ()
(notmuch-search query)))
(defun notmuch-tree-to-tree ()
- "Run a query and display results in Tree view"
+ "Run a query and display results in tree view."
(interactive)
(let ((query (notmuch-read-query "Notmuch tree view search: ")))
(notmuch-tree-close-message-window)
(notmuch-tree query)))
(defun notmuch-unthreaded-from-tree-current-query ()
(interactive)
(let ((query (notmuch-read-query "Notmuch tree view search: ")))
(notmuch-tree-close-message-window)
(notmuch-tree query)))
(defun notmuch-unthreaded-from-tree-current-query ()
- "Switch from tree view to unthreaded view"
+ "Switch from tree view to unthreaded view."
(interactive)
(unless notmuch-tree-unthreaded
(notmuch-tree-refresh-view 'unthreaded)))
(defun notmuch-tree-from-unthreaded-current-query ()
(interactive)
(unless notmuch-tree-unthreaded
(notmuch-tree-refresh-view 'unthreaded)))
(defun notmuch-tree-from-unthreaded-current-query ()
- "Switch from unthreaded view to tree view"
+ "Switch from unthreaded view to tree view."
(interactive)
(when notmuch-tree-unthreaded
(notmuch-tree-refresh-view 'tree)))
(defun notmuch-search-from-tree-current-query ()
(interactive)
(when notmuch-tree-unthreaded
(notmuch-tree-refresh-view 'tree)))
(defun notmuch-search-from-tree-current-query ()
- "Call notmuch search with the current query"
+ "Call notmuch search with the current query."
(interactive)
(notmuch-tree-close-message-window)
(notmuch-search (notmuch-tree-get-query)))
(interactive)
(notmuch-tree-close-message-window)
(notmuch-search (notmuch-tree-get-query)))
(notmuch-tree-show-message-in)))
(defun notmuch-tree-scroll-message-window ()
(notmuch-tree-show-message-in)))
(defun notmuch-tree-scroll-message-window ()
- "Scroll the message window (if it exists)"
+ "Scroll the message window (if it exists)."
(interactive)
(when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(interactive)
(when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(scroll-up)))))
(defun notmuch-tree-scroll-message-window-back ()
(scroll-up)))))
(defun notmuch-tree-scroll-message-window-back ()
- "Scroll the message window back(if it exists)"
+ "Scroll the message window back(if it exists)."
(interactive)
(when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(interactive)
(when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
(not (funcall eobfn))))
(defun notmuch-tree-matching-message (&optional prev pop-at-end)
(not (funcall eobfn))))
(defun notmuch-tree-matching-message (&optional prev pop-at-end)
- "Move to the next or previous matching message"
+ "Move to the next or previous matching message."
(interactive "P")
(forward-line (if prev -1 nil))
(if (and (not (notmuch-tree-goto-matching-message prev)) pop-at-end)
(interactive "P")
(forward-line (if prev -1 nil))
(if (and (not (notmuch-tree-goto-matching-message prev)) pop-at-end)
" or "))
(defun notmuch-tree-tag-thread (tag-changes)
" or "))
(defun notmuch-tree-tag-thread (tag-changes)
- "Tag all messages in the current thread"
+ "Tag all messages in the current thread."
(interactive
(let ((tags (apply #'append (notmuch-tree-thread-mapcar
(lambda () (notmuch-tree-get-tags))))))
(interactive
(let ((tags (apply #'append (notmuch-tree-thread-mapcar
(lambda () (notmuch-tree-get-tags))))))
(or p-name p-address)))
(defun notmuch-tree-format-field (field format-string msg)
(or p-name p-address)))
(defun notmuch-tree-format-field (field format-string msg)
- "Format a FIELD of MSG according to FORMAT-STRING and return string"
+ "Format a FIELD of MSG according to FORMAT-STRING and return string."
(let* ((headers (plist-get msg :headers))
(match (plist-get msg :match)))
(cond
(let* ((headers (plist-get msg :headers))
(match (plist-get msg :match)))
(cond
(format format-string (notmuch-tag-format-tags tags orig-tags face)))))))
(defun notmuch-tree-format-field-list (field-list msg)
(format format-string (notmuch-tag-format-tags tags orig-tags face)))))))
(defun notmuch-tree-format-field-list (field-list msg)
- "Format fields of MSG according to FIELD-LIST and return string"
+ "Format fields of MSG according to FIELD-LIST and return string."
(let ((face (if (plist-get msg :match)
'notmuch-tree-match-face
'notmuch-tree-no-match-face))
(let ((face (if (plist-get msg :match)
'notmuch-tree-match-face
'notmuch-tree-no-match-face))
(notmuch-apply-face result-string face t)))
(defun notmuch-tree-insert-msg (msg)
(notmuch-apply-face result-string face t)))
(defun notmuch-tree-insert-msg (msg)
- "Insert the message MSG according to notmuch-tree-result-format"
+ "Insert the message MSG according to notmuch-tree-result-format."
;; We need to save the previous subject as it will get overwritten
;; by the insert-field calls.
(let ((previous-subject notmuch-tree-previous-subject))
;; We need to save the previous subject as it will get overwritten
;; by the insert-field calls.
(let ((previous-subject notmuch-tree-previous-subject))
(insert "\n")))
(defun notmuch-tree-goto-and-insert-msg (msg)
(insert "\n")))
(defun notmuch-tree-goto-and-insert-msg (msg)
- "Insert msg at the end of the buffer. Move point to msg if it is the target"
+ "Insert msg at the end of the buffer. Move point to msg if it is the target."
(save-excursion
(goto-char (point-max))
(notmuch-tree-insert-msg msg))
(save-excursion
(goto-char (point-max))
(notmuch-tree-insert-msg msg))
truncate-lines t))
(defun notmuch-tree-process-sentinel (proc msg)
truncate-lines t))
(defun notmuch-tree-process-sentinel (proc msg)
- "Add a message to let user know when \"notmuch tree\" exits"
+ "Add a message to let user know when \"notmuch tree\" exits."
(let ((buffer (process-buffer proc))
(status (process-status proc))
(exit-status (process-exit-status proc))
(let ((buffer (process-buffer proc))
(status (process-status proc))
(exit-status (process-exit-status proc))
(insert "\n")))))))))
(defun notmuch-tree-process-filter (proc string)
(insert "\n")))))))))
(defun notmuch-tree-process-filter (proc string)
- "Process and filter the output of \"notmuch show\" for tree view"
+ "Process and filter the output of \"notmuch show\" for tree view."
(let ((results-buf (process-buffer proc))
(parse-buf (process-get proc 'parse-buf))
(inhibit-read-only t)
(let ((results-buf (process-buffer proc))
(parse-buf (process-get proc 'parse-buf))
(inhibit-read-only t)
(set-process-query-on-exit-flag proc nil))))
(defun notmuch-tree-get-query ()
(set-process-query-on-exit-flag proc nil))))
(defun notmuch-tree-get-query ()
- "Return the current query in this tree buffer"
+ "Return the current query in this tree buffer."
(if notmuch-tree-query-context
(concat notmuch-tree-basic-query
" and ("
(if notmuch-tree-query-context
(concat notmuch-tree-basic-query
" and ("
notmuch-tree-basic-query))
(defun notmuch-tree (&optional query query-context target buffer-name open-target unthreaded)
notmuch-tree-basic-query))
(defun notmuch-tree (&optional query query-context target buffer-name open-target unthreaded)
- "Display threads matching QUERY in Tree View.
+ "Display threads matching QUERY in tree view.
The arguments are:
QUERY: the main query. This can be any query but in many cases will be
The arguments are:
QUERY: the main query. This can be any query but in many cases will be
(format label-format lines-count)))
(defun notmuch-wash-region-to-button (msg beg end type &optional prefix)
(format label-format lines-count)))
(defun notmuch-wash-region-to-button (msg beg end type &optional prefix)
- "Auxiliary function to do the actual making of overlays and buttons
+ "Auxiliary function to do the actual making of overlays and buttons.
BEG and END are buffer locations. TYPE should a string, either
\"citation\" or \"signature\". Optional PREFIX is some arbitrary
BEG and END are buffer locations. TYPE should a string, either
\"citation\" or \"signature\". Optional PREFIX is some arbitrary
:group 'notmuch)
(defvar notmuch-query-history nil
:group 'notmuch)
(defvar notmuch-query-history nil
- "Variable to store minibuffer history for notmuch queries")
+ "Variable to store minibuffer history for notmuch queries.")
(defun notmuch-foreach-mime-part (function mm-handle)
(cond ((stringp (car mm-handle))
(defun notmuch-foreach-mime-part (function mm-handle)
(cond ((stringp (car mm-handle))
(define-key map "q" 'notmuch-stash-query)
(define-key map "?" 'notmuch-subkeymap-help)
map)
(define-key map "q" 'notmuch-stash-query)
(define-key map "?" 'notmuch-subkeymap-help)
map)
- "Submap for stash commands")
+ "Submap for stash commands.")
(fset 'notmuch-search-stash-map notmuch-search-stash-map)
(defun notmuch-search-stash-thread-id ()
(fset 'notmuch-search-stash-map notmuch-search-stash-map)
(defun notmuch-search-stash-thread-id ()
The returned point will be just after the newline character that
ends the result line. If there is no thread at POS (or point),
The returned point will be just after the newline character that
ends the result line. If there is no thread at POS (or point),
(when (notmuch-search-get-result pos)
(next-single-property-change (or pos (point)) 'notmuch-search-result
nil (point-max))))
(when (notmuch-search-get-result pos)
(next-single-property-change (or pos (point)) 'notmuch-search-result
nil (point-max))))
output))
(defun notmuch-search-find-thread-id (&optional bare)
output))
(defun notmuch-search-find-thread-id (&optional bare)
- "Return the thread for the current thread
+ "Return the thread for the current thread.
-If BARE is set then do not prefix with \"thread:\""
+If BARE is set then do not prefix with \"thread:\"."
(let ((thread (plist-get (notmuch-search-get-result) :thread)))
(when thread (concat (unless bare "thread:") thread))))
(let ((thread (plist-get (notmuch-search-get-result) :thread)))
(when thread (concat (unless bare "thread:") thread))))
(concat "(" (mapconcat 'identity query-list ") or (") ")"))))
(defun notmuch-search-find-authors ()
(concat "(" (mapconcat 'identity query-list ") or (") ")"))))
(defun notmuch-search-find-authors ()
- "Return the authors for the current thread"
+ "Return the authors for the current thread."
(plist-get (notmuch-search-get-result) :authors))
(defun notmuch-search-find-authors-region (beg end)
(plist-get (notmuch-search-get-result) :authors))
(defun notmuch-search-find-authors-region (beg end)
- "Return a list of authors for the current region"
+ "Return a list of authors for the current region."
(notmuch-search-properties-in-region :authors beg end))
(defun notmuch-search-find-subject ()
(notmuch-search-properties-in-region :authors beg end))
(defun notmuch-search-find-subject ()
- "Return the subject for the current thread"
+ "Return the subject for the current thread."
(plist-get (notmuch-search-get-result) :subject))
(defun notmuch-search-find-subject-region (beg end)
(plist-get (notmuch-search-get-result) :subject))
(defun notmuch-search-find-subject-region (beg end)
- "Return a list of authors for the current region"
+ "Return a list of authors for the current region."
(notmuch-search-properties-in-region :subject beg end))
(defun notmuch-search-show-thread (&optional elide-toggle)
(notmuch-search-properties-in-region :subject beg end))
(defun notmuch-search-show-thread (&optional elide-toggle)
(message "End of search results."))))
(defun notmuch-tree-from-search-current-query ()
(message "End of search results."))))
(defun notmuch-tree-from-search-current-query ()
- "Call notmuch tree with the current query"
+ "Call notmuch tree with the current query."
(interactive)
(notmuch-tree notmuch-search-query-string))
(defun notmuch-unthreaded-from-search-current-query ()
(interactive)
(notmuch-tree notmuch-search-query-string))
(defun notmuch-unthreaded-from-search-current-query ()
- "Call notmuch tree with the current query"
+ "Call notmuch tree with the current query."
(interactive)
(notmuch-unthreaded notmuch-search-query-string))
(defun notmuch-tree-from-search-thread ()
(interactive)
(notmuch-unthreaded notmuch-search-query-string))
(defun notmuch-tree-from-search-thread ()
- "Show the selected thread with notmuch-tree"
+ "Show the selected thread with notmuch-tree."
(interactive)
(notmuch-tree (notmuch-search-find-thread-id)
(interactive)
(notmuch-tree (notmuch-search-find-thread-id)
- notmuch-search-query-string
+ notmuch-search-query-string
- (notmuch-prettify-subject (notmuch-search-find-subject))
+ (notmuch-prettify-subject (notmuch-search-find-subject))
t))
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
t))
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
(goto-char new-point)))))
(defun notmuch-search-process-sentinel (proc msg)
(goto-char new-point)))))
(defun notmuch-search-process-sentinel (proc msg)
- "Add a message to let user know when \"notmuch search\" exits"
+ "Add a message to let user know when \"notmuch search\" exits."
(let ((buffer (process-buffer proc))
(status (process-status proc))
(exit-status (process-exit-status proc))
(let ((buffer (process-buffer proc))
(status (process-status proc))
(exit-status (process-exit-status proc))
(goto-char pos))))
(defun notmuch-search-process-filter (proc string)
(goto-char pos))))
(defun notmuch-search-process-filter (proc string)
- "Process and filter the output of \"notmuch search\""
+ "Process and filter the output of \"notmuch search\"."
(let ((results-buf (process-buffer proc))
(parse-buf (process-get proc 'parse-buf))
(inhibit-read-only t)
(let ((results-buf (process-buffer proc))
(parse-buf (process-get proc 'parse-buf))
(inhibit-read-only t)
'notmuch-search-history current-query nil)))))
(defun notmuch-search-get-query ()
'notmuch-search-history current-query nil)))))
(defun notmuch-search-get-query ()
- "Return the current query in this search buffer"
+ "Return the current query in this search buffer."
notmuch-search-query-string)
(put 'notmuch-search 'notmuch-doc "Search for messages.")
notmuch-search-query-string)
(put 'notmuch-search 'notmuch-doc "Search for messages.")