From 8f00d36b63dc6c57ad2fd4f387841e4ac9e68225 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 21 Jul 2025 09:54:02 +0100 Subject: [PATCH 1/7] (gnus)Scoring Tips: New tip regarding header continuation lines * doc/misc/gnus.texi (Scoring Tips): New "Continuation lines when scoring on other headers" tip. --- doc/misc/gnus.texi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 1eace0d5b5a..13b4a339987 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -21169,6 +21169,29 @@ You may also consider doing something similar with @code{expunge}. If you say stuff like @code{[^abcd]*}, you may get unexpected results. That will match newlines, which might lead to, well, The Unknown. Say @code{[^abcd\n]*} instead. + +@item Continuation lines when scoring on other headers +When scoring on other headers using the @code{Head} or @code{All} match +keys and regexp matching, your regular expression must take into account +header continuation lines. For example, this naive attempt to match +messages including a particular address in the @code{To} field: + +@lisp +("head" "^To: .*\\bspwhitton@@spwhitton\\.name\\b" r) +@end lisp + +will fail to match a message with a @code{To} header like this: + +@example +To: A long description of the Emacs devel list , + spwhitton@@spwhitton.name, 12345@@debbugs.gnu.org +@end example + +You can handle this issue with a regexp of this form: + +@lisp +("head" "^To: .*\\(?:\n[\s\t].*\\)*\\bspwhitton@@spwhitton\\.name\\b" r) +@end lisp @end table From cbfc095ed42be5fd2b848cb837b3340670fe9ef6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 21 Jul 2025 15:44:49 +0200 Subject: [PATCH 2/7] * etc/PROBLEMS: Describe how to work around screen reader TAB issue --- etc/PROBLEMS | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index e0d34090b1e..ca06ce98d04 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2678,6 +2678,18 @@ terminals, for example, like this: This disables 'auto-composition-mode' on frames that display on terminals of this type. +** Screen readers get confused about character position + +The Emacs display code sometimes emits TAB characters purely for motion +on the terminal, even when those characters do not exist in the buffer. +This can confuse screen reader software under certain terminal emulators +(rxvt and vte have been cited). Switching to destructive tabs by running + + stty -tabs + +in the terminal before starting Emacs may mitigate this. See also the +discussion in Bug#78474 . + * Runtime problems specific to individual Unix variants ** GNU/Linux From dd29b0ab66d63b3b8e890c8de8f8e5c3fb44217a Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 20 Jul 2025 21:17:05 -0700 Subject: [PATCH 3/7] Fix Eshell call to 'string-suffix-p' when checking for trailing newline * lisp/eshell/esh-io.el (eshell--output-maybe-n): Fix call. * test/lisp/eshell/esh-io-tests.el (esh-io-test/output-newline/add-newline) (esh-io-test/output-newline/no-newline) (esh-io-test/output-newline/no-extra-newline): New tests (bug#79063). --- lisp/eshell/esh-io.el | 2 +- test/lisp/eshell/esh-io-tests.el | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index ff275560a04..1b474d988a7 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -569,7 +569,7 @@ ends in a newline." (eshell-output-object object handle) (when (and eshell-ensure-newline-p (not (and (stringp object) - (string-suffix-p object "\n")))) + (string-suffix-p "\n" object)))) (eshell-maybe-output-newline handle))) (defsubst eshell-print-maybe-n (object) diff --git a/test/lisp/eshell/esh-io-tests.el b/test/lisp/eshell/esh-io-tests.el index 0b25ad812fa..e6bc5c9809c 100644 --- a/test/lisp/eshell/esh-io-tests.el +++ b/test/lisp/eshell/esh-io-tests.el @@ -41,6 +41,28 @@ ;;; Tests: + +;; Newlines + +(ert-deftest esh-io-test/output-newline/add-newline () + "Ensure we add a newline when writing a string to stdout." + (with-temp-eshell + (eshell-match-command-output "(concat \"hello\")" "\\`hello\n\\'"))) + +(ert-deftest esh-io-test/output-newline/no-newline () + "Ensure we don't add a newline when writing a string to a buffer." + (eshell-with-temp-buffer bufname "" + (with-temp-eshell + (eshell-match-command-output + (format "(concat \"hello\") > #<%s>" bufname) + "\\`\\'")) + (should (equal (buffer-string) "hello")))) + +(ert-deftest esh-io-test/output-newline/no-extra-newline () + "Ensure we don't add an extra newline when writing to stdout." + (with-temp-eshell + (eshell-match-command-output "(concat \"hello\n\")" "\\`hello\n\\'"))) + ;; Basic redirection From 47deb38f2143bd981a7d3f1988d5cae6a7d2c64c Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 25 Jul 2025 09:05:24 +0100 Subject: [PATCH 4/7] ; face-font-family-alternatives, fixed-pitch: Comments. --- lisp/faces.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index bbd6bf06d03..cd23358c350 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -95,9 +95,10 @@ a font height that isn't optimal." (internal-set-font-selection-order value))) -;; In the absence of Fontconfig support, Monospace and Sans Serif are -;; unavailable, and we fall back on the courier and helv families, -;; which are generally available. +;; We use Fontconfig if we have it. This list is an alternative +;; mechanism to fall back to in the absence of Fontconfig. +;; In that situation, Monospace and Sans Serif are unavailable, and we +;; turn to the courier and helv families, which are generally available. (defcustom face-font-family-alternatives (mapcar (lambda (arg) (mapcar 'purecopy arg)) '(("Monospace" "courier" "fixed") @@ -2468,6 +2469,10 @@ If you set `term-file-prefix' to nil, this function does nothing." "Basic underlined face." :group 'basic-faces) +;; Ideally, in Emacs's default look, we'd like the default and +;; fixed-pitch faces to use two different monospace typefaces so that +;; they're visually distinct. At present, that's achieved on MS-Windows +;; and macOS, but not on platforms that use Fontconfig. See bug#79083. (defface fixed-pitch '((t :family "Monospace")) "The basic fixed-pitch face." From 5f3cbd62b1cfc853987ef7a163d6dffe029cfa07 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 25 Jul 2025 15:25:40 +0300 Subject: [PATCH 5/7] ; * lisp/international/quail.el (quail-insert-kbd-layout): Commentary. --- lisp/international/quail.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index c7340fbdcac..120e98a465a 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -836,6 +836,8 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (format "\t%c\t" upper)) (string upper)))) (insert (bidi-string-mark-left-to-right lower) + ;; This invisible space is here to prevent the display + ;; engine from composing these two characters on display. (propertize " " 'invisible t) (bidi-string-mark-left-to-right upper)) (if (< (string-width upper) 2) From e4908623f2351fe00332fba461b779c9a41a70a1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 26 Jul 2025 11:36:16 +0300 Subject: [PATCH 6/7] ; Fix documentation of 'other-window' * doc/lispref/windows.texi (Cyclic Window Ordering): * lisp/window.el (other-window): Document ALL-FRAMES in interactive invocations. --- doc/lispref/windows.texi | 4 +++- lisp/window.el | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index f076a6148a7..b4692b98090 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2088,7 +2088,9 @@ argument. The optional argument @var{all-frames} has the same meaning as in @code{next-window}, like a @code{nil} @var{minibuf} argument to -@code{next-window}. +@code{next-window}. When called interactively, @var{all-frames} is +always @code{nil}, so only windows on the selected frame can be +selected. This function does not select a window that has a non-@code{nil} @code{no-other-window} window parameter (@pxref{Window Parameters}), diff --git a/lisp/window.el b/lisp/window.el index 6eaa983f4c7..5debf6ef119 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -3973,7 +3973,8 @@ window parameter is non-nil. This function uses `next-window' for finding the window to select. The argument ALL-FRAMES has the same meaning as in `next-window', but the MINIBUF argument of `next-window' is -always effectively nil." +always effectively nil. Interactively, ALL-FRAMES is always +nil, which considers all windows on the selected frame." (interactive "p\ni\np") (let* ((window (selected-window)) (original-window window) From a44e9139c2ff5c07de4cd0f6caa923673c5e1f8b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 26 Jul 2025 10:22:09 +0100 Subject: [PATCH 7/7] loaddefs-generate--rubric: Note about committing ldefs-boot.el * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Note that ldefs-boot.el should be committed on its own. --- lisp/emacs-lisp/loaddefs-gen.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 0f136df1fe2..ef692d132b9 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -546,7 +546,7 @@ If COMPILE, don't include a \"don't compile\" cookie." file 'loaddefs-generate :title (concat "automatically extracted " (or type "autoloads")) :commentary (and (string-match "/lisp/loaddefs\\.el\\'" file) - "This file will be copied to ldefs-boot.el and checked in periodically.")) + "This file will be copied to ldefs-boot.el and checked in periodically. Note: When checking in ldefs-boot.el, don't include changes to any other files in the commit.")) (when lp (insert "(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))\n\n"))