mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs docstrings: consistent indentation, newlines, periods
Fixed emacs docstrings to be consistent. No functional change. - removed some (accidental) indentation - removed some trailing newlines - added trailing periods where missing (some exclusions)
This commit is contained in:
parent
507d2f07a6
commit
ed40579ad3
13 changed files with 110 additions and 114 deletions
|
@ -29,7 +29,7 @@
|
|||
(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.
|
||||
|
@ -126,8 +126,7 @@ to know how address selection is made by default."
|
|||
|
||||
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)
|
||||
|
@ -147,7 +146,7 @@ matching `notmuch-address-completion-headers-regexp'.
|
|||
(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)
|
||||
|
@ -285,7 +284,7 @@ external commands."
|
|||
(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.
|
||||
|
|
|
@ -87,10 +87,10 @@ postponing and resuming a message."
|
|||
|
||||
(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
|
||||
"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 ()
|
||||
|
|
|
@ -359,7 +359,7 @@ supported for \"Customized queries section\" items."
|
|||
: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
|
||||
|
@ -501,8 +501,7 @@ If FILTER is a function, it is called with QUERY as a parameter and
|
|||
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)
|
||||
|
@ -656,7 +655,7 @@ with `notmuch-hello-query-counts'."
|
|||
(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"
|
||||
|
@ -923,7 +922,7 @@ following:
|
|||
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
|
||||
|
@ -931,7 +930,7 @@ following:
|
|||
: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)
|
||||
|
|
|
@ -88,8 +88,7 @@ ACTION-MAP must be a list of triples of the form
|
|||
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
|
||||
|
|
|
@ -189,7 +189,7 @@ If notmuch exits with a non-zero status, output from the process
|
|||
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)))
|
||||
|
@ -299,7 +299,7 @@ This is basically just `format-kbd-macro' but we also convert ESC to M-."
|
|||
|
||||
|
||||
(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))))
|
||||
|
@ -530,11 +530,11 @@ This replaces spaces, percents, and double quotes in STR with
|
|||
(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)
|
||||
"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) "*")
|
||||
|
|
|
@ -78,7 +78,7 @@ directory if it does not exist yet when sending a mail."
|
|||
: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))
|
||||
|
@ -93,7 +93,7 @@ directory if it does not exist yet when sending a mail."
|
|||
Sets the Fcc header based on the values of `notmuch-fcc-dirs'.
|
||||
|
||||
Originally intended to be use a hook function, but now called directly
|
||||
by notmuch-mua-mail"
|
||||
by notmuch-mua-mail."
|
||||
|
||||
(let ((subdir
|
||||
(cond
|
||||
|
|
|
@ -334,7 +334,7 @@ Typically this is added to `notmuch-mua-send-hook'."
|
|||
(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)
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
|
||||
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"))))
|
||||
|
@ -40,7 +39,7 @@ is a possibly empty forest of replies.
|
|||
;; 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)
|
||||
|
@ -48,20 +47,20 @@ is a possibly empty forest of replies.
|
|||
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)
|
||||
"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)
|
||||
"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))))
|
||||
|
@ -70,7 +69,7 @@ See the function notmuch-query-get-threads for more information."
|
|||
;; 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)))
|
||||
|
|
|
@ -179,7 +179,7 @@ indentation."
|
|||
(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
|
||||
|
@ -266,7 +266,7 @@ position of the message in the thread."
|
|||
: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 "*"))))
|
||||
|
@ -887,7 +887,7 @@ will return nil if the CID is unknown or cannot be retrieved."
|
|||
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
|
||||
|
@ -898,7 +898,7 @@ will return nil if the CID is unknown or cannot be retrieved."
|
|||
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.
|
||||
|
@ -1381,7 +1381,7 @@ This includes:
|
|||
(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 ("
|
||||
|
@ -1459,7 +1459,7 @@ reset based on the original query."
|
|||
(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
|
||||
|
@ -1471,7 +1471,7 @@ reset based on the original query."
|
|||
(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
|
||||
|
@ -1561,14 +1561,14 @@ All currently available key bindings:
|
|||
#'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 ()
|
||||
"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
|
||||
|
@ -2011,7 +2011,7 @@ to show, nil otherwise."
|
|||
(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))
|
||||
|
@ -2511,7 +2511,7 @@ the new buffer."
|
|||
(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")))
|
||||
|
|
|
@ -84,7 +84,7 @@ from TAGGING-OPERATIONS."
|
|||
: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
|
||||
|
@ -313,7 +313,7 @@ are not in TAGS) 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
|
||||
`notmuch-tag-formats'"
|
||||
`notmuch-tag-formats'."
|
||||
(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)))
|
||||
|
@ -351,7 +351,7 @@ changed (the normal case) are shown using formats from
|
|||
'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)
|
||||
|
@ -363,7 +363,7 @@ the messages that are about to be tagged"
|
|||
'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)
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
;; 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
|
||||
|
@ -72,7 +72,7 @@
|
|||
("authors" . "%-20s")
|
||||
((("tree" . "%s")("subject" . "%s")) ." %-54s ")
|
||||
("tags" . "(%s)"))
|
||||
"Result formatting for Tree view. Supported fields are: date,
|
||||
"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
|
||||
|
@ -92,7 +92,7 @@ Note the author string should not contain
|
|||
("authors" . "%-20s")
|
||||
((("subject" . "%s")) ." %-54s ")
|
||||
("tags" . "(%s)"))
|
||||
"Result formatting for unthreaded Tree view. Supported fields are: date,
|
||||
"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
|
||||
|
@ -166,7 +166,7 @@ Note the author string should not contain
|
|||
;; 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)
|
||||
|
||||
|
@ -201,23 +201,23 @@ Note the author string should not contain
|
|||
: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
|
||||
"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
|
||||
"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
|
||||
"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
|
||||
"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
|
||||
|
@ -251,14 +251,14 @@ open (if the message pane is closed it does nothing)."
|
|||
(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)
|
||||
"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)
|
||||
|
@ -346,7 +346,7 @@ FUNC."
|
|||
|
||||
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)))
|
||||
|
@ -432,7 +432,7 @@ NOT change the database."
|
|||
(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)
|
||||
|
@ -472,26 +472,26 @@ NOT change the database."
|
|||
(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 ()
|
||||
"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 ()
|
||||
"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 ()
|
||||
"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)))
|
||||
|
@ -563,7 +563,7 @@ Shows in split pane or whole window according to value of
|
|||
(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
|
||||
|
@ -572,7 +572,7 @@ Shows in split pane or whole window according to value of
|
|||
(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
|
||||
|
@ -661,7 +661,7 @@ nil otherwise."
|
|||
(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)
|
||||
|
@ -734,7 +734,7 @@ found or nil if not."
|
|||
" 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))))))
|
||||
|
@ -775,7 +775,7 @@ unchanged ADDRESS if parsing fails."
|
|||
(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
|
||||
|
@ -831,7 +831,7 @@ unchanged ADDRESS if parsing fails."
|
|||
(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))
|
||||
|
@ -842,7 +842,7 @@ unchanged ADDRESS if parsing fails."
|
|||
(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))
|
||||
|
@ -852,7 +852,7 @@ unchanged ADDRESS if parsing fails."
|
|||
(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))
|
||||
|
@ -946,7 +946,7 @@ Complete list of currently available key bindings:
|
|||
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))
|
||||
|
@ -968,7 +968,7 @@ Complete list of currently available key bindings:
|
|||
(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)
|
||||
|
@ -1026,7 +1026,7 @@ the same as for the function notmuch-tree."
|
|||
(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 ("
|
||||
|
@ -1035,7 +1035,7 @@ the same as for the function notmuch-tree."
|
|||
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
|
||||
|
|
|
@ -192,7 +192,7 @@ message parts."
|
|||
(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
|
||||
|
|
|
@ -113,7 +113,7 @@ there will be called at other points of notmuch execution."
|
|||
: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))
|
||||
|
@ -202,7 +202,7 @@ there will be called at other points of notmuch execution."
|
|||
(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 ()
|
||||
|
@ -417,7 +417,7 @@ If there is no thread at POS (or point), returns nil."
|
|||
|
||||
The returned point will be just after the newline character that
|
||||
ends the result line. If there is no thread at POS (or point),
|
||||
returns nil"
|
||||
returns nil."
|
||||
(when (notmuch-search-get-result pos)
|
||||
(next-single-property-change (or pos (point)) 'notmuch-search-result
|
||||
nil (point-max))))
|
||||
|
@ -457,9 +457,9 @@ BEG."
|
|||
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))))
|
||||
|
||||
|
@ -486,19 +486,19 @@ no messages in the region then return nil."
|
|||
(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)
|
||||
"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 ()
|
||||
"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)
|
||||
"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)
|
||||
|
@ -520,17 +520,17 @@ thread."
|
|||
(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 ()
|
||||
"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 ()
|
||||
"Show the selected thread with notmuch-tree"
|
||||
"Show the selected thread with notmuch-tree."
|
||||
(interactive)
|
||||
(notmuch-tree (notmuch-search-find-thread-id)
|
||||
notmuch-search-query-string
|
||||
|
@ -660,7 +660,7 @@ of the result."
|
|||
(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))
|
||||
|
@ -862,7 +862,7 @@ sets the :orig-tag property."
|
|||
(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)
|
||||
|
@ -952,7 +952,7 @@ PROMPT is the string to prompt with."
|
|||
'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.")
|
||||
|
|
Loading…
Reference in a new issue