update packages and add valign

This commit is contained in:
2026-04-05 20:00:27 +02:00
parent b062fb98e3
commit 03fb00e374
640 changed files with 109768 additions and 39311 deletions

View File

@@ -0,0 +1,79 @@
;;; autoloads-gen.el --- help generate autoloads -*- lexical-binding: t -*-
;;
;; Copyright (C) 2024 Pengji Zhang
;;
;; This file is part of Notmuch.
;;
;; Notmuch is free software: you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Notmuch is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with Notmuch. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Helpers for generating a `notmuch-autoloads.el' file.
;;
;; This file is written specifically for the Notmuch project. Some
;; design choices here perhaps only make sense for Notmuch.
;;
;; An alternative way is to directly call `package-generate-autoloads'
;; on our source directory. It was not chosen because we could not
;; easily exclude files. Besides, that function is for packages, so
;; using it on a non-package directory feels a bit hacky.
;;; Code:
(require 'seq) ; `seq-uniq', `seq-difference' (both in Emacs >= 25)
(defvar generated-autoload-file)
(defvar autoload-excludes) ; from obsolete autoloads.el
(defun autoloads-gen-batch ()
"Generate autoloads on the command line.
First argument is the output file, and the rest are source files."
(let ((output-file (car command-line-args-left))
(sources (cdr command-line-args-left)))
(setq command-line-args-left nil)
(autoloads-gen (expand-file-name output-file)
(mapcar #'expand-file-name sources))))
(defun autoloads-gen (output-file sources)
"Generate autoloads for SOURCES and write them to OUTPUT-FILE.
All filenames should be absolute.
Note that this function always generate OUTPUT-FILE anew, instead
of just updating added or changed autoloads."
;; Here we always generate a new file to avoid potential troubles
;; when switching Emacs versions, and also to update the timestamp
;; of the output file reliably.
(let* ((dirs (seq-uniq (mapcar #'file-name-directory sources)))
(excludes (mapcan (lambda (dir)
(seq-difference (directory-files dir t)
sources))
dirs)))
;; NOTE: The generated file does not contain the additional
;; expression to modify `load-path', as is done by `package.el',
;; because it is tedious to do for Emacs <= 29. Besides, this file
;; is intended to be installed to some directory that is already
;; in `load-path'.
(if (fboundp 'loaddefs-generate)
(loaddefs-generate dirs output-file excludes nil nil t)
;; In Emacs >= 29, we have the new `loaddefs-gen' library, used
;; above, and that superseded the now obsolete `autoload'
;; library, used below.
(when (file-exists-p output-file)
(delete-file output-file))
(let ((generated-autoload-file output-file)
(autoload-excludes excludes)
(backup-inhibited t))
(mapc #'update-directory-autoloads dirs)))))
;;; autoloads-gen.el ends here

View File

@@ -438,7 +438,7 @@ supported for \"Customized queries section\" items."
(setq search (string-trim search))
(let ((history-delete-duplicates t))
(add-to-history 'notmuch-search-history search)))
(notmuch-search search notmuch-search-oldest-first)))
(notmuch-search search notmuch-search-oldest-first notmuch-search-hide-excluded)))
(defun notmuch-hello-add-saved-search (widget &rest _event)
(let ((search (widget-value (widget-get widget :parent)))

View File

@@ -318,6 +318,29 @@ Typically this is added to `notmuch-mua-send-hook'."
(when message-signature-insert-empty-line
(forward-line -1))
(goto-char (point-max))))
;; If `message-cite-reply-position' is the symbol 'above, then
;; before inserting the citation, put the point after the
;; signature and insert a newline for spacing. This emulates
;; the Gmail-style of email replies, where the signature and
;; email reply body are above the email citation. If
;; `message-cite-style'is non-nil and specifies a value for
;; `message-cite-reply-position', then use that value instead.
;;
;; Regarding the use of `cadadr' instead of `cdr' on the result
;; of `assoc' below: the value stored in `message-cite-style' is
;; itself a quoted form, e.g., (quote above). Using `cdr' once
;; returns that entire quoted form. Using `cadadr' skips the
;; `quote' symbol and returns the underlying symbol
;; (e.g. `above'). (We do this to avoid a call to `eval'
;; because of security concerns.)
(when (eq (or (cadadr (assoc 'message-cite-reply-position
(if (symbolp message-cite-style)
(symbol-value message-cite-style)
message-cite-style)))
message-cite-reply-position)
'above)
(goto-char (point-max))
(insert "\n"))
(let ((from (plist-get original-headers :From))
(date (plist-get original-headers :Date))
(start (point)))
@@ -420,7 +443,7 @@ instead of `message-mode' and SWITCH-FUNCTION is mandatory."
(lambda (mail) (and (not (funcall nr mail)) mail))
(lambda (mail) (and (not (string-match-p nr mail)) mail)))))
(dolist (header '("To" "Cc"))
(when-let ((v (message-fetch-field header)))
(when-let* ((v (message-fetch-field header)))
(let* ((tokens (mapcar #'string-trim (message-tokenize-header v)))
(good-tokens (delq nil (mapcar nr-filter tokens)))
(addr (and good-tokens (mapconcat #'identity good-tokens ", "))))

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "notmuch" "20250620.1557"
(define-package "notmuch" "20260314.2247"
"Run notmuch within emacs."
()
:url "https://notmuchmail.org"
:commit "63665f1ebd6eff7753b7798add657fd6dbd110d6"
:revdesc "63665f1ebd6e")
:commit "094744b3f6f5c6831b6555d1fe75709abf1d1279"
:revdesc "094744b3f6f5")

View File

@@ -683,7 +683,7 @@ message at DEPTH in the current thread."
;; alternative (even if we can't render it).
(push (list content-id msg part) notmuch-show--cids)))
;; Recurse on sub-parts
(when-let ((type (plist-get part :content-type)))
(when-let* ((type (plist-get part :content-type)))
(pcase-let ((`(,type ,subtype)
(split-string (downcase type) "/")))
(cond ((equal type "multipart")
@@ -702,7 +702,7 @@ This will only find parts from messages that have been inserted
into the current buffer. CID must be a raw content ID, without
enclosing angle brackets, a cid: prefix, or URL encoding. This
will return nil if the CID is unknown or cannot be retrieved."
(when-let ((descriptor (cdr (assoc cid notmuch-show--cids))))
(when-let* ((descriptor (cdr (assoc cid notmuch-show--cids))))
(pcase-let ((`(,msg ,part) descriptor))
;; Request caching for this content, as some messages
;; reference the same cid: part many times (hundreds!).
@@ -1057,7 +1057,7 @@ will return nil if the CID is unknown or cannot be retrieved."
(defun notmuch-show-mime-type (part)
"Return the correct mime-type to use for PART."
(when-let ((content-type (plist-get part :content-type)))
(when-let* ((content-type (plist-get part :content-type)))
(setq content-type (downcase content-type))
(or (and (string= content-type "application/octet-stream")
(notmuch-show-get-mime-type-of-application/octet-stream part))
@@ -1400,15 +1400,17 @@ function is used.
Returns the buffer containing the messages, or NIL if no messages
matched."
(interactive "sNotmuch show: \nP")
(let ((buffer-name (generate-new-buffer-name
(or buffer-name
(concat "*notmuch-" thread-id "*"))))
(mm-inline-override-types (notmuch--inline-override-types)))
(let* ((buffer-name (generate-new-buffer-name
(or buffer-name
(concat "*notmuch-" thread-id "*"))))
(buffer (get-buffer-create buffer-name))
(mm-inline-override-types (notmuch--inline-override-types)))
(pop-to-buffer-same-window (get-buffer-create buffer-name))
(with-current-buffer buffer
(notmuch-show-mode))
(pop-to-buffer-same-window buffer)
;; No need to track undo information for this buffer.
(setq buffer-undo-list t)
(notmuch-show-mode)
;; Set various buffer local variables to their appropriate initial
;; state. Do this after enabling `notmuch-show-mode' so that they
;; aren't wiped out.
@@ -1945,7 +1947,7 @@ user decision and we should not override it."
(concat header-line-format
(propertize
" [some mark read tag changes may have failed]"
'face font-lock-warning-face)))))))))
'face 'font-lock-warning-face)))))))))
(defun notmuch-show-filter-thread (query)
"Filter or LIMIT the current thread based on a new query string.

View File

@@ -1308,7 +1308,7 @@ search results and that are also tagged with the given TAG."
notmuch-tree-basic-query)))
(let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto)))
(notmuch-tree-close-message-window)
(notmuch-tree (concat notmuch-tree-basic-query " and tag:" tag)
(notmuch-tree (format "(%s) and tag:%s" notmuch-tree-basic-query tag)
notmuch-tree-query-context
nil
nil

View File

@@ -18,8 +18,8 @@
;; along with Notmuch. If not, see <https://www.gnu.org/licenses/>.
;;
;; Authors: Carl Worth <cworth@cworth.org>
;; Package-Version: 20250620.1557
;; Package-Revision: 63665f1ebd6e
;; Package-Version: 20260314.2247
;; Package-Revision: 094744b3f6f5
;; Homepage: https://notmuchmail.org
;;; Commentary:
@@ -1194,7 +1194,7 @@ search results and that are also tagged with the given TAG."
(interactive
(list (notmuch-select-tag-with-completion "Filter by tag: "
notmuch-search-query-string)))
(notmuch-search (concat notmuch-search-query-string " and tag:" tag)
(notmuch-search (format "(%s) and tag:%s" notmuch-search-query-string tag)
notmuch-search-oldest-first
notmuch-search-hide-excluded))