aboutsummaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ensure navigating by paragraphs in Eshell stops at prompts and paragraphsJim Porter2024-06-201-1/+48
| | | | | | | | | | | | | | | The previous implementation in 6ae2b74ed20 only stopped at prompts, which isn't the right behavior (bug#61545). * lisp/eshell/em-prompt.el (eshell-forward-paragraph) (eshell-backward-paragraph): Reimplement to handle prompts and paragraphs (the latter by calling the original 'forward-paragraph'). * test/lisp/eshell/em-prompt-tests.el (em-prompt-test/next-previous-prompt/multiline): Rename. (em-prompt-test/forward-backward-paragraph-1): New function. (em-prompt-test/forward-backward-paragraph) (em-prompt-test/forward-backward-paragraph/multiline): New tests.
* Merge remote-tracking branch 'origin/feature/which-key-in-core'Philip Kaludercic2024-06-181-0/+267
|\
| * Merge remote-tracking branch 'github-which-key/master'Philip Kaludercic2024-06-151-0/+267
| |
* | Fix Eshell "which" test on MS-WindowsJim Porter2024-06-152-8/+11
| | | | | | | | | | | | | | | | | | * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/which/plain/external-program): Compare the file name case-insensitively on case-insensitive file systems. * test/lisp/eshell/eshell-tests-helpers.el (eshell-command-result--equal): Revert to the previous implementation.
* | Fix em-extpipe-tests on MS-WindowsEli Zaretskii2024-06-151-1/+5
| | | | | | | | | | * test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-14): Fix test on MS-Windows (bug#71446).
* | ; Improve last changeJim Porter2024-06-151-3/+10
| | | | | | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline): Fix check of exit message and ensure we have only one prompt.
* | ; Add command logging to some more Eshell testsJim Porter2024-06-151-20/+22
| | | | | | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline) (esh-proc-test/kill-pipeline-head): Write debug logs on failure.
* | Allow escape sequences in Python promptskobarity2024-06-151-0/+28
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-prompt-detect): Use Python's json package if available, and remove escape sequences in prompts. * test/lisp/progmodes/python-tests.el (python-tests-interpreter-2-6-higher-p): New predicate function. (python-shell-prompt-detect-7): New test. (Bug#71440)
* | ; Minor editorial fixes to some Eshell testsJim Porter2024-06-131-10/+10
| | | | | | | | | | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-process/redirect-message): Move next to its sibling tests. (esh-proc-test/remote/remote-path): Rename from 'esh-var-test/...'.
* | ;cperl-mode.el: Avoid false positives when parsing new Perl syntaxHarald Jörg2024-06-132-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/cperl-mode.el (cperl--package-for-imenu-rx) (cperl--class-for-imenu-rx): avoid false positives when collecting imenu entries * lisp/progmodes/cperl-mode.el (cperl-init-faces): avoid false positives when detecting package names * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-imenu-index): Add test verifying that $class_false is not shown as a class _false * test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add a line containing a false positive "$class_false"
* | Fix recently added eshell testStefan Kangas2024-06-101-7/+8
| | | | | | | | | | * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/empty-background-command): Fix failing test.
* | Fix treesit-testsEli Zaretskii2024-06-101-1/+2
| | | | | | | | | | * test/src/treesit-tests.el (treesit-node-api): Adapt the test to changes in 'treesit_check_node'. (Bug#71012)
* | ; Fix recent change to python-tests.elkobarity2024-06-101-1/+1
| | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-tests--pythonstartup-file): Use already bound 'python-shell-interpreter'. (Bug#70815)
* | Extend auto-revert-test07-auto-revert-several-buffersMichael Albinus2024-06-101-11/+38
| | | | | | | | | | | | | | * test/lisp/autorevert-tests.el (auto-revert-test05-global-notify): Make cleanup robust. (auto-revert-test07-auto-revert-several-buffers): Extend test. (Bug#71424)
* | cperl-mode.el: Update for the current Perl version 5.040Harald Jörg2024-06-104-4/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce new features of cperl-mode. * lisp/progmodes/cperl-mode.el (cperl-menu): Add toggle for extra paired delimiters. (defconst): new rx expressions `cperl--sub-name-generated-rx' and `cperl--field-declaration-rx' (cperl--imenu-entries-rx): Use the new expressions (cperl--extra-paired-delimiters): New variable holding the paired delimiters for Perl 5.36 and newer (cperl-imenu-sub-keywords): Add autogenerated methods to imenu (cperl-init-faces): Add the __CLASS__ token, builtin constants, and attributes for field declarations. (cperl-short-docs): Add __CLASS__ to one-line docs. (cperl-extra-paired-delimiters-mode): new minor mode to handle non-ASCII paired delimiters. * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-builtin-constants): new test. (cperl-test-fontify-class): New test clauses for attributes. (cperl-test-field-declaration-rx): new test. (cperl-test-autogenerated-reader-rx): new unit test for the rx expression. (cperl-test-extra-delimiters): new test. (cperl-test-imenu-index): new clauses for imenu capture of autogenerated methods. * test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add examples for Perl 5.40 syntax. * test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl: New resource for non-ASCII paired delimiters.
* | Improve correctness of 'eshell-quote-argument'Jim Porter2024-06-093-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-arg.el (eshell-quote-argument): Mention that this function is for use within Eshell buffers. (eshell-quote-backslash): Properly quote newlines. * lisp/eshell/em-unix.el (eshell/cat, eshell/du): Throw 'eshell-external' instead; that's what it's here for. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test-quote-argument): Remove. (esh-proc-test/emacs-command): * test/lisp/eshell/esh-var-tests.el (esh-var-test/path-var/set) (esh-var-test/path-var/set-locally): Use 'eshell-quote-argument'. * test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive): Use 'shell-quote-argument' (Note: *not* 'eshell-...').
* | Remove empty Eshell commands when parsingJim Porter2024-06-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the logic for copying/stealing handles when constructing the command form: now, we should always steal the handles for the last real command, even if there were some trailing semicolons. * lisp/eshell/esh-arg.el (eshell-parse-delimiter): Be stricter about parsing so that things like "& &" aren't parsed as a single "&&" token. * lisp/eshell/esh-cmd.el (eshell-parse-command): Get the commands in reverse, and remove any nil commands. (eshell-split-commands): Always return the trailing terms (except when there were no terms to begin with). * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/empty-background-command): New test.
* | ; Allow batch-file Eshell test on MS-WindowsEli Zaretskii2024-06-091-1/+0
| | | | | | | | | | * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file): Don't skip on MS-Windows, as the test was fixed.
* | ; Add another test for 'eshell-batch-script'Jim Porter2024-06-091-0/+12
| | | | | | | | | | | | | | | | * lisp/eshell/em-script.el (eshell-close-target): New function. * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file): New test; rename old one to... (em-script-test/batch-file/shebang): ... this.
* | Specify Python 3 in some ERTs on Mackobarity2024-06-091-308/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-tests-with-temp-buffer-with-shell): Remove setting 'python-shell-interpreter'. (python-tests-shell-interpreter): Removed. (python-tests-shell-interpreters): New variable. (python-tests-with-shell-interpreter) (python-tests-with-temp-buffer-with-shell-interpreter): New macros. (python-tests-get-shell-interpreter): Add an optional PRED argument to allow ERts to specify Python interpreter version. (python-tests--get-interpreter-info): New function. (python-tests-interpreter-3-p): New function to be used as the PRED argument of 'python-tests-get-shell-interpreter'. (python-shell-make-comint-1) (python-shell-make-comint-2) (python-shell-make-comint-4) (python-shell-get-process-1) (python-shell-internal-get-or-create-process-1) (python-shell-prompt-detect-1) (python-shell-prompt-detect-2) (python-shell-prompt-detect-3) (python-shell-prompt-detect-4) (python-shell-prompt-detect-5) (python-shell-prompt-detect-6) (python-shell-prompt-set-calculated-regexps-6) (python-shell-completion-at-point-jedi-completer) (python-completion-at-point-pdb-1) (python-completion-at-point-while-running-1) (python-ffap-module-path-1) (python-ffap-module-path-while-running-1) (python-eldoc--get-doc-at-point-1) (python-eldoc--get-doc-at-point-while-running-1) (python-tests--run-python-selects-window) (python-test--shell-send-block): Use the new macro. (python-shell-completion-at-point-ipython): Remove setting 'python-tests-shell-interpreter'. (python-shell-completion-at-point-1) (python-completion-at-point-1) (python-completion-at-point-2) (python-completion-at-point-native-1) (python-completion-at-point-native-2) (python-completion-at-point-native-with-ffap-1) (python-completion-at-point-native-with-eldoc-1): Use the new macro and specify Python 3 on Mac to avoid errors. (Bug#70815)
* | Fix hiding a Python block ending with a commentkobarity2024-06-091-0/+18
| | | | | | | | | | | | | | * lisp/progmodes/python.el (python-hideshow-forward-sexp-function): Move point to the end of the line. * test/lisp/progmodes/python-tests.el (python-hideshow-hide-block-2): New test. (Bug#71170)
* | A better fix for esh-proc-tests on MS-WindowsEli Zaretskii2024-06-091-14/+10
| | | | | | | | | | | | | | | | * test/lisp/eshell/esh-proc-tests.el (esh-proc-test-quote-argument): New function. (esh-proc-test/emacs-command): Use it instead of 'shell-quote-argument', which allows to go back to system-independent code.
* | Fix Eshell tests on MS-WindowsEli Zaretskii2024-06-096-14/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/esh-util.el (eshell-get-path): Don't add "." if it is already there. * test/lisp/eshell/esh-var-tests.el (esh-var-test/path-var/preserve-across-hosts): Skip on MS-Windows. (esh-var-test/path-var/set, esh-var-test/path-var/set-locally): Quote the PATH value, for MS-Windows. * test/lisp/eshell/esh-util-tests.el (esh-util-test/path/get): No need to add ".": it is already done by 'eshell-get-path'. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline): Accept empty string as valid output. (esh-proc-test/sigpipe-exits-process): Skip on MS-Windows: no SIGPIPE. (esh-proc-test/emacs-command): Quote correctly for MS-Windows. * test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive): Fix test on MS-Windows. * test/lisp/eshell/em-script-tests.el (em-script-test/batch-file): Skip on MS-Windows. * test/lisp/eshell/eshell-tests-helpers.el (eshell-command-result--equal): Compare strings (file names) case-insensitively on MS-Windows.
* | (find-auto-coding): Provide filename to `auto-coding-functions`Stefan Monnier2024-06-092-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow `auto-coding-functions` to know the file name. Motivated by the needs of Editorconfig support. * lisp/international/mule.el (auto-coding-file-name): New var. (find-auto-coding): Let-bind it for `auto-coding-functions`. Document the expectation that the arg be an absolute file name. * doc/lispref/nonascii.texi (Default Coding Systems): Mention `auto-coding-file-name`. * test/lisp/international/mule-util-resources/test.utf-16le: New file. * test/lisp/international/mule-tests.el (mule-tests--dir): New var. (mule-tests--auto-coding): New fun. (mule-tests--auto-coding-functions): New test.
* | Add typescript-ts-mode indentation for multi-assignment declsNoah Peart2024-06-091-0/+31
| | | | | | | | | | | | | | | | * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Add indentation rules for lexical and variable declarations with multiple assignments. * test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add indent test for variable declarations (bug#68054).
* | (pcase--app-subst-match): Try and fix performance regression (bug#71398)Stefan Monnier2024-06-081-1/+8
| | | | | | | | | | | | | | * lisp/emacs-lisp/pcase.el (pcase--app-subst-match): Optimize matches against (quote VAL). * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization): Add new test case.
* | Improve implementations of some Eshell output filter functionsJim Porter2024-06-081-0/+62
| | | | | | | | | | | | | | | | | | * lisp/eshell/esh-mode.el (eshell-postoutput-scroll-to-bottom): Use 'get-buffer-window-list' for simplicity. (eshell-handle-control-codes): Use 're-search-forward'; this way is much faster. * test/lisp/eshell/esh-mode-tests.el: New file.
* | Be more efficient when buffering output in EshellJim Porter2024-06-081-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the built-in 'eshell/cat' 5-10x faster on large files in my (somewhat limited) tests. In addition, this change periodically redisplays when using the Eshell buffered output so that users can see some progress. * lisp/eshell/esh-io.el (eshell-print-queue-size, eshell-print-queue, eshell-print-queue-count): Make obsolete in favor of... (eshell-buffered-print-size, eshell--buffered-print-queue) (eshell--buffered-print-current-size): ... these. (eshell-buffered-print-redisplay-throttle): New user option. (eshell--buffered-print-next-redisplay): New variable. (eshell-init-print-buffer): Make obsolete. (eshell-flush): Add new REDISPLAY-NOW argument in favor of CLEAR (which only 'eshell-init-print-buffer' should have used). (eshell-buffered-print): Compare queued output length to 'eshell--buffered-print-current-size'. (eshell-with-buffered-print): New macro. * lisp/eshell/esh-var.el (eshell/env): * lisp/eshell/em-dirs.el (eshell/cd): * lisp/eshell/em-hist.el (eshell/history): * lisp/eshell/em-unix.el (eshell/cat): * lisp/eshell/em-ls.el (eshell/ls): Use 'eshell-with-buffered-print'. (flush-func): Remove. (eshell-ls--insert-directory, eshell-do-ls): Remove 'flush-func'. * test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive) (em-unix-test/compile/pipeline, em-unix-test/compile/subcommand): Fix indentation. (em-unix-test/cat/file-output): New test. * etc/NEWS: Announce these improvements.
* | Restore deferred date-stamp insertions in ERCF. Jason Park2024-06-081-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Treat `erc-stamp--deferred-date-stamp' as a permanent-local variable. (erc-stamp--date): Document expected possible values for `fn' slot. (erc-stamp--defer-date-insertion-on-post-modify): Use the function `ignore' to mean a new `erc-timer-hook' member has been requested. Use nil to mean one has already run. Deferred date stamps are new in ERC 5.6 and Emacs 30. (erc-stamp--date-mode): Improve doc string. * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--date-mode/reconnect): New test.
* | Fix Python mode error caused by incorrect indentationkobarity2024-06-081-0/+9
| | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent--calculate-indentation): Guard against negative indentation. (Bug #65870) * test/lisp/progmodes/python-tests.el (python-indent-badly-indented-block-end): New test.
* | Add 'sqlite-execute-batch' commandJavier Olaechea2024-06-061-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This command is similar to 'sqlite-execute' except that it executes multiple statements in exchange for not accepting any arguments. (Bug#70145) * src/sqlite.c (Fsqlite_execute_batch): New function. * test/src/sqlite-tests.el (sqlite-multiple-statements): Add smoke test for 'sqlite-execute-batch'. * etc/NEWS: Mention new command 'sqlite-execute-batch'. * doc/lispref/text.texi (Database): Document the new command.
* | Don't recurse in erc-server-delayed-check-reconnectF. Jason Park2024-06-057-32/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-backend.el (erc-server-delayed-check-reconnect): Run `reschedule' function on a timer to avoid growing the stack when calling `delete-process'. * lisp/erc/erc-common.el (erc--favor-changed-reverted-modules-state): Fix `pcase' condition so that changing an option to its standard value does not earn a "STANDARD" label in Customize if that value differs from the saved one. * lisp/erc/erc.el (erc-open-socks-tls-stream): Reword doc string. * test/lisp/erc/erc-tests.el (erc--with-dependent-type-match) (erc--with-dependent-type-match): Remove useless tests (bug#71178). * test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld: Await phantom EOFs and PINGs to somewhat account for a race that can result in a failure when running the suite in parallel with -jN. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--print-trace): Set `debug-on-error' to t so that errors in timers always trigger test failures. ;; * test/lisp/erc/resources/base/assoc/reconplay/foonet.eld: ;; Timeouts. ;; * test/lisp/erc/resources/base/upstream-reconnect/soju-barnet.eld: ;; Timeouts. ;; * test/lisp/erc/resources/base/mask-target-routing/foonet.eld: ;; Timeouts. ;; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeout.
* | Spelling fixesPaul Eggert2024-06-042-3/+3
|/
* pcase.el (\`): Try and handle large patterns betterStefan Monnier2024-06-031-1/+11
| | | | | | | | | | | | | | | | | | | | | Large backquote patterns tend to lead to very large and deeply nested expansions, but they also tend to contain a lot of "constant" subpatterns that can be compiled to quote patterns. This patch does just that. See discussion at https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html * lisp/emacs-lisp/pcase.el (pcase--split-pred): Improve the handling of pred-vs-quote so it also works with quoted objects like cons cells, vectors, and strings. Simplify the `pcase--mutually-exclusive-p` branch accordingly. (pcase--expand-\`): New function, extracted from the \` pcase macro. Make it recurse internally, and optimize backquote patterns to `quote` patterns where possible. (\`): Use it. * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests that were broken by a more naïve version of the optimization. (pcase-tests-quote-optimization): New test.
* Skip unmature file notification testsMichael Albinus2024-06-031-0/+3
| | | | | * test/lisp/filenotify-tests.el (file-notify--deftest-remote): Skip with "gio" library. It is unmature.
* Add new keyboard macro counter functions (bug#61549)Alex Bochannek2024-06-021-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Advanced keyboard macro counter commands for register integration and conditional macro termination * lisp/kmacro.el (kmacro-keymap) (kmacro-reg-load-counter, kmacro-reg-save-counter) (kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less) (kmacro-reg-add-counter-greater, kmacro-reg-add-counter) (kmacro-quit-counter-equal, kmacro-quit-counter-less) (kmacro-quit-counter-greater, kmacro-quit-counter): Add advanced keyboard macro counter commands to kmacro keymap. Implement advanced keyboard macro counter commands. * test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load) (kmacro-tests-test-reg-save) (kmacro-tests-test-reg-add-counter-equal-01) (kmacro-tests-test-reg-add-counter-equal-02) (kmacro-tests-test-reg-add-counter-equal-03) (kmacro-tests-test-reg-add-counter-equal-04) (kmacro-tests-test-reg-add-counter-less) (kmacro-tests-test-reg-add-counter-greater) (kmacro-tests-test-quit-counter-equal-01) (kmacro-tests-test-quit-counter-equal-02) (kmacro-tests-test-quit-counter-equal-03) (kmacro-tests-test-quit-counter-equal-04) (kmacro-tests-test-quit-counter-less) (kmacro-tests-test-quit-counter-greater): Implement unit tests for advanced keyboard macro counter commands. * etc/NEWS: Document advanced keyboard macro counter commands.
* Add font-locking for variables in go-ts-mode range clauses (bug#71209)Noah Peart2024-06-012-0/+10
| | | | | | | | | * lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings): Add font-locking rule for variable names in range clauses. * test/lisp/progmodes/go-ts-mode-tests.el (go-ts-test-font-lock): Add font-locking test for go-ts-mode. * test/lisp/progmodes/go-ts-mode-resources/font-lock.go: New file for go-ts-mode font-locking tests.
* Merge from origin/emacs-29Eli Zaretskii2024-06-012-3/+3
|\ | | | | | | | | bf50aa38f9d Improve documentation of case-conversion commands 225b426f256 ; Fix typos
| * ; Fix typosStefan Kangas2024-05-272-3/+3
| |
* | Make Eshell's "which" command extensibleJim Porter2024-05-292-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 'eshell-named-command-hook' already makes execution of commands extensible, "which" should be too. This makes sure that "which" returns the right result for quoted commands like "/:cat". * lisp/eshell/em-alias.el (eshell-aliases-file): Allow it to be nil. (eshell-read-aliases-list, eshell-write-aliases-list): Check if 'eshell-aliases-file' is nil. (eshell-maybe-replace-by-alias--which): New function... (eshell-maybe-replace-by-alias): ... use it. * lisp/eshell/esh-cmd.el (eshell-named-command-hook): Update docstring. (eshell/which): Make extensible. (eshell--find-plain-lisp-command, eshell-plain-command--which): New functions. (eshell-plain-command): Use 'eshell--find-plain-lisp-command'. * lisp/eshell/esh-ext.el (eshell-explicit-command--which): New function... (eshell-explicit-command): ... unise it. (eshell-quoted-file-command--which): New function... (eshell-quoted-file-command): ... use it. (eshell-external-command--which): New function. * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/which/plain/eshell-builtin) (esh-cmd-test/which/plain/external-program) (esh-cmd-test/which/plain/not-found, esh-cmd-test/which/alias) (esh-cmd-test/which/explicit, esh-cmd-test/which/explicit/not-found) (esh-cmd-test/which/quoted-file) (esh-cmd-test/which/quoted-file/not-found): New tests. * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings): Don't load or save aliases. (eshell-command-result--match,eshell-command-result--match-explainer) (eshell-command-result-match): New functions.
* | Fix calling Eshell scripts outside of EshellJim Porter2024-05-292-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/eshell/em-script.el (eshell-source-file): Make obsolete. (eshell--source-file): Adapt from 'eshell-source-file'... (eshell-script-initialize, eshell/source, eshell/.): ... use it. (eshell-princ-target): New struct. (eshell-output-object-to-target, eshell-target-line-oriented-p): New implementations for 'eshell-princ-target'. (eshell-execute-file, eshell-batch-file): New functions. * lisp/eshell/esh-mode.el (eshell-mode): Just warn if we can't create the Eshell directory. * test/lisp/eshell/em-script-tests.el (em-script-test/execute-file): (em-script-test/execute-file/args), em-script-test/batch-file): New tests. * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings): New function... (with-temp-eshell): ... use it. * doc/misc/eshell.texi (Control Flow): Update documentation. * etc/NEWS: Announce this change (bug#70847).
* | Add ability for Eshell virtual targets to handle closing the targetJim Porter2024-05-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was documented to work by calling the output function with 'nil', but that was never actually implemented. Instead, for compatibility, we now support a new (optional) close function. * lisp/eshell/esh-io.el (eshell-virtual-targets): Update docstring. (eshell-generic-target): New struct... (eshell-function-target): ... inherit from it, and rename from 'eshell-virtual-target'. (eshell-get-target): Handle already-created 'eshell-generic-target'. (eshell-close-target): Call the target's close function if present. * test/lisp/eshell/esh-io-tests.el (esh-io-test/virtual/device-close): New test. * doc/misc/eshell.texi (Redirection): Document the new behavior.
* | Consolidate Eshell module loading/unloading codeJim Porter2024-05-292-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also adds the ability to suppress module loading/unloading messages, which will be necessary to support running Eshell scripts as batch scripts. * lisp/eshell/esh-mode.el (eshell-mode): Move module loading/initialization to... * lisp/eshell/esh-module.el (eshell-load-modules) (eshell-initialize-modules): ... here. (eshell-module-loading-messages): New option. (eshell-module--feature-name): Improve docstring. (eshell-unload-modules): Display a real warning if unable to unload a module. * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell) (eshell-command-result-equal): * test/lisp/eshell/eshell-tests-unload.el (load-eshell): Silence Eshell loading messages.
* | Add Tramp distrobox methodMichael Albinus2024-05-291-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods) <distrobox>: Add. * etc/NEWS: Mention Tramp distrobox method. * lisp/net/tramp-container.el (tramp-distrobox-program): New defcustom. (tramp-distrobox-method): New defconst. (tramp-distrobox--completion-function) (tramp-enable-distrobox-method): New defuns. (Bug#71200) (tramp-docker-method, tramp-dockercp-method) (tramp-podman-method, tramp-podmancp-method) (tramp-kubernetes-method, tramp-flatpak-method) (tramp-apptainer-method, tramp-nspawn-method): Adapt docstring. * test/lisp/net/tramp-tests.el (tramp--test-box-p): Rename from `tramp--test-toolbox-p'. Add distrobox. Adapt callees.
* | Add a couple of minibuffer completion testsEshel Yaron2024-05-291-0/+13
| | | | | | | | | | | | | | | | | | | | Add tests for regressions that followed commit ff3f17ca3cd. See discussion here: https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html * test/lisp/minibuffer-tests.el (completion-cycle) (minibuffer-next-completion): New tests.
* | Redirect calls to `subr-native-elisp-p` to `native-comp-function-p`Stefan Monnier2024-05-282-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/comp-tests.el (comp-tests-bootstrap, lambda-return) (lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1) (compile-forms, comp-test-defsubst, primitive-redefine-compile-44221) (48029-1, 61917-1, tco, fw-prop-1, pure): * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): * lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file): * lisp/help-fns.el (find-lisp-object-file-name): * lisp/emacs-lisp/disass.el (disassemble-internal): * lisp/emacs-lisp/comp.el (comp--call-optim-form-call): * lisp/emacs-lisp/comp-run.el (comp-warn-primitives): * lisp/emacs-lisp/comp-common.el (comp-function-type-spec): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p` to `native-comp-function-p`.
* | Use same Python binary for test as in python mode (bug#70815)Mattias Engdegård2024-05-281-1/+3
| | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-tests-get-shell-interpreter): Try Python executable names in the same order as we do for `python-shell-interpreter`, so that we run the test with the one is most likely to be used.
* | Fix tar-mode-test-tar-extract-zip-and-gzMichael Albinus2024-05-281-0/+1
| | | | | | | | | | * test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz): Check also for "unzip" executable.
* | Fix date-stamp regression in erc-fill-wrapF. Jason Park2024-05-272-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable) (erc-fill-wrap-disable): Add and remove `erc-stamp--insert-date-hook' member. (erc-fill--wrap-continued-predicate): Add function-valued variable for modules to influence `erc-fill--wrap-continued-message-p', which was originally introduced as part of bug#60936. (erc-fill--wrap-rejigger-last-message): Move toward beginning of file. (erc-fill--wrap-unmerge-on-date-stamp): New function. (erc-fill-wrap): Use `erc-fill--wrap-continued-predicate'. Restore recently deleted hunk that reset the wrap marker upon seeing a date stamp. * test/lisp/erc/erc-scenarios-fill-wrap.el: New file. * test/lisp/erc/resources/fill/wrap/merge-datestamp.eld: New file.
* | Add ERC module querypoll as monitor placeholderF. Jason Park2024-05-271-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/erc.texi: Add module `querypoll' to list of built-in modules'. * etc/ERC-NEWS: Mention new module `querypoll', and explain new default behavior for deriving query membership from that of channels. * lisp/erc/erc-goodies.el (erc--querypoll-ring) (erc--querypoll-timer): New variables. (erc-querypoll-exclude-regexp): New option. (erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable): New module for polling with "WHO" requests for the presence of otherwise "untracked" query targets. (erc-querypoll-period-params): New variable. (erc--querypoll-compute-period) (erc--querypoll-target-in-chan-p) (erc--querypoll-get-length) (erc--querypoll-get-next) (erc--querypoll-subscribe) (erc--querypoll-on-352) (erc--querypoll-send): New functions. * lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Dispatch queries as if they were channels when `erc--queries-current-p' returns non-nil. That is, show head counts alongside query targets as users come and go. (erc-speedbar-insert-target): Defer to `erc--queries-current-p' to know whether to show a query in the style of a channel. This affects both the plain speedbar integration as well as the `nickbar' module added for bug#63595. Also, use question marks rather than the empty string for query bullets, so that query and channel items are aligned vertically. * lisp/erc/erc.el (erc--queries-current-p): New function. * test/lisp/erc/erc-goodies-tests.el (erc--querypoll-compute-period) (erc--querypoll-target-in-chan-p) (erc--querypoll-get-length) (erc--querypoll-get-next): New tests. (Bug#70928)