mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +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,11 +29,11 @@
|
||||||
(declare-function company-manual-begin "company")
|
(declare-function company-manual-begin "company")
|
||||||
|
|
||||||
(defvar notmuch-address-last-harvest 0
|
(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)
|
(defvar notmuch-address-completions (make-hash-table :test 'equal)
|
||||||
"Hash of email addresses for completion during email composition.
|
"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
|
(defvar notmuch-address-full-harvest-finished nil
|
||||||
"t indicates that full completion address harvesting has been
|
"t indicates that full completion address harvesting has been
|
||||||
|
@ -73,11 +73,11 @@ disabled."
|
||||||
"Determines how internal address completion generates candidates.
|
"Determines how internal address completion generates candidates.
|
||||||
|
|
||||||
This should be a list of the form '(DIRECTION FILTER), where
|
This should be a list of the form '(DIRECTION FILTER), where
|
||||||
DIRECTION is either sent or received and specifies whether the
|
DIRECTION is either sent or received and specifies whether the
|
||||||
candidates are searched in messages sent by the user or received
|
candidates are searched in messages sent by the user or received
|
||||||
by the user (note received by is much faster), and FILTER is
|
by the user (note received by is much faster), and FILTER is
|
||||||
either nil or a filter-string, such as \"date:1y..\" to append
|
either nil or a filter-string, such as \"date:1y..\" to append
|
||||||
to the query."
|
to the query."
|
||||||
:type '(list :tag "Use internal address completion"
|
:type '(list :tag "Use internal address completion"
|
||||||
(radio
|
(radio
|
||||||
:tag "Base completion on messages you have"
|
:tag "Base completion on messages you have"
|
||||||
|
@ -126,8 +126,7 @@ to know how address selection is made by default."
|
||||||
|
|
||||||
The completed address is passed as an argument to each function.
|
The completed address is passed as an argument to each function.
|
||||||
Note that this hook will be invoked for completion in headers
|
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
|
:type 'hook
|
||||||
:group 'notmuch-address
|
:group 'notmuch-address
|
||||||
:group 'notmuch-hooks)
|
:group 'notmuch-hooks)
|
||||||
|
@ -147,7 +146,7 @@ matching `notmuch-address-completion-headers-regexp'.
|
||||||
(message "calling notmuch-address-message-insinuate is no longer needed"))
|
(message "calling notmuch-address-message-insinuate is no longer needed"))
|
||||||
|
|
||||||
(defcustom notmuch-address-use-company t
|
(defcustom notmuch-address-use-company t
|
||||||
"If available, use company mode for address completion"
|
"If available, use company mode for address completion."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:group 'notmuch-send
|
:group 'notmuch-send
|
||||||
:group 'notmuch-address)
|
:group 'notmuch-address)
|
||||||
|
@ -285,7 +284,7 @@ external commands."
|
||||||
(defvar notmuch-address-harvest-procs '(nil . nil)
|
(defvar notmuch-address-harvest-procs '(nil . nil)
|
||||||
"The currently running harvests.
|
"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)
|
(defun notmuch-address-harvest (&optional addr-prefix synchronous callback)
|
||||||
"Collect addresses completion candidates.
|
"Collect addresses completion candidates.
|
||||||
|
|
|
@ -76,7 +76,7 @@ postponing and resuming a message."
|
||||||
|
|
||||||
(defcustom notmuch-draft-save-plaintext 'ask
|
(defcustom notmuch-draft-save-plaintext 'ask
|
||||||
"Should notmuch save/postpone in plaintext messages that seem
|
"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)."
|
(i.e with an mml encryption tag in it)."
|
||||||
:type '(radio
|
:type '(radio
|
||||||
(const :tag "Never" nil)
|
(const :tag "Never" nil)
|
||||||
|
@ -87,10 +87,10 @@ postponing and resuming a message."
|
||||||
|
|
||||||
(defvar notmuch-draft-encryption-tag-regex
|
(defvar notmuch-draft-encryption-tag-regex
|
||||||
"<#\\(part encrypt\\|secure.*mode=.*encrypt>\\)"
|
"<#\\(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)
|
(make-variable-buffer-local 'notmuch-draft-id)
|
||||||
|
|
||||||
(defun notmuch-draft--mark-deleted ()
|
(defun notmuch-draft--mark-deleted ()
|
||||||
|
|
|
@ -359,7 +359,7 @@ supported for \"Customized queries section\" items."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defvar notmuch-hello-hidden-sections nil
|
(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
|
(defvar notmuch-hello-first-run t
|
||||||
"True if `notmuch-hello' is run for the first time, set to nil
|
"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 string it returns is used as the query. If nil is returned,
|
||||||
the entry is hidden.
|
the entry is hidden.
|
||||||
|
|
||||||
Otherwise, FILTER is ignored.
|
Otherwise, FILTER is ignored."
|
||||||
"
|
|
||||||
(cond
|
(cond
|
||||||
((functionp filter) (funcall filter query))
|
((functionp filter) (funcall filter query))
|
||||||
((stringp filter)
|
((stringp filter)
|
||||||
|
@ -656,7 +655,7 @@ with `notmuch-hello-query-counts'."
|
||||||
(defvar notmuch-emacs-version)
|
(defvar notmuch-emacs-version)
|
||||||
|
|
||||||
(defun notmuch-hello-versions ()
|
(defun notmuch-hello-versions ()
|
||||||
"Display the notmuch version(s)"
|
"Display the notmuch version(s)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((notmuch-cli-version (notmuch-cli-version)))
|
(let ((notmuch-cli-version (notmuch-cli-version)))
|
||||||
(message "notmuch version %s"
|
(message "notmuch version %s"
|
||||||
|
@ -923,7 +922,7 @@ following:
|
||||||
options))
|
options))
|
||||||
|
|
||||||
(defun notmuch-hello-insert-inbox ()
|
(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"
|
(notmuch-hello-insert-searches "What's in your inbox"
|
||||||
(append
|
(append
|
||||||
notmuch-saved-searches
|
notmuch-saved-searches
|
||||||
|
@ -931,7 +930,7 @@ following:
|
||||||
:filter "tag:inbox"))
|
:filter "tag:inbox"))
|
||||||
|
|
||||||
(defun notmuch-hello-insert-alltags ()
|
(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
|
(notmuch-hello-insert-tags-section
|
||||||
nil
|
nil
|
||||||
:initially-hidden (not notmuch-show-all-tags-list)
|
: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
|
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
|
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
|
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))
|
(let* ((items (notmuch-jump--format-actions action-map))
|
||||||
;; Format the table of bindings and the full prompt
|
;; 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 appear in a buffer named \"*Notmuch errors*\" and an error
|
||||||
will be signaled.
|
will be signaled.
|
||||||
|
|
||||||
Otherwise the output will be returned"
|
Otherwise the output will be returned."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let* ((status (apply #'call-process notmuch-command nil t nil args))
|
(let* ((status (apply #'call-process notmuch-command nil t nil args))
|
||||||
(output (buffer-string)))
|
(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)
|
(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."
|
It does not prepend if ACTUAL-KEY is already listed in TAIL."
|
||||||
(let ((key-string (concat prefix (key-description actual-key))))
|
(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)))
|
(cdr xplist)))
|
||||||
|
|
||||||
(defun notmuch-split-content-type (content-type)
|
(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 "/"))
|
(split-string content-type "/"))
|
||||||
|
|
||||||
(defun notmuch-match-content-type (t1 t2)
|
(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))
|
(let ((st1 (notmuch-split-content-type t1))
|
||||||
(st2 (notmuch-split-content-type t2)))
|
(st2 (notmuch-split-content-type t2)))
|
||||||
(if (or (string= (cadr st1) "*")
|
(if (or (string= (cadr st1) "*")
|
||||||
|
|
|
@ -78,7 +78,7 @@ directory if it does not exist yet when sending a mail."
|
||||||
:group 'notmuch-send)
|
:group 'notmuch-send)
|
||||||
|
|
||||||
(defcustom notmuch-maildir-use-notmuch-insert 't
|
(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"
|
:type '(choice :tag "Fcc Method"
|
||||||
(const :tag "Use notmuch insert" t)
|
(const :tag "Use notmuch insert" t)
|
||||||
(const :tag "Use simple fcc" nil))
|
(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'.
|
Sets the Fcc header based on the values of `notmuch-fcc-dirs'.
|
||||||
|
|
||||||
Originally intended to be use a hook function, but now called directly
|
Originally intended to be use a hook function, but now called directly
|
||||||
by notmuch-mua-mail"
|
by notmuch-mua-mail."
|
||||||
|
|
||||||
(let ((subdir
|
(let ((subdir
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -334,7 +334,7 @@ Typically this is added to `notmuch-mua-send-hook'."
|
||||||
(set-buffer-modified-p nil))
|
(set-buffer-modified-p nil))
|
||||||
|
|
||||||
(define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
|
(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))
|
(notmuch-address-setup))
|
||||||
|
|
||||||
(put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
|
(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
|
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
|
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")))
|
(let ((args '("show" "--format=sexp" "--format-version=4")))
|
||||||
(if notmuch-show-process-crypto
|
(if notmuch-show-process-crypto
|
||||||
(setq args (append args '("--decrypt=true"))))
|
(setq args (append args '("--decrypt=true"))))
|
||||||
|
@ -40,7 +39,7 @@ is a possibly empty forest of replies.
|
||||||
;; Mapping functions across collections of messages.
|
;; Mapping functions across collections of messages.
|
||||||
|
|
||||||
(defun notmuch-query-map-aux (mapper function seq)
|
(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
|
(apply 'append
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (tree)
|
(lambda (tree)
|
||||||
|
@ -48,20 +47,20 @@ is a possibly empty forest of replies.
|
||||||
seq)))
|
seq)))
|
||||||
|
|
||||||
(defun notmuch-query-map-threads (fn threads)
|
(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."
|
See the function notmuch-query-get-threads for more information."
|
||||||
(notmuch-query-map-aux 'notmuch-query-map-forest fn threads))
|
(notmuch-query-map-aux 'notmuch-query-map-forest fn threads))
|
||||||
|
|
||||||
(defun notmuch-query-map-forest (fn forest)
|
(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.
|
See the function notmuch-query-get-threads for more information.
|
||||||
"
|
"
|
||||||
(notmuch-query-map-aux 'notmuch-query-map-tree fn forest))
|
(notmuch-query-map-aux 'notmuch-query-map-tree fn forest))
|
||||||
|
|
||||||
(defun notmuch-query-map-tree (fn tree)
|
(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."
|
See the function notmuch-query-get-threads for more information."
|
||||||
(cons (funcall fn (car tree)) (notmuch-query-map-forest fn (cadr tree))))
|
(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
|
;; Predefined queries
|
||||||
|
|
||||||
(defun notmuch-query-get-message-ids (&rest search-terms)
|
(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
|
(notmuch-query-map-threads
|
||||||
(lambda (msg) (plist-get msg :id))
|
(lambda (msg) (plist-get msg :id))
|
||||||
(notmuch-query-get-threads search-terms)))
|
(notmuch-query-get-threads search-terms)))
|
||||||
|
|
|
@ -179,7 +179,7 @@ indentation."
|
||||||
(make-variable-buffer-local 'notmuch-show-indent-content)
|
(make-variable-buffer-local 'notmuch-show-indent-content)
|
||||||
|
|
||||||
(defvar notmuch-show-attachment-debug nil
|
(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
|
When set to nil (the default) stdout and stderr from attachment
|
||||||
handlers is discarded. When set to t the stdout and stderr from
|
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)
|
:group 'notmuch-show)
|
||||||
|
|
||||||
(defmacro with-current-notmuch-show-message (&rest body)
|
(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
|
`(save-excursion
|
||||||
(let ((id (notmuch-show-get-message-id)))
|
(let ((id (notmuch-show-get-message-id)))
|
||||||
(let ((buf (generate-new-buffer (concat "*notmuch-msg-" 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))))
|
nil))))
|
||||||
|
|
||||||
(defun notmuch-show-create-part-overlays (button beg end)
|
(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
|
;; 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
|
;; 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))
|
t))
|
||||||
|
|
||||||
(defun notmuch-show-record-part-information (part beg end)
|
(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,
|
;; Record part information. Since we already inserted subparts,
|
||||||
;; don't override existing :notmuch-part properties.
|
;; 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))))
|
(list win-id-combo (notmuch-show-get-message-ids-for-open-messages))))
|
||||||
|
|
||||||
(defun notmuch-show-get-query ()
|
(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
|
(if notmuch-show-query-context
|
||||||
(concat notmuch-show-thread-id
|
(concat notmuch-show-thread-id
|
||||||
" and ("
|
" and ("
|
||||||
|
@ -1459,7 +1459,7 @@ reset based on the original query."
|
||||||
(define-key map "G" 'notmuch-show-stash-git-send-email)
|
(define-key map "G" 'notmuch-show-stash-git-send-email)
|
||||||
(define-key map "?" 'notmuch-subkeymap-help)
|
(define-key map "?" 'notmuch-subkeymap-help)
|
||||||
map)
|
map)
|
||||||
"Submap for stash commands")
|
"Submap for stash commands.")
|
||||||
(fset 'notmuch-show-stash-map notmuch-show-stash-map)
|
(fset 'notmuch-show-stash-map notmuch-show-stash-map)
|
||||||
|
|
||||||
(defvar notmuch-show-part-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 "m" 'notmuch-show-choose-mime-of-part)
|
||||||
(define-key map "?" 'notmuch-subkeymap-help)
|
(define-key map "?" 'notmuch-subkeymap-help)
|
||||||
map)
|
map)
|
||||||
"Submap for part commands")
|
"Submap for part commands.")
|
||||||
(fset 'notmuch-show-part-map notmuch-show-part-map)
|
(fset 'notmuch-show-part-map notmuch-show-part-map)
|
||||||
|
|
||||||
(defvar notmuch-show-mode-map
|
(defvar notmuch-show-mode-map
|
||||||
|
@ -1561,14 +1561,14 @@ All currently available key bindings:
|
||||||
#'notmuch-show-imenu-extract-index-name-function))
|
#'notmuch-show-imenu-extract-index-name-function))
|
||||||
|
|
||||||
(defun notmuch-tree-from-show-current-query ()
|
(defun notmuch-tree-from-show-current-query ()
|
||||||
"Call notmuch tree with the current query"
|
"Call notmuch tree with the current query."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-tree notmuch-show-thread-id
|
(notmuch-tree notmuch-show-thread-id
|
||||||
notmuch-show-query-context
|
notmuch-show-query-context
|
||||||
(notmuch-show-get-message-id)))
|
(notmuch-show-get-message-id)))
|
||||||
|
|
||||||
(defun notmuch-unthreaded-from-show-current-query ()
|
(defun notmuch-unthreaded-from-show-current-query ()
|
||||||
"Call notmuch unthreaded with the current query"
|
"Call notmuch unthreaded with the current query."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-unthreaded notmuch-show-thread-id
|
(notmuch-unthreaded notmuch-show-thread-id
|
||||||
notmuch-show-query-context
|
notmuch-show-query-context
|
||||||
|
@ -2011,7 +2011,7 @@ to show, nil otherwise."
|
||||||
(notmuch-show-message-visible props (plist-get props :match))))
|
(notmuch-show-message-visible props (plist-get props :match))))
|
||||||
|
|
||||||
(defun notmuch-show-goto-first-wanted-message ()
|
(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))
|
(goto-char (point-min))
|
||||||
(unless (notmuch-show-message-visible-p)
|
(unless (notmuch-show-message-visible-p)
|
||||||
(notmuch-show-next-open-message))
|
(notmuch-show-next-open-message))
|
||||||
|
@ -2511,7 +2511,7 @@ the new buffer."
|
||||||
(view-buffer buf 'kill-buffer-if-not-modified))))
|
(view-buffer buf 'kill-buffer-if-not-modified))))
|
||||||
|
|
||||||
(defun notmuch-show-choose-mime-of-part (mime-type)
|
(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
|
(interactive
|
||||||
(list (completing-read "Mime type to use (default text/plain): "
|
(list (completing-read "Mime type to use (default text/plain): "
|
||||||
(mailcap-mime-types) nil nil nil nil "text/plain")))
|
(mailcap-mime-types) nil nil nil nil "text/plain")))
|
||||||
|
|
|
@ -84,7 +84,7 @@ from TAGGING-OPERATIONS."
|
||||||
:group 'notmuch-tag)
|
:group 'notmuch-tag)
|
||||||
|
|
||||||
(define-widget 'notmuch-tag-format-type 'lazy
|
(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")
|
:type '(alist :key-type (regexp :tag "Tag")
|
||||||
:extra-offset -3
|
:extra-offset -3
|
||||||
:value-type
|
: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
|
are in TAGS but are not in ORIG-TAGS) are shown using formats
|
||||||
from `notmuch-tag-added-formats' and tags which have not been
|
from `notmuch-tag-added-formats' and tags which have not been
|
||||||
changed (the normal case) are shown using formats from
|
changed (the normal case) are shown using formats from
|
||||||
`notmuch-tag-formats'"
|
`notmuch-tag-formats'."
|
||||||
(let* ((tag-state (cond ((not (member tag tags)) 'deleted)
|
(let* ((tag-state (cond ((not (member tag tags)) 'deleted)
|
||||||
((not (member tag orig-tags)) 'added)))
|
((not (member tag orig-tags)) 'added)))
|
||||||
(formatted-tag (gethash (cons tag tag-state) notmuch-tag--format-cache 'missing)))
|
(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
|
'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\".
|
a list of strings of the form \"+TAG\" or \"-TAG\".
|
||||||
'query' will be a string containing the search query that determines
|
'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
|
:type 'hook
|
||||||
:options '(notmuch-hl-line-mode)
|
: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
|
'tag-changes' will contain the tags that were added or removed as
|
||||||
a list of strings of the form \"+TAG\" or \"-TAG\".
|
a list of strings of the form \"+TAG\" or \"-TAG\".
|
||||||
'query' will be a string containing the search query that determines
|
'query' will be a string containing the search query that determines
|
||||||
the messages that were tagged"
|
the messages that were tagged."
|
||||||
:type 'hook
|
:type 'hook
|
||||||
:options '(notmuch-hl-line-mode)
|
:options '(notmuch-hl-line-mode)
|
||||||
:group 'notmuch-hooks)
|
:group 'notmuch-hooks)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
;; this variable distinguishes the unthreaded display from the normal tree display
|
;; this variable distinguishes the unthreaded display from the normal tree display
|
||||||
(defvar notmuch-tree-unthreaded nil
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-unthreaded)
|
||||||
|
|
||||||
(defgroup notmuch-tree nil
|
(defgroup notmuch-tree nil
|
||||||
|
@ -72,18 +72,18 @@
|
||||||
("authors" . "%-20s")
|
("authors" . "%-20s")
|
||||||
((("tree" . "%s")("subject" . "%s")) ." %-54s ")
|
((("tree" . "%s")("subject" . "%s")) ." %-54s ")
|
||||||
("tags" . "(%s)"))
|
("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
|
authors, subject, tree, tags. Tree means the thread tree
|
||||||
box graphics. The field may also be a list in which case
|
box graphics. The field may also be a list in which case
|
||||||
the formatting rules are applied recursively and then the
|
the formatting rules are applied recursively and then the
|
||||||
output of all the fields in the list is inserted
|
output of all the fields in the list is inserted
|
||||||
according to format-string.
|
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).
|
whitespace (put it in the neighbouring fields instead).
|
||||||
For example:
|
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))
|
:type '(alist :key-type (string) :value-type (string))
|
||||||
:group 'notmuch-tree)
|
:group 'notmuch-tree)
|
||||||
|
|
||||||
|
@ -92,18 +92,18 @@ Note the author string should not contain
|
||||||
("authors" . "%-20s")
|
("authors" . "%-20s")
|
||||||
((("subject" . "%s")) ." %-54s ")
|
((("subject" . "%s")) ." %-54s ")
|
||||||
("tags" . "(%s)"))
|
("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
|
authors, subject, tree, tags. Tree means the thread tree
|
||||||
box graphics. The field may also be a list in which case
|
box graphics. The field may also be a list in which case
|
||||||
the formatting rules are applied recursively and then the
|
the formatting rules are applied recursively and then the
|
||||||
output of all the fields in the list is inserted
|
output of all the fields in the list is inserted
|
||||||
according to format-string.
|
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).
|
whitespace (put it in the neighbouring fields instead).
|
||||||
For example:
|
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))
|
:type '(alist :key-type (string) :value-type (string))
|
||||||
:group 'notmuch-tree)
|
:group 'notmuch-tree)
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ Note the author string should not contain
|
||||||
;; Faces for messages that do not match the query.
|
;; Faces for messages that do not match the query.
|
||||||
(defface notmuch-tree-no-match-face
|
(defface notmuch-tree-no-match-face
|
||||||
'((t (:foreground "gray")))
|
'((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-tree
|
||||||
:group 'notmuch-faces)
|
:group 'notmuch-faces)
|
||||||
|
|
||||||
|
@ -201,23 +201,23 @@ Note the author string should not contain
|
||||||
:group 'notmuch-faces)
|
:group 'notmuch-faces)
|
||||||
|
|
||||||
(defvar notmuch-tree-previous-subject
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-previous-subject)
|
||||||
|
|
||||||
(defvar notmuch-tree-basic-query nil
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-basic-query)
|
||||||
|
|
||||||
(defvar notmuch-tree-query-context nil
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-query-context)
|
||||||
|
|
||||||
(defvar notmuch-tree-target-msg nil
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-target-msg)
|
||||||
|
|
||||||
(defvar notmuch-tree-open-target nil
|
(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)
|
(make-variable-buffer-local 'notmuch-tree-open-target)
|
||||||
|
|
||||||
(defvar notmuch-tree-message-window nil
|
(defvar notmuch-tree-message-window nil
|
||||||
|
@ -251,14 +251,14 @@ open (if the message pane is closed it does nothing)."
|
||||||
(call-interactively #',func)))))
|
(call-interactively #',func)))))
|
||||||
|
|
||||||
(defun notmuch-tree-inherit-from-message-pane (sym)
|
(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)
|
(if (window-live-p notmuch-tree-message-window)
|
||||||
(with-selected-window notmuch-tree-message-window
|
(with-selected-window notmuch-tree-message-window
|
||||||
(symbol-value sym))
|
(symbol-value sym))
|
||||||
(symbol-value sym)))
|
(symbol-value sym)))
|
||||||
|
|
||||||
(defun notmuch-tree-button-activate (&optional button)
|
(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."
|
This function does not give an error if there is no button."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -346,7 +346,7 @@ FUNC."
|
||||||
|
|
||||||
Some useful entries are:
|
Some useful entries are:
|
||||||
:headers - Property list containing the headers :Date, :Subject, :From, etc.
|
:headers - Property list containing the headers :Date, :Subject, :From, etc.
|
||||||
:tags - Tags for this message"
|
:tags - Tags for this message."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(get-text-property (point) :notmuch-message-properties)))
|
(get-text-property (point) :notmuch-message-properties)))
|
||||||
|
@ -432,7 +432,7 @@ NOT change the database."
|
||||||
(notmuch-show-update-tags new-tags)))))))
|
(notmuch-show-update-tags new-tags)))))))
|
||||||
|
|
||||||
(defun notmuch-tree-tag (tag-changes)
|
(defun notmuch-tree-tag (tag-changes)
|
||||||
"Change tags for the current message"
|
"Change tags for the current message."
|
||||||
(interactive
|
(interactive
|
||||||
(list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
|
(list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message")))
|
||||||
(notmuch-tag (notmuch-tree-get-message-id) tag-changes)
|
(notmuch-tag (notmuch-tree-get-message-id) tag-changes)
|
||||||
|
@ -472,26 +472,26 @@ NOT change the database."
|
||||||
(notmuch-search query)))
|
(notmuch-search query)))
|
||||||
|
|
||||||
(defun notmuch-tree-to-tree ()
|
(defun notmuch-tree-to-tree ()
|
||||||
"Run a query and display results in Tree view"
|
"Run a query and display results in tree view."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((query (notmuch-read-query "Notmuch tree view search: ")))
|
(let ((query (notmuch-read-query "Notmuch tree view search: ")))
|
||||||
(notmuch-tree-close-message-window)
|
(notmuch-tree-close-message-window)
|
||||||
(notmuch-tree query)))
|
(notmuch-tree query)))
|
||||||
|
|
||||||
(defun notmuch-unthreaded-from-tree-current-query ()
|
(defun notmuch-unthreaded-from-tree-current-query ()
|
||||||
"Switch from tree view to unthreaded view"
|
"Switch from tree view to unthreaded view."
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless notmuch-tree-unthreaded
|
(unless notmuch-tree-unthreaded
|
||||||
(notmuch-tree-refresh-view 'unthreaded)))
|
(notmuch-tree-refresh-view 'unthreaded)))
|
||||||
|
|
||||||
(defun notmuch-tree-from-unthreaded-current-query ()
|
(defun notmuch-tree-from-unthreaded-current-query ()
|
||||||
"Switch from unthreaded view to tree view"
|
"Switch from unthreaded view to tree view."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when notmuch-tree-unthreaded
|
(when notmuch-tree-unthreaded
|
||||||
(notmuch-tree-refresh-view 'tree)))
|
(notmuch-tree-refresh-view 'tree)))
|
||||||
|
|
||||||
(defun notmuch-search-from-tree-current-query ()
|
(defun notmuch-search-from-tree-current-query ()
|
||||||
"Call notmuch search with the current query"
|
"Call notmuch search with the current query."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-tree-close-message-window)
|
(notmuch-tree-close-message-window)
|
||||||
(notmuch-search (notmuch-tree-get-query)))
|
(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)))
|
(notmuch-tree-show-message-in)))
|
||||||
|
|
||||||
(defun notmuch-tree-scroll-message-window ()
|
(defun notmuch-tree-scroll-message-window ()
|
||||||
"Scroll the message window (if it exists)"
|
"Scroll the message window (if it exists)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (window-live-p notmuch-tree-message-window)
|
(when (window-live-p notmuch-tree-message-window)
|
||||||
(with-selected-window 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)))))
|
(scroll-up)))))
|
||||||
|
|
||||||
(defun notmuch-tree-scroll-message-window-back ()
|
(defun notmuch-tree-scroll-message-window-back ()
|
||||||
"Scroll the message window back(if it exists)"
|
"Scroll the message window back(if it exists)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when (window-live-p notmuch-tree-message-window)
|
(when (window-live-p notmuch-tree-message-window)
|
||||||
(with-selected-window notmuch-tree-message-window
|
(with-selected-window notmuch-tree-message-window
|
||||||
|
@ -661,7 +661,7 @@ nil otherwise."
|
||||||
(not (funcall eobfn))))
|
(not (funcall eobfn))))
|
||||||
|
|
||||||
(defun notmuch-tree-matching-message (&optional prev pop-at-end)
|
(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")
|
(interactive "P")
|
||||||
(forward-line (if prev -1 nil))
|
(forward-line (if prev -1 nil))
|
||||||
(if (and (not (notmuch-tree-goto-matching-message prev)) pop-at-end)
|
(if (and (not (notmuch-tree-goto-matching-message prev)) pop-at-end)
|
||||||
|
@ -734,7 +734,7 @@ found or nil if not."
|
||||||
" or "))
|
" or "))
|
||||||
|
|
||||||
(defun notmuch-tree-tag-thread (tag-changes)
|
(defun notmuch-tree-tag-thread (tag-changes)
|
||||||
"Tag all messages in the current thread"
|
"Tag all messages in the current thread."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((tags (apply #'append (notmuch-tree-thread-mapcar
|
(let ((tags (apply #'append (notmuch-tree-thread-mapcar
|
||||||
(lambda () (notmuch-tree-get-tags))))))
|
(lambda () (notmuch-tree-get-tags))))))
|
||||||
|
@ -775,7 +775,7 @@ unchanged ADDRESS if parsing fails."
|
||||||
(or p-name p-address)))
|
(or p-name p-address)))
|
||||||
|
|
||||||
(defun notmuch-tree-format-field (field format-string msg)
|
(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))
|
(let* ((headers (plist-get msg :headers))
|
||||||
(match (plist-get msg :match)))
|
(match (plist-get msg :match)))
|
||||||
(cond
|
(cond
|
||||||
|
@ -831,7 +831,7 @@ unchanged ADDRESS if parsing fails."
|
||||||
(format format-string (notmuch-tag-format-tags tags orig-tags face)))))))
|
(format format-string (notmuch-tag-format-tags tags orig-tags face)))))))
|
||||||
|
|
||||||
(defun notmuch-tree-format-field-list (field-list msg)
|
(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)
|
(let ((face (if (plist-get msg :match)
|
||||||
'notmuch-tree-match-face
|
'notmuch-tree-match-face
|
||||||
'notmuch-tree-no-match-face))
|
'notmuch-tree-no-match-face))
|
||||||
|
@ -842,7 +842,7 @@ unchanged ADDRESS if parsing fails."
|
||||||
(notmuch-apply-face result-string face t)))
|
(notmuch-apply-face result-string face t)))
|
||||||
|
|
||||||
(defun notmuch-tree-insert-msg (msg)
|
(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
|
;; We need to save the previous subject as it will get overwritten
|
||||||
;; by the insert-field calls.
|
;; by the insert-field calls.
|
||||||
(let ((previous-subject notmuch-tree-previous-subject))
|
(let ((previous-subject notmuch-tree-previous-subject))
|
||||||
|
@ -852,7 +852,7 @@ unchanged ADDRESS if parsing fails."
|
||||||
(insert "\n")))
|
(insert "\n")))
|
||||||
|
|
||||||
(defun notmuch-tree-goto-and-insert-msg (msg)
|
(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
|
(save-excursion
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(notmuch-tree-insert-msg msg))
|
(notmuch-tree-insert-msg msg))
|
||||||
|
@ -946,7 +946,7 @@ Complete list of currently available key bindings:
|
||||||
truncate-lines t))
|
truncate-lines t))
|
||||||
|
|
||||||
(defun notmuch-tree-process-sentinel (proc msg)
|
(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))
|
(let ((buffer (process-buffer proc))
|
||||||
(status (process-status proc))
|
(status (process-status proc))
|
||||||
(exit-status (process-exit-status proc))
|
(exit-status (process-exit-status proc))
|
||||||
|
@ -968,7 +968,7 @@ Complete list of currently available key bindings:
|
||||||
(insert "\n")))))))))
|
(insert "\n")))))))))
|
||||||
|
|
||||||
(defun notmuch-tree-process-filter (proc string)
|
(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))
|
(let ((results-buf (process-buffer proc))
|
||||||
(parse-buf (process-get proc 'parse-buf))
|
(parse-buf (process-get proc 'parse-buf))
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
|
@ -1026,7 +1026,7 @@ the same as for the function notmuch-tree."
|
||||||
(set-process-query-on-exit-flag proc nil))))
|
(set-process-query-on-exit-flag proc nil))))
|
||||||
|
|
||||||
(defun notmuch-tree-get-query ()
|
(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
|
(if notmuch-tree-query-context
|
||||||
(concat notmuch-tree-basic-query
|
(concat notmuch-tree-basic-query
|
||||||
" and ("
|
" and ("
|
||||||
|
@ -1035,7 +1035,7 @@ the same as for the function notmuch-tree."
|
||||||
notmuch-tree-basic-query))
|
notmuch-tree-basic-query))
|
||||||
|
|
||||||
(defun notmuch-tree (&optional query query-context target buffer-name open-target unthreaded)
|
(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:
|
The arguments are:
|
||||||
QUERY: the main query. This can be any query but in many cases will be
|
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)))
|
(format label-format lines-count)))
|
||||||
|
|
||||||
(defun notmuch-wash-region-to-button (msg beg end type &optional prefix)
|
(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
|
BEG and END are buffer locations. TYPE should a string, either
|
||||||
\"citation\" or \"signature\". Optional PREFIX is some arbitrary
|
\"citation\" or \"signature\". Optional PREFIX is some arbitrary
|
||||||
|
|
|
@ -113,7 +113,7 @@ there will be called at other points of notmuch execution."
|
||||||
:group 'notmuch)
|
:group 'notmuch)
|
||||||
|
|
||||||
(defvar notmuch-query-history nil
|
(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)
|
(defun notmuch-foreach-mime-part (function mm-handle)
|
||||||
(cond ((stringp (car 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 "q" 'notmuch-stash-query)
|
||||||
(define-key map "?" 'notmuch-subkeymap-help)
|
(define-key map "?" 'notmuch-subkeymap-help)
|
||||||
map)
|
map)
|
||||||
"Submap for stash commands")
|
"Submap for stash commands.")
|
||||||
(fset 'notmuch-search-stash-map notmuch-search-stash-map)
|
(fset 'notmuch-search-stash-map notmuch-search-stash-map)
|
||||||
|
|
||||||
(defun notmuch-search-stash-thread-id ()
|
(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
|
The returned point will be just after the newline character that
|
||||||
ends the result line. If there is no thread at POS (or point),
|
ends the result line. If there is no thread at POS (or point),
|
||||||
returns nil"
|
returns nil."
|
||||||
(when (notmuch-search-get-result pos)
|
(when (notmuch-search-get-result pos)
|
||||||
(next-single-property-change (or pos (point)) 'notmuch-search-result
|
(next-single-property-change (or pos (point)) 'notmuch-search-result
|
||||||
nil (point-max))))
|
nil (point-max))))
|
||||||
|
@ -457,9 +457,9 @@ BEG."
|
||||||
output))
|
output))
|
||||||
|
|
||||||
(defun notmuch-search-find-thread-id (&optional bare)
|
(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)))
|
(let ((thread (plist-get (notmuch-search-get-result) :thread)))
|
||||||
(when thread (concat (unless bare "thread:") 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 (") ")"))))
|
(concat "(" (mapconcat 'identity query-list ") or (") ")"))))
|
||||||
|
|
||||||
(defun notmuch-search-find-authors ()
|
(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))
|
(plist-get (notmuch-search-get-result) :authors))
|
||||||
|
|
||||||
(defun notmuch-search-find-authors-region (beg end)
|
(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))
|
(notmuch-search-properties-in-region :authors beg end))
|
||||||
|
|
||||||
(defun notmuch-search-find-subject ()
|
(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))
|
(plist-get (notmuch-search-get-result) :subject))
|
||||||
|
|
||||||
(defun notmuch-search-find-subject-region (beg end)
|
(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))
|
(notmuch-search-properties-in-region :subject beg end))
|
||||||
|
|
||||||
(defun notmuch-search-show-thread (&optional elide-toggle)
|
(defun notmuch-search-show-thread (&optional elide-toggle)
|
||||||
|
@ -520,22 +520,22 @@ thread."
|
||||||
(message "End of search results."))))
|
(message "End of search results."))))
|
||||||
|
|
||||||
(defun notmuch-tree-from-search-current-query ()
|
(defun notmuch-tree-from-search-current-query ()
|
||||||
"Call notmuch tree with the current query"
|
"Call notmuch tree with the current query."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-tree notmuch-search-query-string))
|
(notmuch-tree notmuch-search-query-string))
|
||||||
|
|
||||||
(defun notmuch-unthreaded-from-search-current-query ()
|
(defun notmuch-unthreaded-from-search-current-query ()
|
||||||
"Call notmuch tree with the current query"
|
"Call notmuch tree with the current query."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-unthreaded notmuch-search-query-string))
|
(notmuch-unthreaded notmuch-search-query-string))
|
||||||
|
|
||||||
(defun notmuch-tree-from-search-thread ()
|
(defun notmuch-tree-from-search-thread ()
|
||||||
"Show the selected thread with notmuch-tree"
|
"Show the selected thread with notmuch-tree."
|
||||||
(interactive)
|
(interactive)
|
||||||
(notmuch-tree (notmuch-search-find-thread-id)
|
(notmuch-tree (notmuch-search-find-thread-id)
|
||||||
notmuch-search-query-string
|
notmuch-search-query-string
|
||||||
nil
|
nil
|
||||||
(notmuch-prettify-subject (notmuch-search-find-subject))
|
(notmuch-prettify-subject (notmuch-search-find-subject))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
|
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)
|
||||||
|
@ -660,7 +660,7 @@ of the result."
|
||||||
(goto-char new-point)))))
|
(goto-char new-point)))))
|
||||||
|
|
||||||
(defun notmuch-search-process-sentinel (proc msg)
|
(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))
|
(let ((buffer (process-buffer proc))
|
||||||
(status (process-status proc))
|
(status (process-status proc))
|
||||||
(exit-status (process-exit-status proc))
|
(exit-status (process-exit-status proc))
|
||||||
|
@ -862,7 +862,7 @@ sets the :orig-tag property."
|
||||||
(goto-char pos))))
|
(goto-char pos))))
|
||||||
|
|
||||||
(defun notmuch-search-process-filter (proc string)
|
(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))
|
(let ((results-buf (process-buffer proc))
|
||||||
(parse-buf (process-get proc 'parse-buf))
|
(parse-buf (process-get proc 'parse-buf))
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
|
@ -952,7 +952,7 @@ PROMPT is the string to prompt with."
|
||||||
'notmuch-search-history current-query nil)))))
|
'notmuch-search-history current-query nil)))))
|
||||||
|
|
||||||
(defun notmuch-search-get-query ()
|
(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)
|
notmuch-search-query-string)
|
||||||
|
|
||||||
(put 'notmuch-search 'notmuch-doc "Search for messages.")
|
(put 'notmuch-search 'notmuch-doc "Search for messages.")
|
||||||
|
|
Loading…
Reference in a new issue