mu4e: Rename 'Unnamed' sections

This commit is contained in:
Dirk-Jan C. Binnema
2020-02-18 23:39:30 +02:00
parent fe7a0e4da2
commit e10fc21a9b
8 changed files with 31 additions and 48 deletions

View File

@ -43,7 +43,7 @@
(defvar mu4e-view-date-format) (defvar mu4e-view-date-format)
;;; UNNAMED ;;; Count lines
(defun mu4e-action-count-lines (msg) (defun mu4e-action-count-lines (msg)
"Count the number of lines in the e-mail MSG. "Count the number of lines in the e-mail MSG.
@ -52,7 +52,7 @@ Works for headers view and message-view."
(shell-command-to-string (shell-command-to-string
(concat "wc -l < " (shell-quote-argument (mu4e-message-field msg :path)))))) (concat "wc -l < " (shell-quote-argument (mu4e-message-field msg :path))))))
;;; UNNAMED ;;; To PDF
(defvar mu4e-msg2pdf (defvar mu4e-msg2pdf
(let ((exec-path (cons (concat mu4e-builddir "/toys/msg2pdf/") exec-path))) (let ((exec-path (cons (concat mu4e-builddir "/toys/msg2pdf/") exec-path)))
@ -75,7 +75,7 @@ Works for the message view."
(mu4e-warn "Failed to create PDF file")) (mu4e-warn "Failed to create PDF file"))
(find-file pdf))) (find-file pdf)))
;;; UNNAMED ;;; To HTML
(defun mu4e~action-header-to-html (msg field) (defun mu4e~action-header-to-html (msg field)
"Convert the FIELD of MSG to an HTML string." "Convert the FIELD of MSG to an HTML string."
@ -156,7 +156,7 @@ privacy aspects in `(mu4e) Displaying rich-text messages'."
(xwidget-webkit-browse-url (xwidget-webkit-browse-url
(concat "file://" (mu4e~write-body-to-html msg)) t)) (concat "file://" (mu4e~write-body-to-html msg)) t))
;;; UNNAMED ;;; To speech
(defconst mu4e-text2speech-command "festival --tts" (defconst mu4e-text2speech-command "festival --tts"
"Program that speaks out text it receives on standard input.") "Program that speaks out text it receives on standard input.")
@ -170,7 +170,7 @@ privacy aspects in `(mu4e) Displaying rich-text messages'."
(shell-command-on-region (point-min) (point-max) (shell-command-on-region (point-min) (point-max)
mu4e-text2speech-command))) mu4e-text2speech-command)))
;;; UNNAMED ;;; Org Helpers
(defvar mu4e-captured-message nil (defvar mu4e-captured-message nil
"The most recently captured message.") "The most recently captured message.")
@ -182,14 +182,11 @@ Later, we can create an attachment based on this message with
(setq mu4e-captured-message msg) (setq mu4e-captured-message msg)
(message "Message has been captured")) (message "Message has been captured"))
;;; UNNAMED
(defun mu4e-action-copy-message-file-path (msg) (defun mu4e-action-copy-message-file-path (msg)
"Save the full path for the current MSG to the kill ring." "Save the full path for the current MSG to the kill ring."
(kill-new (mu4e-message-field msg :path))) (kill-new (mu4e-message-field msg :path)))
;;; UNNAMED
(defvar mu4e-org-contacts-file nil (defvar mu4e-org-contacts-file nil
"File to store contact information for org-contacts. "File to store contact information for org-contacts.
Needed by `mu4e-action-add-org-contact'.") Needed by `mu4e-action-add-org-contact'.")
@ -228,7 +225,7 @@ file where you store your org-contacts."
(when (fboundp 'org-capture) (when (fboundp 'org-capture)
(org-capture nil key)))) (org-capture nil key))))
;;; UNNAMED ;;; Patches
(defvar mu4e~patch-directory-history nil (defvar mu4e~patch-directory-history nil
"History of directories we have applied patches to.") "History of directories we have applied patches to.")
@ -268,7 +265,7 @@ bother asking for the git tree again (useful for bulk actions)."
(if signoff "--signoff" "") (if signoff "--signoff" "")
(shell-quote-argument (mu4e-message-field msg :path))))))) (shell-quote-argument (mu4e-message-field msg :path)))))))
;;; UNNAMED ;;; Tagging
(defvar mu4e-action-tags-header "X-Keywords" (defvar mu4e-action-tags-header "X-Keywords"
"Header where tags are stored. "Header where tags are stored.

View File

@ -203,7 +203,7 @@ place to do that."
"The compose-type for this buffer. "The compose-type for this buffer.
This is a symbol, `new', `forward', `reply' or `edit'.") This is a symbol, `new', `forward', `reply' or `edit'.")
;;; UNNAMED ;;; Attachments
(defun mu4e-compose-attach-message (msg) (defun mu4e-compose-attach-message (msg)
"Insert message MSG as an attachment." "Insert message MSG as an attachment."
@ -224,7 +224,7 @@ Messages are captured with `mu4e-action-capture-message'."
(mu4e-warn "No message has been captured")) (mu4e-warn "No message has been captured"))
(mu4e-compose-attach-message mu4e-captured-message)) (mu4e-compose-attach-message mu4e-captured-message))
;;; UNNAMED ;;; Misc
;; 'fcc' refers to saving a copy of a sent message to a certain folder. that's ;; 'fcc' refers to saving a copy of a sent message to a certain folder. that's
;; what these 'Sent mail' folders are for! ;; what these 'Sent mail' folders are for!
@ -376,7 +376,7 @@ removing the In-Reply-To header."
(unless (message-fetch-field "in-reply-to") (unless (message-fetch-field "in-reply-to")
(message-remove-header "References"))) (message-remove-header "References")))
;;; UNNAMED ;;; Compose Mode
(defvar mu4e-compose-mode-map nil (defvar mu4e-compose-mode-map nil
"Keymap for \"*mu4e-compose*\" buffers.") "Keymap for \"*mu4e-compose*\" buffers.")
@ -818,7 +818,7 @@ draft message."
(mu4e-compose 'new)) (mu4e-compose 'new))
;;; UNNAMED ;;; Compose Mail
;; mu4e-compose-func and mu4e-send-func are wrappers so we can set ourselves ;; mu4e-compose-func and mu4e-send-func are wrappers so we can set ourselves
;; as default emacs mailer (define-mail-user-agent etc.) ;; as default emacs mailer (define-mail-user-agent etc.)
@ -904,7 +904,7 @@ buffer buried."
"Return the `mu4e-user-agent' symbol." "Return the `mu4e-user-agent' symbol."
'mu4e-user-agent) 'mu4e-user-agent)
;;; UNNAMED ;;; Go to bottom / top
(defun mu4e-compose-goto-top (&optional arg) (defun mu4e-compose-goto-top (&optional arg)
"Go to the beginning of the message or buffer. "Go to the beginning of the message or buffer.

View File

@ -73,8 +73,6 @@ mu4e-specific version of `message-signature'."
:type 'boolean :type 'boolean
:group 'mu4e-compose) :group 'mu4e-compose)
;;; UNNAMED
(defvar mu4e-user-agent-string (defvar mu4e-user-agent-string
(format "mu4e %s; emacs %s" mu4e-mu-version emacs-version) (format "mu4e %s; emacs %s" mu4e-mu-version emacs-version)
"The User-Agent string for mu4e, or nil.") "The User-Agent string for mu4e, or nil.")
@ -317,7 +315,7 @@ This is based on the variable `user-full-name' and
(format "%s" user-mail-address)))) (format "%s" user-mail-address))))
;;; UNNAMED ;;; Header separators
(defun mu4e~draft-insert-mail-header-separator () (defun mu4e~draft-insert-mail-header-separator ()
"Insert `mail-header-separator' in the first empty line of the message. "Insert `mail-header-separator' in the first empty line of the message.

View File

@ -338,7 +338,7 @@ followed by the docid, followed by `mu4e~headers-docid-post'.")
"List of cells describing the various sort-options. "List of cells describing the various sort-options.
In the format needed for `mu4e-read-option'.") In the format needed for `mu4e-read-option'.")
;;; UNNAMED ;;; Clear
(defun mu4e~headers-clear (&optional msg) (defun mu4e~headers-clear (&optional msg)
"Clear the header buffer and related data structures." "Clear the header buffer and related data structures."
@ -436,7 +436,7 @@ If SKIP-HOOK is absent or nil, `mu4e-message-changed-hook' will be invoked."
(run-hooks 'mu4e-message-changed-hook))) (run-hooks 'mu4e-message-changed-hook)))
;;; UNNAMED ;;; Misc
(defun mu4e~headers-contact-str (contacts) (defun mu4e~headers-contact-str (contacts)
"Turn the list of contacts CONTACTS (with elements (NAME . EMAIL) "Turn the list of contacts CONTACTS (with elements (NAME . EMAIL)
@ -446,8 +446,6 @@ into a string."
(let ((name (car ct)) (email (cdr ct))) (let ((name (car ct)) (email (cdr ct)))
(or name email "?"))) contacts ", ")) (or name email "?"))) contacts ", "))
;;; UNNAMED
(defun mu4e~headers-thread-prefix-map (type) (defun mu4e~headers-thread-prefix-map (type)
"Return the thread prefix based on the symbol TYPE." "Return the thread prefix based on the symbol TYPE."
(let ((get-prefix (let ((get-prefix
@ -604,7 +602,7 @@ while our display may be different)."
('unread (funcall get-prefix mu4e-headers-unread-mark))))))) ('unread (funcall get-prefix mu4e-headers-unread-mark)))))))
str)) str))
;;; UNNAMED ;;; Special headers
(defconst mu4e-headers-from-or-to-prefix '("" . "To ") (defconst mu4e-headers-from-or-to-prefix '("" . "To ")
"Prefix for the :from-or-to field. "Prefix for the :from-or-to field.
@ -805,7 +803,7 @@ after the end of the search results."
(run-hooks 'mu4e-headers-found-hook))) (run-hooks 'mu4e-headers-found-hook)))
;;; UNNAMED ;;; Marking
(defmacro mu4e~headers-defun-mark-for (mark) (defmacro mu4e~headers-defun-mark-for (mark)
"Define a function mu4e~headers-mark-MARK." "Define a function mu4e~headers-mark-MARK."
@ -830,8 +828,6 @@ after the end of the search results."
(mu4e~headers-defun-mark-for unread) (mu4e~headers-defun-mark-for unread)
(mu4e~headers-defun-mark-for action) (mu4e~headers-defun-mark-for action)
;;; UNNAMED
(defvar mu4e-move-to-trash-patterns '() (defvar mu4e-move-to-trash-patterns '()
"List of regexps to match for moving to trash instead of flagging them. "List of regexps to match for moving to trash instead of flagging them.
This is particularly useful for mailboxes that don't use the This is particularly useful for mailboxes that don't use the
@ -1140,7 +1136,7 @@ Also, unhighlight any previously highlighted headers."
(hl-line-highlight))) (hl-line-highlight)))
(setq mu4e~highlighted-docid docid))) (setq mu4e~highlighted-docid docid)))
;;; UNNAMED ;;; Misc 2
(defun mu4e~headers-select-window () (defun mu4e~headers-select-window ()
"When there is a visible window for the headers buffer, make sure "When there is a visible window for the headers buffer, make sure
@ -1158,7 +1154,7 @@ message plist, or nil if not found."
(when (and this-msgid (string= msgid this-msgid)) (when (and this-msgid (string= msgid this-msgid))
msg))))) msg)))))
;;; UNNAMED markers mark headers for ;;; Marking 2
(defun mu4e~headers-mark (docid mark) (defun mu4e~headers-mark (docid mark)
"(Visually) mark the header for DOCID with character MARK." "(Visually) mark the header for DOCID with character MARK."
@ -1210,7 +1206,7 @@ docid is not found."
(unless ignore-missing (unless ignore-missing
(mu4e-error "Cannot find message with docid %S" docid))))) (mu4e-error "Cannot find message with docid %S" docid)))))
;;; UNNAMED ;;; Queries & searching
(defcustom mu4e-query-rewrite-function 'identity (defcustom mu4e-query-rewrite-function 'identity
"Function that takes a search expression string, and returns a "Function that takes a search expression string, and returns a

View File

@ -37,7 +37,7 @@
(declare-function mu4e~headers-goto-docid "mu4e-headers") (declare-function mu4e~headers-goto-docid "mu4e-headers")
(declare-function mu4e-headers-next "mu4e-headers") (declare-function mu4e-headers-next "mu4e-headers")
;;; UNNAMED ;;; Variables & constants
(defcustom mu4e-headers-leave-behavior 'ask (defcustom mu4e-headers-leave-behavior 'ask
"What to do when user leaves the headers view. "What to do when user leaves the headers view.
@ -437,7 +437,6 @@ If NO-CONFIRMATION is non-nil, don't ask user for confirmation."
"Is the given DOCID marked?" "Is the given DOCID marked?"
(when (gethash docid mu4e~mark-map) t)) (when (gethash docid mu4e~mark-map) t))
;;; UNNAMED
(defun mu4e-mark-marks-num () (defun mu4e-mark-marks-num ()
"Return the number of mark-instances in the current buffer." "Return the number of mark-instances in the current buffer."

View File

@ -84,7 +84,7 @@ message-plist and the text, which is the plain-text version,
ossibly converted from html and/or transformed by earlier rewrite ossibly converted from html and/or transformed by earlier rewrite
functions.") functions.")
;;; UNNAMED ;;; Message fields
(defsubst mu4e-message-field-raw (msg field) (defsubst mu4e-message-field-raw (msg field)
"Retrieve FIELD from message plist MSG. "Retrieve FIELD from message plist MSG.
@ -310,7 +310,7 @@ Eiter in the headers buffer or the view buffer. Field is a
Eiter in the headers buffer or the view buffer. Field is a Eiter in the headers buffer or the view buffer. Field is a
symbol, see `mu4e-header-info'." symbol, see `mu4e-header-info'."
(plist-get (mu4e-message-at-point) field)) (plist-get (mu4e-message-at-point) field))
;;; Html2Text ;;; Html2Text
(defun mu4e~html2text-wrapper (func msg) (defun mu4e~html2text-wrapper (func msg)

View File

@ -545,7 +545,7 @@ Or go to the top level if there is none."
('mu4e-view-mode "(mu4e)Message view") ('mu4e-view-mode "(mu4e)Message view")
(t "mu4e")))) (t "mu4e"))))
;;; UNNAMED Buffers and windows (1/2) ;;; Misc
(defun mu4e-last-query () (defun mu4e-last-query ()
"Get the most recent query or nil if there is none." "Get the most recent query or nil if there is none."
@ -588,8 +588,6 @@ that has a live window), and vice versa."
(view-mode))) (view-mode)))
(switch-to-buffer buf))) (switch-to-buffer buf)))
;;; UNNAMED
(defvar mu4e~lists-hash nil (defvar mu4e~lists-hash nil
"Hashtable of mailing-list-id => shortname, based on "Hashtable of mailing-list-id => shortname, based on
`mu4e~mailing-lists' and `mu4e-user-mailing-lists'.") `mu4e~mailing-lists' and `mu4e-user-mailing-lists'.")
@ -618,8 +616,6 @@ on `mu4e~mailing-lists', `mu4e-user-mailing-lists', and
(match-string 1 list-id) (match-string 1 list-id)
list-id))) list-id)))
;;; UNNAMED
(defvar mu4e-index-updated-hook nil (defvar mu4e-index-updated-hook nil
"Hook run when the indexing process had one or more updated messages. "Hook run when the indexing process had one or more updated messages.
This can be used as a simple way to invoke some action when new This can be used as a simple way to invoke some action when new
@ -674,7 +670,7 @@ process."
(t (error "Error %d: %s" errcode errmsg)))) (t (error "Error %d: %s" errcode errmsg))))
;;; UNNAMED ;;; Contacts
(defun mu4e~update-contacts (contacts &optional tstamp) (defun mu4e~update-contacts (contacts &optional tstamp)
"Receive a sorted list of CONTACTS. "Receive a sorted list of CONTACTS.
@ -851,7 +847,7 @@ When successful, call FUNC (if non-nil) afterwards."
(buffer-list))) (buffer-list)))
;;; UNNAMED ;;; Indexing & Updating
(defvar mu4e~progress-reporter nil (defvar mu4e~progress-reporter nil
"Internal, the progress reporter object.") "Internal, the progress reporter object.")
@ -1097,7 +1093,7 @@ This includes expanding e.g. 3-5 into 3,4,5. If the letter
(mu4e-warn "Attachment number must be greater than 0 (%d)" x)))) (mu4e-warn "Attachment number must be greater than 0 (%d)" x))))
list))) list)))
;;; UNNAMED ;;; Misc 2
(defvar mu4e-imagemagick-identify "identify" (defvar mu4e-imagemagick-identify "identify"
"Name/path of the Imagemagick 'identify' program.") "Name/path of the Imagemagick 'identify' program.")
@ -1187,7 +1183,7 @@ displaying it). Do _not_ bury the current buffer, though."
(interactive) (interactive)
(mu4e-info (concat mu4e-doc-dir "/NEWS.org"))) (mu4e-info (concat mu4e-doc-dir "/NEWS.org")))
;;; UNNAMED ;;; Misc 3
(defun mu4e-refresh-message (path) (defun mu4e-refresh-message (path)
"Re-parse message at PATH; if this works, we will "Re-parse message at PATH; if this works, we will
@ -1195,7 +1191,6 @@ receive (:info add :path <path> :docid <docid>) as well as (:update
<msg-sexp>)." <msg-sexp>)."
(mu4e~proc-add path)) (mu4e~proc-add path))
;;; UNNAMED
(defun mu4e~fontify-cited () (defun mu4e~fontify-cited ()
"Colorize message content based on the citation level. This is "Colorize message content based on the citation level. This is
@ -1226,7 +1221,7 @@ the view and compose modes and will color each signature in digest messages adhe
(point-max)))) (point-max))))
(add-text-properties p end '(face mu4e-footer-face))))))) (add-text-properties p end '(face mu4e-footer-face)))))))
;;; UNNAMED ;;; Misc 4
(defun mu4e~quote-for-modeline (str) (defun mu4e~quote-for-modeline (str)
"Quote a string to be used literally in the modeline. The "Quote a string to be used literally in the modeline. The
@ -1244,8 +1239,6 @@ string will be shortened to fit if its length exceeds
;; Escape the % character ;; Escape the % character
(replace-regexp-in-string "%" "%%" str t t))) (replace-regexp-in-string "%" "%%" str t t)))
;;; UNNAMED Buffers and windows (1/2)
(defun mu4e~active-composition-buffers () (defun mu4e~active-composition-buffers ()
"Return all active mu4e composition buffers" "Return all active mu4e composition buffers"
(let (buffers) (let (buffers)

View File

@ -222,7 +222,7 @@ message extracted at some path.")
"Should we prefer html or text just this once? A symbol `text' "Should we prefer html or text just this once? A symbol `text'
or `html' or nil.") or `html' or nil.")
;;; UNNAMED Main ;;; Main
(defun mu4e-view-message-with-message-id (msgid) (defun mu4e-view-message-with-message-id (msgid)
"View message with message-id MSGID. This (re)creates a "View message with message-id MSGID. This (re)creates a
@ -1439,7 +1439,7 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )."
(icalendar-import-file path diary-file)) (icalendar-import-file path diary-file))
(t (mu4e-error "Unsupported action %S" what)))) (t (mu4e-error "Unsupported action %S" what))))
;;; UNNAMED Utilities ;;; View Utilities
(defun mu4e-view-mark-custom () (defun mu4e-view-mark-custom ()
"Run some custom mark function." "Run some custom mark function."