summaryrefslogtreecommitdiff
path: root/test/lisp
AgeCommit message (Collapse)Author
2026-05-28dbus-call-method-asynchronously supports also an ERROR-HANDLERmasterMichael Albinus
* doc/misc/dbus.texi (Asynchronous Methods): HANDLER can also be (HANDLER . ERROR-HANDLER). * etc/NEWS: Mention ERROR-HANDLER of dbus-call-method-asynchronously. * lisp/net/dbus.el (dbus-call-method-asynchronously): Adapt docstring. (dbus-check-event, dbus-handle-event): HANDLER can also be (HANDLER . ERROR-HANDLER). * src/dbusbind.c (Fdbus_message_internal): HANDLER can also be (HANDLER . ERROR-HANDLER). (Bug#80952) * test/lisp/net/dbus-tests.el (dbus--test-method-another-handler) (dbus--test-method-error-handler): New defvars. (dbus--test-method-another-handler) (dbus--test-method-error-handler): New functions. (dbus-test04-call-method-error-handler): New test. (dbus-test10-keep-fd): Extend test.
2026-05-26Pixel-direct alignment in visual-wrap-prefix-mode (bug#81039)Andrea Alberti
`visual-wrap--content-prefix' previously returned a column count computed as (max (string-width prefix) (ceiling (string-pixel-width prefix) avg-space-width)) with two problems: * `string-width' ignores `buffer-invisibility-spec', so an invisible prefix (hidden ATX markers under `markdown-ts-hide-markup', for example) still reserved its character count on line 1 via a `min-width' display property, shifting the visible heading right. * With variable-pitch fonts, rounding the prefix width up to whole columns added visible padding whenever the natural width did not fall on an exact column boundary. Return the prefix's natural pixel width via `string-pixel-width' instead, which accounts for any display transformation applied to the prefix (invisibility, `display' replacements, text scaling, proportional fonts). Drop the `min-width' property from `visual-wrap--apply-to-line' so line 1 renders at its natural width. Switch the continuation `wrap-prefix' to a mixed-unit `:align-to' sum form: (space :align-to (+ (PIX) (EXTRA-INDENT . width))) where PIX is the prefix's pixel width and EXTRA-INDENT is `visual-wrap-extra-indent' in canonical character widths. The display engine resolves each term per the active frame and sums them, so no Lisp-level unit conversion is needed. Since `min-width' is no longer installed, the accumulation cycle that commit 81a5beb8af0 (bug#73882) worked around cannot recur. Drop the `min-width' strip from `visual-wrap--content-prefix' and the `min-width' removal from `visual-wrap--remove-properties'. Keep `min-width' in `visual-wrap--safe-display-specs' so that lines where other modes install it are not skipped. * lisp/visual-wrap.el (visual-wrap--content-prefix): Return pixel width instead of column count; drop the `min-width' strip. (visual-wrap--apply-to-line): Drop `min-width' on line 1; use mixed-unit `:align-to' sum form for the continuation wrap-prefix. (visual-wrap--adjust-prefix): Handle only string prefixes; the numeric (pixel) case is now handled inline in `--apply-to-line' via the mixed-unit `:align-to' sum form. (visual-wrap--remove-properties): Drop `min-width' removal. (visual-wrap--safe-display-specs): Add note about `min-width'. * test/lisp/visual-wrap-tests.el: Update expected `wrap-prefix' values to the new sum form. (visual-wrap-tests/invisible-prefix): New test motivated by bug#81039. (visual-wrap-tests/negative-extra-indent): New test; verify that a large negative `visual-wrap-extra-indent' produces a valid wrap-prefix (the display engine clamps the stretch to zero). * test/manual/visual-wrap-test.el: New file. Manual test suite for visual-eyeball verification of prefix alignment behavior. Reported-by: Andrea Alberti <a.alberti82@gmail.com> Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
2026-05-25;cperl-mode.el: Fix fontification edge casesHarald Jörg
These were reported by happy-barney on GitHub https://github.com/HaraldJoerg/cperl-mode/issues * lisp/progmodes/cperl-mode.el (cperl-init-faces): Don't mistake $method as a method declaration. Move matcher for "use require" higher to prevent "require" being fontified as keyword. * test/lisp/progmodes/cperl-mode-resources/sub-names.pl: Add a test case for $method * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-declarations): Add a test case for a module name looking like a keyword (cperl-test-fontify-sub-names): Verify that $method does not declare a method
2026-05-23Merge from origin/emacs-31Sean Whitton
4f13f52a3aa * build-aux/git-hooks/commit-msg: Replace Markdown-style ... dd42133315b vc-test--rename-file: Disable part of test for SCCS eb653865c3a markdown-ts-mode: Don't enable unconditionally by default # Conflicts: # etc/NEWS
2026-05-23vc-test--rename-file: Disable part of test for SCCSSean Whitton
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file): Disable part of test for SCCS.
2026-05-23Merge from origin/emacs-31Eli Zaretskii
7a17f97baa7 Prettify special glyphs f13287fde0d Revert "sh-script: Mark + and * as punctuation rather tha... 70b79b3ed8d Rename `icalendar-recur' type and related functions 3d2bb233f27 ; Minor Tramp changes f6281d757d3 ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'. 142b1e0d4c3 Fix Lisp injection via X-Draft-From in Gnus d6f7b2d99bd Save/restore old_buffer slot via window configurations (B... e0fbecaf658 Adapt ert-remote-temporary-file-directory settings 3de7f0ce5e5 Fix warning message in 'markdown-ts-mode--initialize' 7df8604ea63 ; Improve documentation of lazy-highlight in search and r... 2936b36164d Fix "assertion 'GTK_IS_WINDOW (window)' failed" 98348a0bdc9 [Xt] Fix child frame resizing glitch 13b29eebc16 Eglot: use standard face for completion annotations (bug#... # Conflicts: # etc/NEWS
2026-05-23Rename `icalendar-recur' type and related functionsRichard Lawrence
More context in Bug#80786 and: https://lists.gnu.org/archive/html/emacs-orgmode/2026-03/msg00286.html `icalendar-recur' as a type name for RRULE values was confusing and made the accessors for this type difficult to discover, because `icalendar-recur-' is also used as a prefix in icalendar-recur.el. This change renames the `icalendar-recur' type to `icalendar-rrule-value' and renames the accessor functions for these values appropriately. * lisp/calendar/icalendar-parser.el: Rename symbols as follows: (icalendar-recur): `icalendar-rrule-value' (icalendar-read-recur-rule-part): `icalendar-read-rrule-part' (icalendar-print-recur-rule-part): `icalendar-print-rrule-part' (icalendar-recur-rule-part): `icalendar-rrule-part' (icalendar-read-recur): `icalendar-read-rrule-value' (icalendar-print-recur): `icalendar-print-rrule-value' (icalendar--recur-value-types): `icalendar--rrule-value-types' (icalendar-recur-value-p): `icalendar-rrule-value-p' (icalendar-recur-freq): `icalendar-rrule-freq' (icalendar-recur-interval-size): `icalendar-rrule-interval-size' (icalendar-recur-until): `icalendar-rrule-until' (icalendar-recur-count): `icalendar-rrule-count' (icalendar-recur-weekstart): `icalendar-rrule-weekstart' (icalendar-recur-by*): `icalendar-rrule-by*'. (icalendar-rrule): (icalendar-index-insert): (icalendar-index-get): Update references. * lisp/calendar/icalendar-recur.el (icalendar-recur-find-interval): (icalendar-recur-nth-interval): (icalendar-recur-next-interval): (icalendar-recur-previous-interval): (icalendar-recur-refine-from-clauses): (icalendar-recur-recurrences-in-interval): (icalendar-recur-recurrences-in-window): (icalendar-recur-recurrences-to-count): (icalendar-recur-tz-observance-on): Update references. * lisp/calendar/diary-icalendar.el: Update references. * lisp/calendar/icalendar-shortdoc.el (icalendar): Update shortdoc examples. * lisp/gnus/gnus-icalendar.el: Update references. * test/lisp/calendar/diary-icalendar-tests.el: * test/lisp/calendar/icalendar-parser-tests.el: * test/lisp/calendar/icalendar-recur-tests.el: Update references in tests.
2026-05-23; Minor Tramp changesMichael Albinus
* doc/misc/tramp.texi (Frequently Asked Questions): google-drive has been disabled in GNOME 50. * lisp/net/tramp-cmds.el (tramp-enable-method): Upcase prompt. * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) (tramp-sh-handle-process-file): Improve setting of environment variables. * test/lisp/net/tramp-tests.el (tramp-methods) <mock>: Add `tramp-tmpdir'. Adapt `tramp-login-program'. (ert-remote-temporary-file-directory): Improve expansion. (tramp-test35-remote-path): Adapt test.
2026-05-21Merge from origin/emacs-31João Távora
655302cc212 Fix 'shr-outline-search' (bug#81073) 1754015c603 Improve auth-source-backend-parse 8f31ccbf823 Eglot: announce markdown support for completion docs aad170d1edf markdown-ts-mode: hide fence lines in view-mode (bug#81081) 133d1d591cb markdown-ts-mode: align default face definitions with mar... e0aeee2dc5f Fix markdown-ts-mode atx_heading face computation (bug#81... 997fc2cef77 Allow markdown-ts--run-command-in-code-block to ignore ou... 7d84e69a349 hideshow: Menu entry for 'hs-toggle-all' e90cafc2886 ; * doc/lispref/display.texi (Displaying Faces): Mention ... 520c5b7c71b ; * doc/lispref/text.texi (Special Properties): Fix last ... 8095fbef772 doc/lispref/text.texi: Add complement to commit f4a1c006569f 9436d92c5da Eglot: fix eglot--format-makrup when MARKUP just a string 9ba65aa9656 Fix missing margin face on display prop in erc-stamp
2026-05-20Detect some API violations in combine-change-calls (bug#80877)Pip Cet
Quickly verify that the number of unchanged characters before and after the region that changes are supposed to be limited to doesn't change. Suggested by Stefan Monnier. * lisp/subr.el (combine-change-calls-1): Copy BEG into a marker, and count the characters after the changed region. After the changes, ensure the character counts still match. * test/lisp/subr-tests.el (subr-test-combine-change-calls-error): New.
2026-05-18Fix missing margin face on display prop in erc-stampF. Jason Park
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Explicitly add face to right-hand stamp's `display' margin string. Commit d24b10ca "Introduce 'margin' face for window margin background" did away with the "fall-through" behavior in which a margin spec's string that lacks its own face property inherited whatever the associated `display' char happened to have. (Bug#80693) ;; The old language in "(elisp) Display Margins" said "if the ;; string to be displayed in the margin doesn't specify a face, its ;; face is determined using the same rules and priorities as it is ;; for strings displayed in the text area (see Displaying Faces)," ;; and that "if this results in undesirable 'leaking' of faces into ;; the margin, make sure the string has an explicit face specified ;; for it." It seems ERC and likely more than a few other packages ;; never came to heed this guidance and have erroneously depended ;; on such behavior for years if not decades. ;; ;; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: ;; * test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: ;; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: ;; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update ;; snapshot.
2026-05-18Merge from origin/emacs-31Sean Whitton
28a13b01c7d vc-refresh-state: Override default-directory for backend ... 389874c533b Eglot: unbreak for treesit-less builds 10e91e096d8 Get selected item in newsticker list view 6bd73af2413 ; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EM... eb90c528f38 ; * lisp/progmodes/eglot.el (eglot-code-action-indication... 1d7d6ffedbc ; * etc/PROBLEMS: Fix entries about display of Emoji on T... 6c1829bf4c5 Eglot: fix thinko in recent markdown-related commit (bug#... 36036e71c0c Jsonrpc: migrate more tests to Python subprocess fixtures 0977d5915d1 Eglot: add left-fringe code action indicator (bug#80326) b7825c3a271 Fix auth-source-backends-parse d89054627c4 Fix updates of embedded formulas by 'calc-embedded-update... 1832a93547b ; * src/fns.c (Fequal): Doc fix. f68e7a0a411 ; Improve documentation of commands that move by compilat...
2026-05-18; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EMBA testingJoão Távora
2026-05-17Jsonrpc: migrate more tests to Python subprocess fixturesJoão Távora
All tests now use 'jsonrpc--with-python-fixture' with a Python3 subprocess instead of the in-Emacs TCP server. Changed the "harakiri" method to be a request instead of a notification for to reduce chance of "Sentinel hasn't run" warning. The two in-Emacs-RPC-specific error tests ('errors-with--32601' and 'signals-an--32603-JSONRPC-error') are dropped with the fixture itself, as the error paths they exercise are internal to the Emacs Lisp dispatcher and have no direct Python equivalent. They will have to be re-done later on in other form. * test/lisp/jsonrpc-resources/server-emacsrpc.py: New file. * test/lisp/jsonrpc-resources/server-anxious-nested.py: Use new harakiri. * test/lisp/jsonrpc-resources/server-emacsrpc.py: Use new harakiri. * test/lisp/jsonrpc-resources/server-harakiri.py: Use new harakiri. * test/lisp/jsonrpc-resources/server-remote-during-sync-1.py: Use new harakiri. * test/lisp/jsonrpc-resources/server-remote-during-sync-2.py: Use new harakiri. * test/lisp/jsonrpc-resources/server-remote-error.py: Use new harakiri. * test/lisp/jsonrpc-resources/common.py (harakiri): New definition. * test/lisp/jsonrpc-tests.el (jsonrpc--with-python-fixture): Rework, move up. (jsonrpc-connection-ready-p): Move up. (jsonrpc--call-with-emacsrpc-fixture) (jsonrpc--with-emacsrpc-fixture) (errors-with--32601) (signals-an--32603-JSONRPC-error): Remove. (returns-3, times-out, doesnt-time-out, stretching-it-but-works) (deferred-action-toolate, deferred-action-intime) (deferred-action-complex-tests): Migrate to Python fixture. (scontrol-remote-during-sync-1, scontrol-remote-during-sync-2) (scontrol-anxious-nested, scontrol-remote-error) (shutdown-clean-after-notification): Tweak.
2026-05-16Merge from origin/emacs-31Eli Zaretskii
cf96e9cb5a5 ; Fix byte-compilation warnings in non-Tree-Sitter builds 23575adc7be ; * doc/lispref/variables.texi (Local Variables): Fix typ... 8b6fb2f6465 ; * doc/lispref/variables.texi (Local Variables): Fix 'na... d3c72b83890 ; * src/xdisp.c (display_line): Fix commentary (bug#80693). a981517b72e Fill margins with 'margin' face on truncated screen lines 8e374990357 ; * doc/lispref/os.texi (Init File): Fix markup (bug#81049). f4c326c378a ; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's... bf89ee6d078 ; * etc/PROBLEMS: Cursor not shown on Windows with system... 20500d62006 ; htmlfontify: Handle 'reset' face attribute value (bug#8... d0d657fa902 ; Minor Tramp cleanup 93ea0d7d289 ; Improve documentation of VC commands in Dired 318084829c5 Eglot: adjust reference to completion frontends in manual 2a166c2dbdb Eldoc: display documentation in visual-line-mode aba60ad0c5b Eglot: prefer markdown-ts-view-mode for markup rendering ... 689c3bd5088 Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027) 71809ee5df5 Fix 'markdown-ts-code-span' face (bug#81026) 286833e401d Add read-only 'markdown-ts-view-mode' (bug#81023) b39c123490b Fix strikethrough in 'markdown-ts-mode' (bug#80991) 0be998d4bc0 Fix code-span in headings in 'markdown-ts-mode' (bug#80979) a00beb3a31b Make 'markdown-ts-inline-images' buffer local and test fo... a0c05029fd1 * etc/NEWS: Mention new user option tramp-propagate-emacs... 2e71d2c709f Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp ff96db93f23 keyboard-tests.el: Try and fix the failure on EMBA ce3098752cf doc: Remove long obsolete references to `package-initialize` 9bc04b001ac vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES 13039e3442b ; touch-up last commit: copyright and comments c2a24dcec8b ; update msys2 build helper for Emacs 31 & UCRT 3630baae720 hideshow: Support new 'margin' face for margin indicators... 20d17df3f4f Use the new 'margin' face in Flymake (bug#80693) 07f2bbc905d vc-dir-resynch-file: Pass down non-truename'd FILE
2026-05-16Merge from origin/emacs-31Eli Zaretskii
7eab6ef3cee Fix 'sgml-parse-tag-backward' to handle tags in comments 09dc864b0b8 Fix eww-submit for forms with no action (bug#80918) 0e7a24d9313 * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set... f12b01582db Fix Completions buffer disappearing with tmm-menubar (bug... 519fd832111 Fix secrets.el when Emacs is a flatpak 9e4ea934f23 Fix 'prepare-user-lisp' to follow symlinks e613e38021e Update "timeout" to 2.1.6 196fd80689e [GTK3, HiDPI] Fix width/height round-trip through Configu... acc07f1a030 [GTK3] On Expose, repaint the border before the content 5323eebcffc Test read-passwd behavior (bug#80838) 01c5990dd06 Fix nested read-passwd calls (bug#80838) 027043df257 ; * lisp/gnus/message.el (message-server-alist): Doc fix ... 3b608b233ed Fix terminal emulation of "ESC [ K" sequence 6a605c65a83 Fix vertical-motion across overlay strings with embedded ... e4d529c67b6 ; Fix last change d54faa0f1bf Mark gnus-dbus.el as obsolete 9bf2a19bb21 Move gnus-dbus.el to obsolete/gnus-dbus.el 984024daf3c Gnus: Use new sleep library d7c130972e0 ; * lisp/term/pgtk-win.el (icon-map-list): Fix :type. 5579893ed7c ; Don't block/unblock input in text_extents methods 547b1ee7b6d Fix Rmail behavior wrt globalized minor modes 6ba05106f4e Fix display images in the display margins 56f27dd9f06 Eglot: fix eglot--sig-info with non-UTF-32 positionEncoding 543d8a7a9d7 [NS] Fix deprecated variable (bug#80985) # Conflicts: # etc/NEWS
2026-05-14; Minor Tramp cleanupMichael Albinus
* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Do not expand remote file names w/o a localname. * test/lisp/net/tramp-tests.el (tramp--test-supports-environment-variables-p): New defun. (tramp-test33-environment-variables): Use it.
2026-05-13Propagate EMACSCLIENT_TRAMP to remote hosts with TrampMichael Albinus
* doc/misc/tramp.texi (Remote processes): Explain `tramp-propagate-emacsclient-tramp'. * lisp/net/tramp.el (tramp-remote-process-environment): Adapt docstring. (tramp-propagate-emacsclient-tramp): New defcustom. (tramp-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process) (tramp-sh-handle-process-file): Use it. * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): Adapt test.
2026-05-12Preserve order of local ERC modules for activationF. Jason Park
* etc/ERC-NEWS: Add new section for ERC 5.7. * lisp/erc/erc.el (erc--update-modules): Reverse returned list. * test/lisp/erc/erc-tests.el (erc--update-modules/local): Update.
2026-05-12Improve source NUH handling in ERCF. Jason Park
* lisp/erc/erc.el (erc--user-nuh-message-types): New variable. (erc--shuffle-nuh-nickward, erc--interpret-nuh): Replace former with latter, whose behavior is easier to predict. * test/lisp/erc/erc-tests.el (erc--interpret-nuh): New test.
2026-05-12Improve isolation of some ERC test environmentsF. Jason Park
* lisp/erc/erc.el (erc--lwarn): During tests where the variable `erc--warnings-buffer-name' is non-nil, don't display the Warnings buffer, and inhibit messages for the benefit of batch runs. * test/lisp/erc/erc-tests.el (erc--modify-local-map): Protect various hooks from module-setup code. * test/lisp/erc/resources/erc-tests-common.el (erc-tests-common-equal-with-props): Act more like `equal-including-properties' in accepting arbitrary objects rather than just strings. (erc-tests-common-with-global-modules): New macro. (erc-tests-common-frozen-options): New variable. (erc-tests-common-with-frozen-options): New macro. (erc-tests-common-make-server-buf): Accept a buffer for the NAME arg. (erc-tests-common-assert-get-inserted-msg-readonly-with): Instead of shadowing, use macro to protect calling environment from effects of activating global module.
2026-05-12; Remove some forward declarations from ERC testsF. Jason Park
* lisp/erc/erc.el (erc--insert-before-markers-transplanting-hidden): Don't deliberately return anything because the return value is undefined. The only existing call site, in `erc-insert-line', invokes the function indirectly via `erc--insert-line-function' and discards the result. * test/lisp/erc/erc-scenarios-join-display-context.el: Require `erc-join'. * test/lisp/erc/erc-scenarios-log.el: Remove forward declarations and require `erc-stamp'. * test/lisp/erc/erc-scenarios-match.el: Require `erc-match'. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-kill-server-track): Suppress unwanted newline in test output. * test/lisp/erc/erc-scenarios-sasl.el (erc-scenarios-sasl--plain-fail): Don't redundantly bind `erc--warnings-buffer-name' or create a buffer for it. Use literal value assigned by test fixture instead. * test/lisp/erc/erc-scenarios-services-misc.el: Require `erc-services'. * test/lisp/erc/erc-tests.el (erc-handle-irc-url): Remove redundant `save-excursion'. (erc-tests--modules): Reflow into single column for easier management of divergent WIP patch sets. This should help minimize manual surgery when applying them atop one another. * test/lisp/erc/resources/erc-scenarios-common.el: Remove unused `require's and forward declarations from top of file. (erc-scenarios-common--make-bindings): Remove the non-existent `erc-auth-source-parameters-join-function' and add `erc--warnings-buffer-name'. The latter's buffer, if created, will be killed automatically when the test body exits. (erc-scenarios-common-with-cleanup): Generate locally scoped defvars to be used in a manner similar to `dlet' for user options yet to be loaded. (erc-scenarios-common--assert-date-stamps): Don't run when `erc-stamp' isn't loaded.
2026-05-12Fix file-name-non-special implementation of get-file-bufferMichael Albinus
* lisp/files.el (file-name-non-special): Fix `get-file-buffer'. (Bug#80718) * test/lisp/files-tests.el (files-tests-file-name-non-special--temp-file-prefixes): Extend list. (w32-downcase-file-names): Declare. (files-tests-file-name-non-special-get-file-buffer): Adapt test.
2026-05-10Test read-passwd behavior (bug#80838)Pip Cet
* test/lisp/auth-source-tests.el (auth-source-test--displayed-string): (auth-source-test-read-passwd): (auth-source-test-read-passwd-revealed): (auth-source-test-read-passwd-nested): New.
2026-05-06Handle long environment variables in Tramp oricessesMichael Albinus
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Handle loooong environment variables. (Bug#80783) * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): Adapt test.
2026-05-04Adaot tramp-tests.elMichael Albinus
* test/lisp/net/tramp-tests.el (ert-remote-temporary-file-directory): Ensure that it is expanded.
2026-05-04Jsonrpc: add new tests using Python subprocessesJoão Távora
Most of these tests are for the scontrol/"anxious continuation" mechanism (bug#80623) The new ERT tests use Python subprocesses via stdin/stdout pipe as JSONRPC endpoints. A shared framing library lives in jsonrpc-resources/common.py. * test/lisp/jsonrpc-tests.el (jsonrpc--test-dir): New constant. (jsonrpc--with-python-fixture): New macro. (scontrol-remote-during-sync-1) (scontrol-remote-during-sync-2) (scontrol-anxious-nested) (scontrol-remote-error) (shutdown-clean-after-notification): New tests. * test/lisp/jsonrpc-resources/common.py: New file. * test/lisp/jsonrpc-resources/server-remote-during-sync-1.py: New file. * test/lisp/jsonrpc-resources/server-remote-during-sync-2.py: New file. * test/lisp/jsonrpc-resources/server-anxious-nested.py: New file. * test/lisp/jsonrpc-resources/server-remote-error.py: New file. * test/lisp/jsonrpc-resources/server-harakiri.py: New file.
2026-04-30Only perform erc-log-insert-log-on-open setup onceF. Jason Park
* etc/ERC-NEWS: Add entry for option `erc-log-insert-log-on-open'. Mention deprecation of `erc-log-setup-logging'. * lisp/erc/erc-log.el (erc-log-insert-log-on-open): Expand type from boolean to choice of boolean, predicate, and new function item `erc-log-new-target-buffer-p'. (erc-log-mode, erc-log-enable, erc-log-disable): Replace `erc-log-setup-logging' on `erc-connect-pre-hook' with `erc-log--insert-log-on-open' at depth 80. Replace calls to `erc-log-setup-logging' with ones to `erc-log--setup'. (erc-log-new-target-buffer-p): New function. While the name could perhaps do more to indicate that it's only useful when called from `erc-open', that's the only place ERC typically sets up new target buffers. (erc-log-setup-logging): Deprecate and replace body with adapter that calls `erc-log--setup' and `erc-log--insert-log-on-open'. (erc-log--setup): New function whose body is mostly from the "nondestructive" portion of `erc-log-setup-logging'. Instead of moving the `erc-saved-last-position' marker to the old value, expect it not to have been initialized by `erc-initialize-log-marker' because `erc-connect-pre-hook' now runs after this code, which is now incorporated more judiciously into the module's "enable body". (erc-log--insert-log-on-open): New function whose body is mostly from the "destructive" portion of the previous incarnation of `erc-log-setup-logging'. Unlike the original, if option `erc-log-insert-log-on-open' is a function, call it to decide whether to insert a log file atop its buffer. Also, don't advance the marker `erc-last-saved-position' to the prompt area, where it can get stuck and prevent logs from being saved when `erc-log-insert-log-on-open' is non-nil. Thanks to Libera user Lionyx for reporting the bug, which has been around since at least ERC 5.4 and Emacs 28.1. (erc-log-disable-logging): Remove `erc-save-buffer-in-logs' from `write-file-functions' to undo its buffer-local addition in what is now `erc--log-setup'. * test/lisp/erc/erc-scenarios-log-options.el: New file. (Bug#79665)
2026-04-30Restore erc-last-saved-position from previous sessionF. Jason Park
* lisp/erc/erc-log.el (erc-log-setup-logging): Restore `erc-last-saved-position' from previous session. By default, a non-/QUIT disconnect does not write out any remaining buffer text to logs, instead leaving it until the buffer or Emacs is killed. But if a successful reconnect occurs beforehand, the uncommitted portion must be seen to somehow. Before this change, it would be lost because the function `erc-initialize-log-marker' remakes the marker at the prompt instead of recovering the previous value as now done here. Moreover, the traditional workaround of customizing `erc-log-write-after-insert' and `erc-log-write-after-send' to t should not be required to prevent gaps in any decent IRC client. * test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--reconnect): New function. (erc-scenarios-log--reconnect/auto, erc-scenarios-log--reconnect/manual): New tests. ;; * test/lisp/erc/resources/join/reconnect/foonet-again.eld: Add QUIT.
2026-04-30; Tweak some ERC tests and related utilitiesF. Jason Park
* test/lisp/erc/erc-scenarios-keep-place-indicator.el (erc-scenarios-keep-place-indicator--follow): Intersperse more `redisplay' calls to update the indicator's overlay. * test/lisp/erc/erc-tests.el (erc-tests--assert-printed-in-subprocess): Wrap CODE form in keyword sentinel. (erc--find-mode, erc--essential-hook-ordering): Use modified interface. (erc--find-group--real, erc--find-group/realistic): Rename former to latter and run in subprocess. (erc--update-modules/realistic): Redo to run in subprocess instead of mocking. * test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-kill-related-buffers): Don't bother canceling `erc-server-flood-timer', even in an actual ERC buffer, since `erc-server-send-queue' first checks whether its BUFFER argument is still live before sending anything to the process. Also, don't bother collecting buffers only to immediately kill them. * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--filter): Always clear remainder. Otherwise, partial emissions from the peer that aren't terminated by a newline will confuse subsequent processing. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--run-in-term): Look for a library called `erc-tests-compat', which ERC uses in its external CI to provide compatibility shims of definitions too obscure or unfit for inclusion in the Compat package on ELPA. * test/lisp/erc/resources/erc-tests-common.el (erc-tests-common-kill-buffers): Also kill non-`erc-mode' buffers whose names match a scheme used by ERC for work buffers. Allow for the EXTRA-BUFFERS argument to possibly contain killed and null buffers.
2026-04-29; Spelling fixes.Paul Eggert
2026-04-29; Add new test to files-testsEli Zaretskii
* test/lisp/files-tests.el (files-tests-directory-files-recursively-w32): New test.
2026-04-27; Don't skip 'vc-test-src-version-diff' testEli Zaretskii
* test/lisp/vc/vc-tests/vc-tests.el (vc-test-src-version-diff): Don't skip, it passes.
2026-04-27Fix vc-tests for SRCEli Zaretskii
* lisp/vc/vc-src.el (vc-src-register): Support "registering" directories in FILES. (vc-src-rename-file): Fix implementation and support renaming directories. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file) (vc-test-src-version-diff): Skip parts that don't work with SRC. (Bug#80862)
2026-04-27Add lexical-binding cookies to multi-file-0.2.3.tarPhilip Kaludercic
* test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar: Update multi-file.el and multi-file-sub.el files.
2026-04-26(register--get-method-type): Fix one more case (bug#80894)Stefan Monnier
* lisp/register.el (register--get-method-type): Refine the cl-generic hack yet a but further. * test/lisp/register-tests.el (register--jumpable-p): Fix the test.
2026-04-26Fix renaming files and directories under RCSEli Zaretskii
* lisp/vc/vc-rcs.el (vc-rcs-register): Filter out directories from FILES. (vc-rcs-rename-file): Support OLD being a directory. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file) (vc-test--rename-directory): Re-enable these tests for RCS. (vc-test--rename-directory): Disable 'yes-or-no-p' questions that RCS asks when it needs to create the RCS/ subdirectory: this lets the test run without user interaction.
2026-04-26; Add more register testsEli Zaretskii
* test/lisp/register-tests.el (register--jumpable-p): Add tests for more register types. (Bug#80894)
2026-04-25register.el: Allow jumping to kmacros again (bug#80894)Stefan Monnier
* lisp/register.el (register--get-method-type): Fix handling for OClosure args. * test/lisp/register-tests.el (register--jumpable-p): New test.
2026-04-25Some minor Tramp fixesMichael Albinus
* doc/misc/tramp.texi (Customizing Methods): Add comment. * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Comment out setting `command-line-max-length', it doesn't work reliably. * test/lisp/net/tramp-tests.el (tramp-test03-file-error) (tramp-test26-file-name-completion-boundaries): Adapt tests.
2026-04-23vc-hg-after-dir-status: Rewrite to handle current 'hg status' outputSean Whitton
* lisp/vc/vc-hg.el (vc-hg-after-dir-status): Rewrite to handle renames where the "R" line comes arbitrarily later in the output. * test/lisp/vc/vc-hg-tests.el (vc-hg-test--after-dir-status-expect): New function. (vc-hg-after-dir-status): New test.
2026-04-22; Adjust package tests for 789e98e54fePhilip Kaludercic
* test/lisp/emacs-lisp/package-tests.el (package-test-get-deps): Replace test with an analogous test for 'package--dependencies'.
2026-04-22Test that ERT creates a list of executed tests from erts filesRoi Martin
* test/lisp/emacs-lisp/ert-resources/erts-file-test-list-fail.erts: * test/lisp/emacs-lisp/ert-resources/erts-file-test-list.erts: New erts files. * test/lisp/emacs-lisp/ert-tests.el (ert-test-list-of-erts-file-tests): New test.
2026-04-22; Fix files-tests on MS-WindowsEli Zaretskii
* test/lisp/files-tests.el (files-tests-file-name-non-special--temp-file-prefixes): Don't use a file name with '*' on MS-Windows.
2026-04-21Improve files-tests.el for quoted file namesMichael Albinus
* test/lisp/files-tests.el (files-tests-file-name-non-special--temp-file-prefixes): New defconst. (files-tests-file-name-non-special--subprocess) (files-tests-file-name-non-special--buffers): Loop over it. (files-tests--with-temp-non-special) (files-tests--with-temp-non-special-and-file-name-handler): Simplify. (files-tests-file-name-non-special-make-symbolic-link): Pacify compiler warning.
2026-04-17Restrict Dired handling of newlines in file namesStephen Berman
* lisp/dired.el (dired--ls-accept-b-switch-p): New function. (dired-internal-noselect): Use it in the condition on displaying warning about filenames with newlines. (dired--set-auto-toggle-b-switch): Use it to conditionalize calling 'dired--toggle-b-switch'. (dired-auto-toggle-b-switch, dired--toggle-b-switch): Improve doc string. * test/lisp/dired-tests.el (dired-test-filename-with-newline-1) (dired-test-filename-with-newline-2): Skip unless Dired uses an 'ls' that supports the '-b' switch. * etc/NEWS: Adjust accordingly the announcements of the Dired warning and the new user option for file names with newlines.
2026-04-17Extend integration of external operations in TrampMichael Albinus
* doc/misc/tramp.texi (Extension packages): Use another format char in example. (New operations): Document different argument types. Extend example. * lisp/net/tramp.el: Use consequently `eq', `assq', `memq'. (tramp-file-name-for-operation-external): Extend docstring. (tramp-file-name-for-operation): Make more use of `tramp-file-name-for-operation-external'. (tramp-add-external-operation): New optional argument `arg-type'. * test/lisp/net/tramp-tests.el (tramp--handle-test-operation): Rename from `tramp--handler-for-test-operation'. (tramp--handle-process-id) (tramp--test-operation-file-name-for-operation): New defuns. (tramp-test49-external-backend-function): Extend test.
2026-04-16vc-rename-file: Fix skipping calling into the backendSean Whitton
* lisp/vc/vc.el (vc-rename-file): Replace broken attempted use of vc-dir-status-files with walking OLD using vc-file-tree-walk. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-directory): Assert that the files are registered or not as appropriate. New test case in which there are only registered files.
2026-04-16ert-play-keys functionVincent Belaïche
* lisp/emacs-lisp/ert-x.el (ert-play-keys): new defun. * test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo) (undo-test-point-after-forward-kill): Use new function `ert-play-keys' and `(ert-with-test-buffer (:selected t) ...)' rather (with-temp-buffer (switch-to-buffer (current-buffer) ...)'. * test/lisp/erc/erc-scenarios-spelling.el (erc-scenarios-spelling--auto-correct): Use new function `ert-play-keys' and `(ert-with-buffer-selected ...)' rather than `execute-kbd-macro' and `(with-current-buffer ... (set-window-buffer nil (current-buffer) ...)'. * doc/misc/ert.texi (Helper Functions): Document ert-play-keys, and differences between ert-simulate-command, ert-simulate-keys & ert-play-keys. * test/lisp/emacs-lisp/ert-x-tests.el (ert-x-tests-play-keys) (ert-x-tests-simulate-command, ert-x-tests-simulate-keys): New tests.
2026-04-15Make | optional for 'gnu' regexp in compilation-mode (bug#80681)Toby Dylan Hocking
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Make leading '|' optional when there are leading spaces (bug#80681). * etc/compilation.txt (GNU style): New error with two leading spaces. * test/lisp/progmodes/compile-tests.el (compile-test-error-regexps): Increment expected compilation-num-errors-found. (compile-tests--test-regexps-data): New error test case for 'gnu' with two leading spaces. Change expected match for 'cucumber' to match again 'gnu'. Copyright-paperwork-exempt: yes