Commit graph

5693 commits

Author SHA1 Message Date
Spencer Baugh
d0bd9b39a3 ; completion-pcm-bug80914: Only look at the car of the list.
Avoids ordering issues.
2026-07-10 13:04:00 +01:00
Juri Linkov
0b30e299f5 Fix test breakage in files-tests
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Redefine 'read-key-sequence-vector' instead of 'read-key'
after recent changes in 'map-y-or-n-p' (bug#81168).
2026-07-07 18:39:32 +03:00
Sean Whitton
5d6a13136a server-tests/can-create-frames-p: Check for TERM=dumb-emacs-ansi
* test/lisp/server-tests.el (server-tests/can-create-frames-p):
Check for TERM=dumb-emacs-ansi.
2026-07-03 12:10:29 +01:00
Sean Whitton
a07abfc6bc ; * test/lisp/emacs-lisp/package-tests.el (lm-version): Declare. 2026-07-03 11:30:09 +01:00
Sean Whitton
c794719167 Disable failing SCCS tests on the release branch
These are broken and we don't have an SCCS expert to fix them at
present.  This shouldn't block the Emacs 31 release because SCCS
is a relatively obscure VCS.

* test/lisp/vc/vc-tests/vc-tests.el (vc-test-sccs05-rename-file)
(vc-test-sccs10-rename-directory): Mark as expected to fail.
Do not merge to master.
2026-07-03 10:55:53 +01:00
Dmitry Gutov
ba7c04d26c ; Fix double docstring in a test 2026-07-02 19:27:41 +03:00
Spencer Baugh
82009df4de Fix initials completion style after // in file name
* lisp/minibuffer.el (completion-initials-expand): Change the
heuristic to check for an empty previous field, not total string
length (bug#81241).
* test/lisp/minibuffer-tests.el (completion-initials): New test.
2026-07-02 10:39:56 +01:00
Spencer Baugh
6b31360a31 Fix c-pcm-try-completion with boundaries completion
PCM try-completion could behavior incorrectly with completion
tables using boundaries, such as file name completion.  It would
"grow" earlier path components as if point was at the end of
each path component (rather than at its true location), which
meant all path components would "grow" not only from the left
\(which is correct) but also from the right (which can only work
when point is there).

* lisp/minibuffer.el (completion-pcm--find-all-completions):
Drop the sub-pattern's trailing `point' (bug#80914).
* test/lisp/minibuffer-tests.el (completion-pcm-test-9): New
test.
2026-07-02 10:36:50 +01:00
Dmitry Gutov
5fde9732b4 Localize cache invalidation to project-try-vc
With other functions only using the cached values or populating
when necessary.

* lisp/progmodes/project.el: Update commentary (bug#81317).
(project--get-cached): Add explicit parameter TIMEOUT, use it.
(project-try-vc): Build its value from 'non-essential' and the
values of two timeout variables.  And pass them on.
(project-try-vc--search, project--vc-merge-submodules-p)
(project--value-in-dir): Also add TIMEOUT.
(project-files, vc-git-project-list-files)
(vc-hg-project-list-files, project-ignores, project-buffers)
(project-name, project-uniquify-dirname-transform): Remove the
binding of 'non-essential' as now redundant for cache duration.

* test/lisp/progmodes/project-tests.el (project-try-vc-uses-cache)
(project-try-vc-invalidates-cache)
(project-name-<vc>-reuses-cache)
(project-name-<vc>-obeys-cache-invalidation): New tests.
(project-vc-supports-project-in-different-dir)
(project-vc-ignores-in-external-directory): Use
'project--clear-cache' as the more reliable option.
2026-07-02 08:33:27 +03:00
Michael Albinus
bcb83d7d2a Fix error handling in Tramp delete-{file,directory}
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
* lisp/net/tramp.el (tramp-skeleton-delete-directory): Fail if
DIRECTORY is missing.
(tramp-skeleton-delete-file): Don't fail if DIRECTORY is missing.

* test/lisp/net/tramp-tests.el (tramp-test14-delete-directory):
Adapt test.
2026-07-01 17:01:12 +02:00
Richard Lawrence
e0185b0907 Fix ISO date insertion in diary
See Bug#81263.  Diary's 'iso' dates should use ISO8601 YYYY-MM-DD
format.  This change fixes the format used by `diary-insert-entry'.

* lisp/calendar/calendar.el (diary-iso-date-insertion-form): Use
YYYY-MM-DD format (not YYYY/M/D) when inserting ISO dates.
* test/lisp/calendar/diary-icalendar-resources/import-bug-11473.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-bug-22092.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-bug-33277.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-legacy-vars.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-multiple-vcalendars.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-non-recurring-1.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-non-recurring-all-day.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-non-recurring-another-example.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-non-recurring-folded-summary.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-non-recurring-long-summary.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-time-format-12hr-blank.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-with-attachment.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-with-timezone.diary-iso:
* test/lisp/calendar/diary-icalendar-resources/import-with-uid.diary-iso:
Update tests.
2026-06-27 12:48:00 +03:00
Michael Albinus
e486f2d975 Support tramp-rpc in filenotify-tests.el
* test/lisp/filenotify-tests.el (top, file-notify--test-monitor)
(file-notify-test03-events, file-notify-test12-unmount):
Handle also tramp-rpc.
2026-06-25 11:42:56 +02:00
Michael Albinus
25084664ba Sync with Tramp 2.8.2
* lisp/net/tramp-message.el (tramp-trace-add-package): New defun.

* lisp/net/tramp-smb.el (tramp-smb-maybe-open-connection):
Remove superfluous comment.

* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist):
Use `file-name-sans-extension'.
(tramp-completion-handle-expand-file-name):
Apply `tramp-drop-volume-letter' consequently.

* test/lisp/net/tramp-tests.el
(tramp--test-ignore-make-symbolic-link-error): Use `file-error'
instead of `remote-file-error'
(tramp--test-instrument-test-case-p): Fix doxstring.
(tramp-test10-write-region-other-file-name-handler)
(tramp-test49-external-backend-function): Adapt tests.
2026-06-22 14:17:18 +02:00
Sean Whitton
7be92efa5e Rename variable to macroexp-enable-preserve-posification
* lisp/emacs-lisp/macroexp.el
(macroexp-enable-pos-preservation): Rename ...
(macroexp-enable-preserve-posification): ... to this.  All uses
changes.
2026-06-22 10:45:27 +01:00
Eshel Yaron
2066a0c9e8 New variable 'macroexp-enable-pos-preservation' (bug#79599)
* lisp/emacs-lisp/macroexp.el
(macroexp-enable-pos-preservation): New variable.
(macroexp-preserve-posification): Respect it.
* lisp/emacs-lisp/elisp-scope.el (elisp-scope-1): Use it.
* test/lisp/emacs-lisp/macroexp-tests.el
(macroexp--test-macroexp-enable-pos-preservation): New test.
2026-06-22 10:44:18 +01:00
समीर सिंह Sameer Singh
c0a33a474d
Fix c-ts-mode bsd-style indentation of union bodies (bug#81255)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules): Add
"union_specifier" to the parent-is regexp.

* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: New test.
2026-06-19 19:10:30 -07:00
Stephen Berman
a94a33827b Avoid an unusual error when visiting a directory in Dired
* lisp/dired.el (dired-internal-noselect): Unset
'dired--ls-error-buffer' before calling 'dired-readin'.  This is a
safeguard to prevent an error when visiting a directory in Dired,
which apparently happens when the variable somehow gets set even
though 'ls' has not emitted an error message (bug#80499, Message #218).

* test/lisp/dired-tests.el (dired-test-set-dired--ls-error-buffer): New test.
2026-06-19 10:13:22 +02:00
Dmitry Gutov
b6e7962700 Fix "diff-apply-buffer applies to the wrong file"
* lisp/vc/diff-mode.el (diff-find-file-name): Inhibit the "drop
dir" behavior in diffs produced by Git and Hg (bug#81210).
Except for the virtual subdirectories like a/b/etc, which is
moved and happens for all such diffs.  Tighten the check for
such virtual directory names, though (characters are the chars
used by the configuration option 'diff.mnemonicPrefix').
(diff-setup-buffer-type): Recognize Hg diffs where only one
revision is specified, too.

* test/lisp/vc/diff-mode-tests.el
(diff-mode-test-setup-buffer-type)
(diff-mode-test-find-file-name-create): New tests.
2026-06-19 06:39:25 +03:00
Xiyue Deng
927a7fff5e
Restore public interfaces for accessing built-in package info
These functions were removed in ab36f58922
during the reorganization of package.el as part of Bug#80079.

Also add a simple test for these functions to avoid future regressions.

See also discussion at
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00149.html.

* lisp/emacs-lisp/package.el (package-versioned-builtin-packages,
package-builtin-package-version): Restore.
* lisp/emacs-lisp/package-activate.el: Remove lingering comments.
* test/lisp/emacs-lisp/package-tests.el
(package-test-builtin-package-info): Add.
2026-06-11 22:47:33 +02:00
Michael Albinus
fe45d875a4 ; Fix last Tramp change 2026-06-11 14:52:55 +02:00
Michael Albinus
f89ff62367 Extend Tramp external operations
* doc/misc/tramp.texi (New operations): Extend.

* lisp/net/tramp.el (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): Support ARG-TYPE `tramp-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test49-external-backend-function):
Extend test.
2026-06-10 15:45:31 +02:00
Sean Whitton
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Change
directory to DEF-DIR before calling into the backend.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-on-symlink): Test that the file has the right
state.
2026-06-10 13:36:52 +01:00
Eli Zaretskii
a21614d4d6 ; Skip one vc-dir test on MS-Windows
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-on-symlink): Skip in MS-Windows.
2026-06-09 16:50:48 +03:00
Sean Whitton
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-global-switches):
Declare.
(vc-tests-helpers): Require.
(vc-test--create-repo-function, vc-test--with-author-identity):
Move these from here ...
* test/lisp/vc/vc-tests/resources/vc-tests-helpers.el
(vc-test--create-repo-function, vc-test--with-author-identity):
... to here.
(vc-hg-global-switches):
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-hg-global-switches):
Declare.
(vc-dir, log-edit, vc-tests-helpers): Require.
(vc-test-vc-dir-on-symlink): Use vc-test--with-author-identity
and vc-test--create-repo-function.
2026-06-09 11:21:33 +01:00
Sean Whitton
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
* lisp/vc/vc-dir.el (vc-dir-resynch-file): Pass only truenames
to vc-dir-recompute-file-state.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-git): Require.
(vc-test-vc-dir-on-symlink): New test.
2026-06-08 15:29:12 +01:00
Juri Linkov
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-n-p'
This is necessary to correctly read keys like 'M-~'
used by 'save-some-buffers' that is two keys 'ESC ~'
on a tty.

* doc/lispref/minibuf.texi (Multiple Queries):
Index 'y-or-n-p-use-read-key' for 'map-y-or-n-p'.
Mention using a key sequence instead of single keys.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
In the 'y-or-n-p-use-read-key' cond-branch,
use 'read-key-sequence-vector' instead of 'read-key'.
In the default cond-branch, use 'this-command-keys-vector'
instead of 'last-command-event'.  In both cond-branches
use 'key-description' instead of 'single-key-description'
(bug#81168).
Instead of '(eq def nil)' check if chars are either nil
or an empty vector in noninteractive mode (bug#67836).

* test/lisp/emacs-lisp/map-ynp-tests.el (test-map-ynp-kmacro):
Test separately nil/non-nil 'y-or-n-p-use-read-key'.
(test-map-ynp-keys): New test for complete coverage of
'map-y-or-n-p'.
2026-06-07 21:56:47 +03:00
Sean Whitton
fd1b5cd890 ; * test/lisp/files-tests.el (w32-downcase-file-names): Declare. 2026-06-05 13:07:24 +01:00
Michael Albinus
fe1c02d849 Fix Tramp distrobox integration
* lisp/net/tramp.el (tramp-yesno-prompt-regexp): Fix docstring.
(tramp-yn-prompt-regexp): Fix docstring.  Extend.  Add :version.

* test/lisp/net/tramp-tests.el (tramp-test03-file-error): Adapt test.
2026-06-04 08:34:48 +02:00
F. Jason Park
05f89d711d Fix more missing faces on ERC margin strings
* lisp/erc/erc-goodies.el (keep-place-indicator): Add
`erc-keep-place-indicator-arrow' face to overlay arrow.
* lisp/erc/erc-stamp.el (erc-stamp--display-prompt-in-left-margin)
(erc--conceal-prompt): Add `erc-prompt-face' to entire `left-margin'
string.  See also 9ba65aa9 "Fix missing margin face on display prop in
erc-stamp".
* test/lisp/erc/erc-fill-tests.el (erc-fill--left-hand-stamps): Update
expected text properties on prompt.  (Bug#80693)
2026-06-01 23:09:55 -07:00
Juri Linkov
271cc5c76c More tests for fill-paragraph-handle-comment.erts
* test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts:
Add more tests for current comment lines (bug#80449).
2026-05-31 21:36:12 +03:00
Juri Linkov
2e70b88623 Fix fill-paragraph combining text with preceding comment
* lisp/textmodes/fill.el (fill-paragraph): Handle the case
when a non-comment line follows a comment line with
non-nil 'fill-paragraph-handle-comment' (bug#80449).
Skip such a comment line before filling a non-comment line.

* test/lisp/textmodes/fill-tests.el
(fill-test-fill-paragraph-handle-comment): Add new test.

* test/lisp/textmodes/fill-resources/fill-paragraph-handle-comment.erts:
New file.
2026-05-27 18:32:40 +03:00
Sean Whitton
dd42133315 vc-test--rename-file: Disable part of test for SCCS
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file):
Disable part of test for SCCS.
2026-05-23 16:53:36 +01:00
Richard Lawrence
70b79b3ed8 Rename `icalendar-recur' type and related functions
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 13:25:19 +03:00
Michael Albinus
3d2bb233f2 ; Minor Tramp changes
* 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-23 10:25:46 +02:00
F. Jason Park
9ba65aa965 Fix missing margin face on display prop in erc-stamp
* 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-18 15:07:34 -07:00
João Távora
6bd73af241 ; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EMBA testing 2026-05-18 17:22:30 +01:00
João Távora
36036e71c0 Jsonrpc: migrate more tests to Python subprocess fixtures
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-17 19:28:07 +01:00
Michael Albinus
d0d657fa90 ; Minor Tramp cleanup
* 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-14 12:31:04 +02:00
Michael Albinus
2e71d2c709 Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp
* 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-13 18:39:04 +02:00
Pip Cet
5323eebcff Test read-passwd behavior (bug#80838)
* 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-10 20:00:41 +00:00
Michael Albinus
eae96d9fcb Handle long environment variables in Tramp oricesses
* 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-06 16:06:50 +02:00
Michael Albinus
9c0a699c59 Adaot tramp-tests.el
* test/lisp/net/tramp-tests.el (ert-remote-temporary-file-directory):
Ensure that it is expanded.
2026-05-04 16:09:10 +02:00
João Távora
e24d9232e0 Jsonrpc: add new tests using Python subprocesses
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-05-04 13:32:37 +01:00
F. Jason Park
cf9728c4be Only perform erc-log-insert-log-on-open setup once
* 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-30 15:46:42 -07:00
F. Jason Park
ba2a150740 Restore erc-last-saved-position from previous session
* 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 15:46:38 -07:00
F. Jason Park
40b6f0180b ; Tweak some ERC tests and related utilities
* 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-30 15:46:29 -07:00
Paul Eggert
4fcc8a473a ; Spelling fixes. 2026-04-29 22:45:51 -07:00
Eli Zaretskii
7017fcc4c5 ; Add new test to files-tests
* test/lisp/files-tests.el
(files-tests-directory-files-recursively-w32): New test.
2026-04-29 18:04:48 +03:00
Eli Zaretskii
08a22b8965 ; Don't skip 'vc-test-src-version-diff' test
* test/lisp/vc/vc-tests/vc-tests.el (vc-test-src-version-diff):
Don't skip, it passes.
2026-04-27 15:47:57 +03:00
Eli Zaretskii
8d4c47c880 Fix vc-tests for SRC
* 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-27 15:41:27 +03:00