1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

889 commits

Author SHA1 Message Date
Michael Albinus
6ad8745833 Extend tramp-test26-interactive-file-name-completion
* lisp/net/tramp.el (tramp-get-completion-methods):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (completions-max-height): Declare.
(tramp-test26-interactive-file-name-completion): Extend test.
2025-09-02 12:09:17 +02:00
Michael Albinus
95232f556e `Fix read-directory-name' for Tramp files
* lisp/minibuffer.el (completion-file-name-table): Improve bypass
for directory checking.  (Bug#79236)

* lisp/net/tramp.el (tramp-user-regexp): Exclude "[" and "]".
(tramp-completion-make-tramp-file-name): Handle port for IPv6 hosts.
(tramp-completion-handle-file-directory-p)
(tramp-completion-handle-file-exists-p): Simplify.
(tramp-completion-handle-file-name-completion): Ignore PREDICATE.
(tramp-completion-dissect-file-name): Handle ports.
(tramp-parse-default-user-host): Suppress '(nil nil) result.
(tramp-parse-file): Delete duplicates.
(tramp-parse-shosts-group): Accept also IPv6 addresses.
(tramp-handle-file-directory-p): Return t for filenames
"/method:foo:".
(tramp-parse-auth-sources, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (edebug-mode): Declare.
(tramp--test-message): Write also trace value.
(tramp-test26-file-name-completion):
(tramp-test26-interactive-file-name-completion): Extend tests.
2025-08-29 13:47:51 +02:00
Michael Albinus
6979bce0b2 Suppress Tramp session timeout if buffer is modified
* doc/misc/tramp.texi (Predefined connection information): A session
timeout is suppressed if there is a modified buffer, or a buffer
under auto-revert.
(Traces and Profiles): Tramp messages are written to the *Messages*
buffer when level is less than or equal to 3.

* lisp/net/tramp-sh.el (tramp-timeout-session): Do not timeout
when buffer is modified, or in auto-revert mode.

* test/lisp/net/tramp-tests.el (tramp-test48-session-timeout):
Extend test.
2025-08-17 11:19:01 +02:00
Michael Albinus
d3cd93dc4d Add set-file-times implementation for Tramp smb method
* lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times):
Don't use UTC in all cases.

* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-times): New defun.
(tramp-smb-file-name-handler-alist): Use it.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.
2025-08-06 17:59:02 +02:00
Michael Albinus
5ff8a90395 Tramp allows now external implementations for functions
* doc/misc/tramp.texi (Frequently Asked Questions): Mention tramp-hlo.
(New operations): New node.
(Top, Files directories and localnames):  Add it to @menu.

* etc/NEWS: Mention Tramp's feature to add function implementations.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-file-name-for-operation-external): New defvar.
(tramp-file-name-for-operation): Use `memq'.  Handle external
operations.  Raise `remote-file-error' error in case of.
(tramp-add-external-operation, tramp-remove-external-operation):
New defuns.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test50-auto-load)
(tramp-archive-test50-delay-load)
(tramp-archive-test51-without-remote-files): Rename.

* test/lisp/net/tramp-tests.el (tramp--test-operation)
(tramp--handler-for-test-operation): New defuns.
(tramp-test49-external-backend-function): New test.
(tramp-test50-auto-load, tramp-test50-delay-load)
(tramp-test50-recursive-load, tramp-test50-remote-load-path)
(tramp-test51-without-remote-files, tramp-test52-unload): Rename.
2025-08-05 12:00:21 +02:00
Michael Albinus
4516091fd8 Fix problem in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes):
Use `directory-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test19-directory-files-and-attributes): Extend tests.
2025-07-30 09:33:20 +02:00
Michael Albinus
76c17ac0f0 Rework filenotify-tests.el
* lisp/filenotify.el (file-notify--rm-descriptor):
Use `insert-special-event'.

* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Fix docstring.
(tramp-sh-gio-monitor-process-filter): Extend error strings.

* test/infra/Dockerfile.emba (emacs-base): Install python3.

* test/lisp/filenotify-tests.el (auto-revert-buffer-list): Declare.
(file-notify--test-rootdir): New defvar.  Replace all uses of
`temporary-file-directory' by it.
(file-notify--test-cleanup): Set `auto-revert-buffer-list' to nil.
(file-notify--test-monitor): Check also for `process-live-p'.
Skip test, if the monitor cannot be determined.
(file-notify--deftest-remote): Do not call
`tramp-cleanup-connection', this is done in
`file-notify--test-cleanup' already.
(with-file-notify-test): New defmacro.  Use it in (almost) all tests.
(file-notify--test-make-temp-name): Do not create
`file-notify--test-tmpdir'.
(file-notify--test-event-handler): Use `directory-file-name '.
(auto-revert-debug): Set it to nil.
(file-notify-test<nn>-*): Rewrite, using `with-file-notify-test'
and `ert-with-temp-file'.

* test/lisp/net/tramp-tests.el (tramp-test46-file-notifications):
Tag it :unstable.
2025-07-26 12:45:51 +02:00
Robert Pluim
5cce567f20 Use macro to reduce repetition in TLS tests
* test/lisp/net/network-stream-tests.el (with-tls-params): New
macro, abstracts most of the boiler plate for TLS tests.
(connect-to-tls-ipv4-wait, connect-to-tls-ipv4-nowait)
(connect-to-tls-ipv6-nowait, open-network-stream-tls-wait)
(open-network-stream-tls-nowait, open-network-stream-tls)
(open-network-stream-tls-nocert)
(open-gnutls-stream-new-api-default)
(open-gnutls-stream-new-api-wait)
open-gnutls-stream-old-api-wait)
(open-gnutls-stream-new-api-nowait)
(open-gnutls-stream-old-api-nowait): Use it.
2025-07-24 18:04:29 +02:00
Jim Porter
dc38f05757 Disable track-changes while reloading pages in EWW
This makes sure 'eww--track-changes' doesn't interfere with the initial
rendering process.  Previously, this caused problems like <textareas>
consuming the rest of the page when reloading the document.

* lisp/net/eww.el (eww--change-tracker-id): New variable.
(eww-display-document): Temporarily unregister our change tracker.

* test/lisp/net/eww-tests.el (eww-test/tag/textarea/reload): New test.
2025-07-20 13:13:41 -07:00
Jim Porter
49376118a1 Fix EWW <textarea> properties when it's on the same line as other text
* lisp/net/eww.el (eww-tag-textarea): Set 'start' after ensuring
preceding newline.

* test/lisp/net/eww-tests.el (eww-test/tag/textarea/starts-on-new-line):
New test.
2025-07-20 13:13:41 -07:00
Jim Porter
49696b5cd1 Make sure we always set the ':readable' state when displaying EWW page
* lisp/net/eww.el (eww-display-html): Always set ':readable'.
* test/lisp/net/eww-tests.el (eww-test/readable/reload-resets-readable):
New test.
2025-07-19 20:24:32 -07:00
Eli Zaretskii
462a541db9 ; * test/lisp/net/shr-tests.el (shr-test/zoom-image): Fix <img> (bug#79041). 2025-07-17 19:34:50 +03:00
Michael Albinus
4c9b376607 Improve autorevert-tests
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.8.1-pre".

* lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(auto-revert-notify-handler, auto-revert--end-lockout):
Use `auto-revert-buffer'.
(auto-revert-notify-handler): Rearrange setting current buffer.
(auto-revert-handler): Add debug message.  Rearrange check.
Cancel lockout timer if running.

* lisp/net/tramp.el (tramp-barf-if-file-missing)
(with-parsed-tramp-file-name, tramp-skeleton-file-truename):
* lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name):
* lisp/net/tramp-message.el (tramp-with-demoted-errors):
Fix debug declatation.

* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): Do not
prepend remote prefix.

* test/lisp/autorevert-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(top): Set some Tramp related variables.
(auto-revert--timeout): Increase value.
(auto-revert--test-enabled-remote)
(auto-revert-test02-auto-revert-deleted-file): Do not check for
EMACS_HYDRA_CI environment variable.
(auto-revert--wait-for-revert): Fix regexp to search for.
(auto-revert--deftest-remote): Fix debug declatation.  Do not tag
:unstable.
(with-auto-revert-test): Fix debug declatation.  Adapt revert intervals.
(auto-revert-test*): Start with (file-notify-rm-all-watches).  Use
`buffer-string' and `string-match-p'.
(auto-revert-test00-auto-revert-mode): Unlock initial lockout.
(auto-revert-test01-auto-revert-several-files): Rearrange
temporary directory and file settings.
(auto-revert-test02-auto-revert-deleted-file): Adapt debug message.
(auto-revert-test03-auto-revert-tail-mode): Use `with-auto-revert-test'.
(auto-revert-test04-auto-revert-mode-dired):
Use `ert-with-temp-directory'.  Adapt prefix of tmpfile.
(auto-revert-test04-auto-revert-mode-dired)
(auto-revert-test05-global-notify, auto-revert-test06-write-file):
Wait for proper file modification.
(auto-revert-test--instrument-kill-buffer-hook): Fix debug message.
(auto-revert-test07-auto-revert-several-buffers): Use
`with-auto-revert-test.

* test/lisp/filenotify-tests.el: Unify file notification libraries
"gio-monitor" and "gvfs-monitor-dir" to "gio".
(file-notify--deftest-remote): Fix debug declatation.  Do not skip
for "gio".
(file-notify--test-with-actions): Fix debug declatation.

* test/lisp/net/tramp-tests.el (filenotify): Require.
(ert-remote-temporary-file-directory)
(tramp-test41-special-characters, tramp-test42-utf8)
(tramp-test45-asynchronous-requests): Do not check for
EMACS_HYDRA_CI environment variable.
(tramp-test46-file-notifications): New test.
2025-07-15 18:57:49 +02:00
Michael Albinus
6d0812e57a Fix browse-url-tests-delete-temp-file
* test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file):
Fix test.
2025-07-10 18:44:52 +02:00
Jim Porter
d3c75a3d2d Show "readable" status in the EWW mode line
* lisp/net/eww.el (eww-display-html): Check whether a readable form of
the document exists; if not, don't set ':readable' to t.
(eww-readable): Check whether a readable form of the document exists; if
not, warn the user and don't add to history.
(eww-readable-dom): Return nil if no readable form exists.
(eww-mode): Check the ':readable' property of 'eww-data' to show
"readable" state in the mode line.

* test/lisp/net/eww-tests.el
(eww-test/readable/default-readable/non-readable-page): New test
(bug#78958).
2025-07-06 17:26:45 -07:00
Steven Allen
f10bf71151 Retain the <base> tag when making a page in EWW document readable
The base tag is necessary to correctly resolve relative links.

* lisp/net/eww.el (eww-readable-dom): Retain the base tag in addition to
the title/link tags.  (Bug#78948)
* test/lisp/net/eww-tests.el (eww-test--wordy-page): Add a base tag.
(eww-test/readable/default-readable): Test that the base tag is retained.
2025-07-03 20:41:19 -07:00
Jim Porter
2bdcf0250a When making a readable page in EWW, include the <title> and similar tags
* lisp/net/eww.el (eww--walk-readability, eww-readable-dom): New
functions.
(eww-display-html): Call 'eww-readable-dom'.
(eww-readable): Call 'eww-readable-dom'.  Don't copy over 'eww-data'
properties that our new readable page can handle on its own.
(eww-score-readability): Rewrite in terms of 'eww--walk-readability'.
Make obsolete.
(eww-highest-readability): Make obsolete.

* test/lisp/net/eww-tests.el (eww-test--lots-of-words)
(eww-test--wordy-page): New variables...
(eww-test/readable/toggle-display): ... use them.
(eww-test/readable/default-readable): Make sure that the readable page
includes the <title> and <link> tags (bug#77299).
2025-06-25 21:26:04 -07:00
Robert Pluim
1560e9bf66 Make tls tests use random port
* test/lisp/net/network-stream-tests.el (server-process-filter):
Remove 'message' call.
(make-tls-server): Try random ports until we find one that's
unused and use it.  Adjust all callers.
2025-06-20 12:09:14 +02:00
Robert Pluim
04a1a53de1 ; Improve previous change
* test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): Resolve addresses once not
twice.
2025-06-20 12:01:59 +02:00
Robert Pluim
dcead54ed5 Fix echo-server-with-dns for really broken systems
*test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): Check to see if we get any
address result at all (looking at you macOS).
2025-06-20 11:57:41 +02:00
Robert Pluim
1c168e166d Fix echo-server-with-dns test
This test wasn't being run because the check for DNS was
inverted.

* test/lisp/net/network-stream-tests.el (echo-server-with-dns):
Use 'skip-when' instead of 'ert-skip'.
2025-06-20 11:47:31 +02:00
Michael Albinus
55691c61d4 Tramp: Do not raise an error when not connected (Bug#78572)
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
Use read syntax #' for `tramp-timeout-session',

* lisp/net/tramp.el (tramp-barf-if-file-missing): Do not raise an error
when not connected.  (Bug#78572)
(tramp-file-name-handler): Do not force the backtrace.
(tramp-connectable-p): Check also, whether initial handshake is finished.
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-set-file-modes-times-uid-gid): Rearrange sending
`file-missing' error.
(tramp-handle-access-file, tramp-handle-unlock-file):
Use `tramp-connectable-p'.

* test/lisp/net/tramp-tests.el (project-mode-line-format)
(project-mode-line): Declare.
(tramp-test48-session-timeout): New test.
(tramp-test49-auto-load, tramp-test49-delay-load)
(tramp-test49-recursive-load, tramp-test49-remote-load-path)
(tramp-test50-without-remote-files, tramp-test51-unload): Rename.
2025-06-02 11:44:43 +02:00
Michael Albinus
5ce0e1372b Fix Tramp bug#78508
* lisp/net/tramp-container.el (tramp-methods) <docker, dockercp, podman>
<podmancp, apptainer, nspawn>:
* lisp/net/tramp-sh.el (tramp-methods) <scp, scpx, rsync>
<ssh, sshx, sudo>:
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>: Set TERM environment.
(Bug#78508)

* lisp/net/tramp-sh.el (tramp-find-executable): Handle superlong PATH.
(tramp-set-remote-path): Simplify command.
(tramp-timeout-session): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-winexe-program): Adapt docstring.
(tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
(tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
Simplify argument handling.
(tramp-smb-handle-process-file): Flush " process-exit-status" property.
(tramp-smb-call-winexe): Set $winsize.Width to 102 only.

* lisp/net/tramp.el (tramp-process-sentinel): Adapt docstring.
Set " process-exit-status" property.

* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Make it more robust.
(tramp-test18-file-attributes)
(tramp-test26-interactive-file-name-completion)
(tramp-test26-file-name-completion-boundaries)
(tramp-test35-remote-path): Adapt tests.
2025-05-31 15:08:06 +02:00
Eli Zaretskii
bd57055a58 Merge from origin/emacs-30
299d3a4401 Fix saving abbrevs by 'abbrev-edit-save-buffer'
399d05332e ; Remove confusing text from ELisp manual
feecb1fbc6 ; * doc/emacs/cmdargs.texi (General Variables): More accu...
18e1aabbea ; Improve documentation of the -L command-line option
c80fbe3f23 typescript-ts-mode: align ternary-chain branches (bug#78187)
16bfbc6fe3 ; Tramp test fixes
f0ac271da3 ; Time Stamps doc: Clearer customize recipe
49c06df224 ; * doc/lispref/variables.texi (Default Value): Update.
cbea5997c0 ; * lisp/mh-e/mh-e.el: Commentary: link to The MH-E Manual
0bf956235e Improve Tramp test
eaf01d034c * lisp/autorevert.el (auto-revert-remote-files): Adapt do...
e32bb816ad ; Improve documentation of ls-lisp.el
2d5f243470 ; * lisp/emacs-lisp/comp.el (native-compile-prune-cache):...
bb73533165 Improve Electric Pair mode documentation (bug#78021)
2025-05-17 06:52:01 -04:00
Michael Albinus
16bfbc6fe3 ; Tramp test fixes
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Simplify.
(tramp--test-putty-p): Fix docstring.
(tramp--test-scp-p): New defun.
(tramp-test42-utf8): Use it.
2025-05-15 15:15:22 +02:00
Michael Albinus
0bf956235e Improve Tramp test
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Adapt test.
2025-05-11 14:25:59 +02:00
Eli Zaretskii
1410bfb7ca Merge from origin/emacs-30
0d493864ce Fix indentation of XML comments
1a2c29b531 Improve Tramp's make-process handling for Solaris
a7dffc2ea3 Document 'time-stamp-time-zone' in Emacs Manual
0b4eb525b6 Make treesit--simple-indent-eval more permissive (bug#78065)
ed7b55f6bf Adapt Tramp tests
b172a1478c ; * doc/lispref/tips.texi (Library Headers): Fix wording ...
81629b2b2b ; * lisp/gnus/mail-source.el (mail-sources): Fix a typo (...
2025-05-10 07:40:30 -04:00
Michael Albinus
ed7b55f6bf Adapt Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-05-06 12:22:45 +02:00
Michael Albinus
99ca41b6ef ; Fix last change in tramp-tests.el 2025-05-02 14:55:52 +02:00
Spencer Baugh
d56d7ca35c Fix completion boundaries for TRAMP file names
Previously, we assumed (roughly) that substitute-in-file-name
always returns a suffix of the original string.  But
substitute-in-file-name on "/ssh:user@host:/~/" returns
"/ssh:user@host:~/", preserving the TRAMP magic prefix.  Weaken
the assertion in completion--sifn-boundaries to allow this; the
new assertion is more clear about the property we care about,
anyway.

* lisp/minibuffer.el (completion--sifn-boundaries): Weaken
assertion slightly.

* test/lisp/net/tramp-tests.el (tramp--test-emacs31-p)
(tramp--split-on-boundary)
(tramp-test51-file-name-completion-boundaries): Add.
2025-05-02 14:47:37 +02:00
Eli Zaretskii
2054060d56 Merge from origin/emacs-30
ae7f65f3f9 Fix obsolete documentation of desktop library
fd5f817882 Improve Tramp's initial warnings
1e865a2f28 Explain, how to suppress Tramp warnings
a096207474 printed manuals: xrefs in and out of "Preparing Patches"
3f9ac99fc7 Fix Tramp's file-attributes cache
2025-04-05 07:07:29 -04:00
Michael Albinus
3f9ac99fc7 Fix Tramp's file-attributes cache
* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p):
Check also for sticky bit.
(tramp-adb-handle-file-readable-p): Simplify.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
Check also for sticky bit.  Force `file-attributes' check.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for sticky bit.
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Simplify.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p):
Check also for sticky bit.
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Simplify.

* lisp/net/tramp.el (tramp-use-file-attributes): Fix docstring.
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
Force `file-attributes' check.  Use `file-truename' for symbolic links.
(tramp-check-cached-permissions): New optional argument FORCE.
Fix symlink check.  Check also for sticky bit.  (Bug#77402)

* test/lisp/net/tramp-tests.el
(tramp-test20-file-modes-without-file-attributes)
(tramp-test21-file-links-without-file-attributes): New tests.
2025-04-01 15:24:44 +02:00
Michael Albinus
10991877c8 Sync with Tramp 2.7.3-pre
* doc/misc/tramp.texi: Use @dots{} where appropriate.
(External methods): Precise remark on rsync speed.
(Customizing Methods): Add incus-tramp.
(Password handling): Mention expiration of cached passwords when a
session timeout happens.
(Predefined connection information): Mention also "androidsu" as
special case of "tmpdir".
(Ad-hoc multi-hops, Frequently Asked Questions):
Improve description how ad-hoc multi-hop file names can be made
persistent.  (Bug#65039, Bug#76457)
(Remote processes): Signals are not delivered to remote direct
async processes.  Say, that there are restrictions for transfer of
binary data to remote direct async processes.
(Bug Reports): Explain bisecting.
(Frequently Asked Questions): Improve index.  Speak about
fingerprint readers.  Recommend `small-temporary-file-directory'
for ssh sockets.
(External packages): Rename subsection "Timers, process filters,
process sentinels, redisplay".
(Extension packages): New node.
(Top, Files directories and localnames): Add it to @menu.

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
(tramp-repository-branch, tramp-repository-version):
Remove ;;;###tramp-autoload cookie.

* lisp/net/tramp-adb.el:
* lisp/net/tramp-androidsu.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-container.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-message.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el: Use `when-let*', `if-let*' and `and-let*'
consequently.  (Bug#73441)

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.

* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.

* lisp/net/tramp-cache.el (tramp-connection-properties): Add link
to the Tramp manual in the docstring.
(tramp-get-connection-property, tramp-set-connection-property):
Don't raise a debug message for the `tramp-cache-version' key.
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Add traces.
(tramp-dump-connection-properties): Don't save connection property
"pw-spec".

* lisp/net/tramp-cmds.el (tramp-repository-branch)
(tramp-repository-version): Declare.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
(tramp-gvfs-do-copy-or-rename-file): Don't use the truename.
Handle symlinks.
(tramp-gvfs-local-file-name): New defun.

* lisp/net/tramp-message.el (tramp-repository-branch)
(tramp-repository-version): Declare.
(tramp-error-with-buffer, tramp-user-error): Don't redisplay in
`sit-for'.  (Bug#73718)
(tramp-warning): Fix `lwarn' call.

* lisp/net/tramp.el (tramp-read-passwd):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Rename connection property "password-vector" to "pw-vector".

* lisp/net/tramp-sh.el (tramp-methods) <pscp, psftp>:
Adapt `tramp-copy-args' argument.
(tramp-get-remote-pipe-buf, tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.
(tramp-sh-handle-copy-directory):
Apply `tramp-do-copy-or-rename-file-directly' if possible.
(tramp-do-copy-or-rename-file): Refactor.  Handle symlinks.
(Bug#76678)
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'.  Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.
(tramp-sh-handle-make-process): Don't set connection property
"remote-pid", it's unused.
(tramp-sh-handle-process-file): Do proper quoting.
(tramp-vc-file-name-handler): Add `file-directory-p', which is
used in `vc-find-root'.  (Bug#74026)
(tramp-maybe-open-connection): Use connection property "hop-vector".
(tramp-get-remote-pipe-buf): Make it more robust.

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-directory): Don't check existence of
DIRNAME, this is done in `tramp-skeleton-copy-directory' already.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file): Refactor.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename.  Handle symlinks.

* lisp/net/tramp.el (tramp-mode): Set to nil on MS-DOS.
(tramp-otp-password-prompt-regexp): Add TACC HPC prompt.
(tramp-wrong-passwd-regexp): Add fingerprint messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.
(tramp-skeleton-process-file): Raise a warning if STDERR is not
implemented.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.
(tramp-compute-multi-hops): Check for
`tramp-sh-file-name-handler-p', it works only for this.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.
(tramp-action-password, tramp-process-actions): Use connection
property "hop-vector".
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).
(tramp-wait-for-regexp): Don't redisplay in `sit-for'.  (Bug#73718)
(tramp-convert-file-attributes): Don't cache
"file-attributes-ID-FORMAT".
(tramp-read-passwd, tramp-clear-passwd): Rewrite.  (Bug#74105)

* test/lisp/net/tramp-tests.el (auth-source-cache-expiry)
(ert-batch-backtrace-right-margin): Set them to nil.
(vc-handled-backends): Suppress if noninteractive.
(tramp--test-enabled): Cleanup also
`tramp-compat-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-without-file-attributes)
(tramp-test21-file-links, tramp-test28-process-file)
(tramp-test32-shell-command, tramp-test36-vc-registered)
(tramp-test39-make-lock-file-name, tramp--test-check-files)
(tramp-test42-utf8, tramp-test43-file-system-info)
(tramp-test44-file-user-group-ids, tramp-test47-read-password):
Adapt tests.
(tramp-test47-read-fingerprint): New test.
2025-03-30 15:53:47 +02:00
Michael Albinus
8a986e7075 tramp-tests cleanup
* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test26-interactive-file-name-completion): Adapt tests.
2025-03-28 19:26:23 +01:00
Michael Albinus
172e35afce Tramp: Improve handling of cyclic symlinks
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Add FIXME.

* lisp/net/tramp.el (tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test21-file-links): Adapt tests.
2025-03-22 09:52:22 +01:00
Michael Albinus
f6632114fe ; Tramp: fixes resulting from test campaign
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle symlinks.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.

* lisp/net/tramp.el (tramp-skeleton-process-file): Raise a warning
if STDERR is not implemented.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
2025-03-19 14:40:54 +01:00
Michael Albinus
b8104dadbf Tramp: Handle symlinks to non-existing targets better
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Don't use the truename.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): Refactor.  Handle
symlinks.  (Bug#76678)

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file):
Refactor.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename.  Handle symlinks.

* lisp/net/tramp.el (tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p): Handle non-existing symlink targets.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.

* test/lisp/net/tramp-tests.el (vc-handled-backends):
Suppress only if noninteractive.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp-test21-file-links)
(tramp--test-check-files): Adapt tests.
2025-03-16 14:17:38 +01:00
Eli Zaretskii
8334a9bd73 Merge from origin/emacs-30
9c1d13c89a ; * admin/authors.el (authors-aliases): Add Vladimir Niki...
443df12edd ; * INSTALL.REPO: Minor copyedits.
76b938fc1d ; Don't fail image tests if jpeg is supported via imagema...
f8ff9592be ; Skip autorevert test when notify support is missing
230ecb1e27 ; Skip shr-test/zoom-image test if png or libxml support ...
cc51bd5698 ; Skip image type test if support is missing
2025-02-23 00:48:15 -05:00
Stefan Kangas
042dc5929b Prefer incf to cl-incf in tests
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-reify-function):
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-getf):
* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-loop-for-as-arith-order-side-effects)
(cl-macs-loop-for-as-equals-then, cl-macs-loop-do, cl-macs-loop-finally)
(cl-macs-loop-in-ref, cl-macs-loop-being-elements-of-ref)
(cl-macs-test--symbol-macrolet, cl-the):
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-lib-test-remove)
(cl-lib-test-remove-if-not):
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-range):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-deduplicate):
* test/lisp/emacs-lisp/generator-tests.el (cps-while-incf):
(cps-test-iter-cleanup-once-only):
* test/lisp/emacs-lisp/hierarchy-tests.el
(hierarchy-labelfn-button-if-does-not-button-unless-condition)
(hierarchy-labelfn-button-if-does-button-when-condition):
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-evaluate-once):
* test/lisp/emacs-lisp/lisp-mode-tests.el
(indent-sexp, lisp-indent-region):
* test/lisp/emacs-lisp/map-tests.el (test-map-elt-gv)
(test-setf-map-with-function):
* test/lisp/emacs-lisp/multisession-tests.el (multi-test-sqlite-simple)
(multi-test-sqlite-busy, multi-test-files-simple)
(multi-test-files-busy):
* test/lisp/emacs-lisp/oclosure-tests.el
(oclosure-test, oclosure-test-mutate):
* test/lisp/emacs-lisp/track-changes-tests.el
(track-changes-tests--random):
* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
* test/lisp/net/shr-tests.el (shr-test/zoom-image):
* test/lisp/replace-tests.el (replace-tests-with-undo):
* test/src/buffer-tests.el (test-overlay-randomly):
* test/src/data-tests.el (test-bool-vector-bv-from-hex-string):
* test/src/fns-tests.el (fns-tests-sort):
* test/src/json-tests.el (json-insert/signal, json-insert/throw):
* test/src/minibuf-tests.el (minibuf-tests--strings-to-symbol-alist)
(minibuf-tests--strings-to-string-alist)
(minibuf-tests--strings-to-string-hashtable)
(minibuf-tests--strings-to-symbol-hashtable):
* test/src/process-tests.el (make-process/file-handler/found): Prefer
incf to cl-incf.
2025-02-23 00:38:22 +01:00
Stefan Kangas
9d7d4db7eb Prefer decf to cl-decf
* lisp/auth-source-pass.el (auth-source-pass--find-match-many):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-month, decoded-time--alter-day):
* lisp/dired.el (dired--move-to-next-line):
* lisp/dom.el (dom-pp):
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
* lisp/emacs-lisp/cl-print.el (cl-print-to-string-with-limit):
* lisp/emacs-lisp/cl-seq.el (cl-fill, cl-replace, cl-substitute):
* lisp/emacs-lisp/comp-cstr.el (comp--range-union)
(comp--range-intersection):
* lisp/emacs-lisp/comp.el (comp-vec-prepend, comp--emit-narg-prologue):
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
* lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy):
* lisp/emacs-lisp/pp.el (pp--format-definition):
* lisp/emacs-lisp/smie.el (smie-config--guess-1):
* lisp/eshell/esh-io.el (eshell-close-handle, eshell-set-output-handle):
* lisp/gnus/gnus-async.el (gnus-async-prefetch-article):
* lisp/gnus/gnus-group.el (gnus-group-mark-group)
(gnus-group-yank-group):
* lisp/gnus/gnus-salt.el (gnus-tree-forward-line):
* lisp/gnus/gnus-score.el (gnus-decay-scores):
* lisp/gnus/gnus-srvr.el (gnus-browse-toggle-subscription-at-point):
* lisp/gnus/gnus-sum.el (gnus-build-sparse-threads, gnus-parent-headers)
(gnus-update-marks, gnus-summary-work-articles)
(gnus-summary-refer-parent-article, gnus-summary-next-thread)
(gnus-read-header, gnus-summary-insert-new-articles):
* lisp/gnus/gnus-topic.el (gnus-topic-forward-topic):
* lisp/gnus/gnus.el (gnus-short-group-name):
* lisp/gnus/message.el (message-remove-first-header)
(message-shorten-references, message-insert-screenshot):
* lisp/gnus/mm-url.el (mm-url-insert):
* lisp/gnus/nnselect.el (nnselect-push-info):
* lisp/ibuffer.el (ibuffer-backward-line, ibuffer-forward-line)
(ibuffer-map-lines):
* lisp/icomplete.el (icomplete--render-vertical):
* lisp/image/image-dired-external.el (image-dired-create-thumb-1):
* lisp/image/image-dired.el (image-dired-delete-char):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string):
* lisp/mh-e/mh-utils.el (mh-sub-folders-parse):
* lisp/minibuffer.el (minibuffer-completion-help):
* lisp/mpc.el (mpc-cmd-move, mpc-songpointer-refresh-hairy):
* lisp/net/eww.el (eww-process-text-input):
* lisp/net/pop3.el (pop3-wait-for-messages, pop3-uidl-stat)
(pop3-uidl-dele):
* lisp/net/shr-color.el (shr-color-hue-to-rgb):
* lisp/play/5x5.el (5x5-up, 5x5-left):
* lisp/play/decipher.el (decipher-read-alphabet, decipher--digram-total)
(decipher-analyze-buffer):
* lisp/play/hanoi.el (hanoi-insert-ring, hanoi-move-ring):
* lisp/profiler.el (profiler-format-number)
(profiler-calltree-build-unified):
* lisp/progmodes/antlr-mode.el (antlr-next-rule, antlr-indent-line):
* lisp/progmodes/c-ts-common.el (c-ts-common-statement-offset):
* lisp/progmodes/ebrowse.el
(ebrowse-cyclic-display-next/previous-member-list):
* lisp/progmodes/hideif.el (hif-backward-comment):
* lisp/progmodes/js.el (js-beginning-of-defun, js-end-of-defun)
(js-ts--syntax-propertize):
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts--syntax-propertize-captures):
* lisp/rect.el (rectangle--*-char):
* lisp/term.el (term-emulate-terminal):
* lisp/textmodes/reftex-cite.el (reftex-do-citation):
* lisp/textmodes/reftex-index.el (reftex-index-next-phrase):
* lisp/textmodes/reftex-parse.el (reftex-init-section-numbers):
* lisp/textmodes/reftex-sel.el (reftex-select-unmark):
* lisp/textmodes/reftex.el (reftex-silence-toc-markers):
* lisp/treesit.el (treesit-navigate-thing):
* lisp/vc/diff-mode.el (diff-sanity-check-context-hunk-half,
(diff-sanity-check-hunk):
* lisp/vc/pcvs-util.el (cvs-first):
* lisp/vc/smerge-mode.el (smerge-get-current):
* lisp/vc/vc-hg.el (vc-hg--glob-to-pcre):
* test/lisp/net/socks-tests.el
(socks-tests-perform-hello-world-http-request):
* test/src/buffer-tests.el (test-overlay-randomly): Prefer decf to
cl-defc in all code where we can.
2025-02-23 00:38:22 +01:00
Ulrich Müller
230ecb1e27 ; Skip shr-test/zoom-image test if png or libxml support is missing
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Skip if png
images or libxml are not supported.  (Bug#76464)
2025-02-21 12:58:20 +01:00
Michael Albinus
ec34bccfee Simplify Tramp's find-executable
* lisp/net/tramp-cache.el (with-tramp-saved-connection-property):
Fix typo.

* lisp/net/tramp-compat.el: Add TODO.

* lisp/net/tramp-sh.el (tramp-find-executable): Simplify, using
"type -P ...".
(tramp-set-remote-path): Better handling of superlong $PATH.
(tramp-get-remote-path): Adapt/use connection properties.

* test/lisp/net/tramp-tests.el (tramp--test-enabled)
(tramp-test03-file-name-host-rules): Don't wrap
`tramp-cleanup-connection' with `ignore-errors'.
2025-02-19 19:38:25 +01:00
Michael Albinus
5fcf07ac09 Tramp: Don't require PuTTY 0.82 anymore
* doc/misc/tramp.texi: Revert last change.

* lisp/net/tramp-cache.el (with-tramp-saved-connection-properties):
Adapt `tramp-verbose' when completing host names.

* lisp/net/tramp-sh.el (tramp-methods) <plink, plinkx, pscp, psftp>:
Adapt `tramp-login-args' and `tramp-copy-args' arguments.
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'.  Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.

* lisp/net/tramp.el (tramp-file-name-handler): Don't touch
`tramp-verbose'.

* test/lisp/net/tramp-tests.el (top): Set `vc-handled-backends' to nil.
(tramp--test-enabled): Rearrange code.
2025-02-15 17:12:52 +01:00
Stefan Kangas
f652566af5 ; Silence byte-compiler
* test/lisp/net/browse-url-tests.el
(browse-url-tests-delete-temp-file): Suppress warning.
2025-01-06 10:15:25 +01:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Michael Albinus
680906c136 Some minor Tramp changes
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Do proper quoting.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Adapt test.
(tramp-test42-utf8): Do not run expensive tests on MS Windows.
2024-12-29 12:26:05 +01:00
Michael Albinus
fef05ba8f4 ; Minor fixes in tramp-tests.el
* test/lisp/net/tramp-tests.el (ert-batch-backtrace-right-margin):
Set it to nil.
(tramp--test-enabled): Fix regexps.
2024-12-03 13:23:28 +01:00
Michael Albinus
e54c218d66 Extend Tramp tests
* test/lisp/net/tramp-tests.el (tramp-test47-read-password)
(tramp-test47-read-otp-password, tramp-test47-read-fingerprint):
Use `tramp-default-remote-shell' and
`tramp-connection-properties'.  Cleanup at the end.
(tramp-test47-read-security-key): New test.
2024-11-28 13:28:58 +01:00
Michael Albinus
3fe787ad4d Support fingerprint readers in Tramp
* doc/misc/tramp.texi (Frequently Asked Questions): Speak about
fingerprint readers.

* lisp/net/tramp-sh.el (tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.

* lisp/net/tramp.el (tramp-wrong-passwd-regexp): Add fingerprint
messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).

* test/lisp/net/tramp-tests.el (tramp-test47-read-fingerprint):
New test.
2024-11-26 12:45:06 +01:00