Commit graph

5780 commits

Author SHA1 Message Date
Jim Porter
fa77689b1e Ensure <style> and <template> HTML tags are never "readable" in EWW
This helps fix EWW readable mode on some web pages that use these tags,
like the FSF blog.

* lisp/net/eww.el (eww--walk-readability): Check for <style> and
<template> tags.
2025-07-01 18:34:56 -07:00
Thomas Fitzsimmons
ab568bce0c EUDC: Fix checkdoc errors
* lisp/net/eudc.el (eudc--plist-member)
(eudc-format-inline-expansion-result): Fix checkdoc errors.
2025-06-30 23:17:04 -04:00
Michael Albinus
bd04818e53 Adapt Tramp versions
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2025-06-29 11:03:05 +02:00
Eli Zaretskii
131cde2f86 Merge from origin/emacs-30
6299eb0fe5 bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp
982938363a Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
e68ad70af6 Fix 'insert-directory' in Turkish language-environment
f805f51373 Fix job control in remote shell
039ad15373 ; * doc/emacs/package.texi (Package Statuses): Clarify "n...
2025-06-28 06:57:19 -04: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
Michael Albinus
f805f51373 Fix job control in remote shell
* lisp/net/tramp-sh.el (tramp-methods) <rsync>:
Adapt `tramp-direct-async' argument.  (Bug#71050, Bug#71259)
2025-06-25 09:32:20 +02:00
Michael Albinus
991d3ad80a Fix Tramp scripts
* lisp/net/tramp-sh.el (tramp-shell-file-name-all-completions)
(tramp-bundle-read-file-names): Fix scripts.
2025-06-23 18:00:08 +02:00
Jim Porter
e5ad9ae100 When navigating to anchor targets in EWW, retain 'eww-data' properties
Previously, navigating to an in-page anchor target would clear
'eww-data', removing many important properties like the original source
and the DOM.  Among other things, this prevented enabling/disabling
readable mode.

* lisp/net/eww.el (eww-follow-link): Copy previous 'eww-data'.
2025-06-22 09:29:39 -07:00
Michael Albinus
87fc539a0b Tramp: Cache also file-executable-p' in file-name-all-completions'
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Fix comment.

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Cache also `file-executable-p'.  Suggested by <mail@knazarov.com>.
(tramp-shell-file-name-all-completions): New script.
(tramp-bundle-read-file-names): Fix for special characters.  Cache
also `file-executable-p'.
(tramp-sh-handle-file-name-all-completions): Unify different cases.

* lisp/net/tramp.el (with-tramp-suspended-timers, without-remote-files):
Fix debug spec.
2025-06-22 17:29:52 +02:00
Stephen Berman
79e50ddb9c Fix regression in 'kill-this-buffer' (bug#78809)
This restores the ability to use 'kill-this-buffer' when a
keyboard event pops up the Global Menu.  Instead of raising an
error if the command was not called by a mouse event, an error is
now raised if it was not called from a menu or a tool bar.

* lisp/menu-bar.el (kill-this-buffer): Remove optional EVENT from
argument list and "e" code from interactive spec.  Adjust doc
string.  Use 'last-command-event' to determine if command was
called from a menu or a tool bar.  Use 'event--posn-at-point' in
test for frame.

* lisp/net/eudc-hotlist.el (eudc-hotlist-quit-edit):
* lisp/net/eudc.el (eudc-display-records, eudc-query-form):
* lisp/vc/pcvs.el (cvs-mode-map): Replace uses of
'kill-this-buffer' by 'kill-current-buffer'.
2025-06-17 16:08:32 +02:00
Steven Allen
e1d0ee1b6b mailcap: Treat .ics files as text/calendar
This ensures iCalendar attachments are always displayed correctly
(via `gnus-icalendar-mm-inline'), even when they have an incorrect
MIME type (looking at you Google Calendar).
* lisp/net/mailcap.el (mailcap-mime-extensions): Add a mapping from ".ics"
to "text/calendar".  (Bug#78764)
2025-06-14 17:29:01 +03:00
Philip Kaludercic
1009e3d1fd
Support checking auth-source for NickServ password for rcirc
* doc/misc/rcirc.texi: Mention new feature.
* etc/NEWS: Mention new feature.
* lisp/net/rcirc.el (rcirc-authinfo): Update type and documentation.
(rcirc-authenticate): Handle a special type to indicate that the
password is stored via auth-source.
2025-06-09 15:13:38 +02:00
Philip Kaludercic
2438aaf764
; * lisp/net/rcirc.el (rcirc-channel-p): Simplify implementation 2025-06-09 15:13:38 +02:00
Philip Kaludercic
00a30a752e
Require CertFP files for rcirc to exist
* lisp/net/rcirc.el (rcirc-authinfo): Adjust the types for the
key and certificate file from 'string' to 'file'.
2025-06-09 13:10:13 +02:00
Michael Albinus
7393d7419e Fix Tramp connection property
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
Set "connected" property in time.
2025-06-05 16:29:18 +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
Michael Albinus
30c2ef6d6a Fix bug in `tramp-find-executable'
* lisp/net/tramp-sh.el (tramp-find-executable): Use "command -v",
preserving non-standard PATH search.  Bug#78633)
2025-05-30 12:28:15 +02:00
Eli Zaretskii
ad217dcc46 Merge from origin/emacs-30
661fa578d5 Adapt Tramp version in customize-package-emacs-version-alist
0045a56d55 ; * ChangeLog.5: Delete entry for minor change.
1136aed6dc ; Update ChangeLog and AUTHORS for Emacs 30.2
2025-05-24 06:46:32 -04:00
Stefan Monnier
860a6c86c5 eww.el: Misc changes
* lisp/net/eww.el (eww--parse-html-region): Don't decode when it's a no-op.
(eww-display-raw): Simplify.
(eww-mode): Prefer #' to quote function names.
(eww-switch-to-buffer): Use `completion-table-with-metadata` instead of
`completion-extra-properties`.  Don't prompt the user when there's only
one choice.
(eww-buffer-list): Use `eww--buffer-p`.
2025-05-18 15:48:54 -04:00
Stefan Monnier
168b67b1ee eww.el: Use track-changes
* lisp/net/eww.el: Require `track-changes`.
(eww-display-document): Don't `inhibit-modification-hooks` any more.
Use `track-changes-register` *at the end* instead.
(eww-mode): Don't use `after-change-functions` any more.
(eww--track-changes): New function.
(eww--process-text-input): Rename from `eww-process-text-input`.
Try and be more careful: don't presume `point` is near
the modification.  Check for a form both at BEG and at END.
Don't rely on `:start/:end` pointing to the right places.
Use `:length` instead and shrink the field back to its original length
when possible.
(eww-size-text-inputs): Set `:length` rather than `:start/:end`.
2025-05-18 15:44:35 -04:00
Stefan Monnier
48c66f26c1 lisp/net/eww.el: Remove redundant :group arguments 2025-05-18 15:31:10 -04:00
Michael Albinus
c526646d70 ; Sync with Tramp 2.7.3.30.2 (Do not merge to master)
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2025-05-18 21:20:41 +02:00
Michael Albinus
661fa578d5 Adapt Tramp version in customize-package-emacs-version-alist
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 30.1.
2025-05-18 21:12:41 +02:00
Stefan Monnier
f77f464637 (eww-switch-to-buffer): Don't let-bind completion-extra-properties
* lisp/net/eww.el (eww--buffer-p): New function.
(eww-switch-to-buffer): Use it.  And set `completion-extra-properties`
buffer-locally rather than let-binding it.
2025-05-17 12:34:33 -04:00
Manuel Giraud
719b2fd580 Fix eww-switch-to-buffer' when resorting to eww'
* lisp/net/eww.el (eww-switch-to-buffer): Do not bind
`completion-extra-properties' before calling `eww'.
(bug#78372)
2025-05-17 12:05:30 +03:00
Jens Schmidt
d11570d80e Require key and cert when searching for client cert
* lisp/net/network-stream.el (network-stream-certificate):
Require :key and :cert when searching auth sources for a client
certificate.  (Bug#78189)
2025-05-12 16:52:06 +02:00
Stefan Monnier
66990628b8 lisp/net/browse-url.el (browse-url-interactive-arg): Fix bug#78026
Don't burp when run from a timer where (this-command-keys) will
usually return an empty vector.
2025-05-10 12:05:17 -04: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
Manuel Giraud
013ed9799e Fall back eww-switch-to-buffer' to eww'
* lisp/net/eww.el (eww-switch-to-buffer): When no EWW buffers
exist, call `eww' instead.
(eww-list-buffers): Do not pop to *eww buffers* when there is no
EWW buffers.  (Bug#77967)
2025-05-10 12:46:28 +03:00
Michael Albinus
1a2c29b531 Improve Tramp's make-process handling for Solaris
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Disable buffering also for remote Solaris hosts.
Reported by Stacey Marshall <stacey.marshall@gmail.com>.
2025-05-10 10:05:51 +02:00
Michael Albinus
61de658827 Merge from origin/emacs-30
28a276efe8 Fix quoted local file name parts in Tramp

# Conflicts:
#	lisp/net/tramp.el
2025-05-03 15:05:09 +02:00
Michael Albinus
28a276efe8 Fix quoted local file name parts in Tramp
* lisp/net/tramp.el (tramp-handle-directory-file-name):
* lisp/net/tramp-integration.el (tramp-rfn-eshadow-update-overlay):
Handle quoted local file name part.
2025-05-03 15:00:18 +02:00
Eli Zaretskii
2925ff6c53 Don't override 'revert-buffer-function' globally in 'eww-buffers-mode'
* lisp/net/eww.el (eww-buffers-mode): Set 'revert-buffer-function'
buffer-locally.  (Bug#77854)
2025-04-17 09:25:09 +03:00
Michael Albinus
bb756b195a ; Fix typo in Tramp
* lisp/net/tramp-cache.el (with-tramp-saved-connection-property):
Fix typo.
2025-04-06 09:11:06 +02:00
Eli Zaretskii
54b485ced6 Merge from origin/emacs-30
99d70ce6c2 Fix Tramp problem with loooongish file names
2025-04-05 07:07:29 -04: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
99d70ce6c2 Fix Tramp problem with loooongish file names
* lisp/net/tramp-sh.el (tramp-readlink-file-truename): New defconst.
(tramp-bundle-read-file-names): Use new %m and %q format specifiers.
(tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename'.
(tramp-bundle-read-file-names, tramp-get-remote-readlink): Simplify.
(tramp-expand-script): Add format specifiers %m and %q for test
commands.  Addapt readlink call.
Reported by Stacey Marshall <stacey.marshall@gmail.com>.
2025-04-04 14:29:00 +02:00
Michael Albinus
fd5f817882 Improve Tramp's initial warnings
* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Adapt comment.

* lisp/net/tramp-compat.el (tramp-warning): Declare and use it.

* lisp/net/tramp-message.el (tramp-warning): Declare `indent'.
2025-04-03 14:57:06 +02: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
Stefan Kangas
f60fc1287d Use 'hash-table-contains-p' in a few places
This replaces open coded versions of the common idiom
    (not (eq (gethash key table 'missing) 'missing))
with
    (hash-table-contains-p key table)
in files where we can rely on features in Emacs 31.

* lisp/emacs-lisp/map.el (map-contains-key):
* lisp/external-completion.el (external-completion-table):
* lisp/mh-e/mh-utils.el (mh-sub-folders)
(mh-remove-from-sub-folders-cache):
* lisp/net/ange-ftp.el (ange-ftp-hash-entry-exists-p):
* lisp/password-cache.el (password-in-cache-p, password-cache-add):
* lisp/pcmpl-x.el (pcmpl-x-tlmgr-action-options):
* lisp/xdg.el (xdg-mime-apps): Use 'hash-table-contains-p'.
2025-03-29 14:59:44 +01:00
Stefan Kangas
14cf4d5383 Remove redundant constant nil argument to gethash
* lisp/cedet/ede/files.el (ede--directory-project-from-hash):
* lisp/emacs-lisp/edebug.el (edebug-unwrap*):
* lisp/emacs-lisp/testcover.el (testcover--copy-object1):
* lisp/net/zeroconf.el (zeroconf-get-service, zeroconf-resolve-service)
(zeroconf-register-service-browser, zeroconf-service-browser-handler)
(zeroconf-register-service-resolver):
* lisp/url/url-history.el (url-have-visited-url): Remove redundant
constant nil argument to gethash.
2025-03-29 14:59:09 +01:00
Michael Albinus
2658f4eab9 ; Another Tramp fix
* lisp/net/tramp.el (tramp-skeleton-file-truename):
Remove possible trailing slash.
2025-03-22 17:49:53 +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
Stefan Kangas
69210eb84e Use 'help-key' function in more places
* lisp/dired-aux.el (dired-query):
* lisp/emacs-lisp/helper.el (Helper-help-map):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use 'help-key'.
* lisp/net/tramp-cmds.el (tramp-rename-files):
* lisp/which-key.el (which-key--next-page-hint): Prefer 'help-key'
when available.
* lisp/help.el (help-key): Simplify.
* etc/symbol-releases.eld: Add 'help-key'.
2025-03-18 00:16:29 +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
Stefan Kangas
d8d524071d Use defvar-keymap for some trivial keymaps
* lisp/bindings.el (mode-line-window-dedicated-keymap)
(mode-line-buffer-identification-keymap):
* lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key):
* lisp/mh-e/mh-mime.el (mh-mime-security-button-map):
* lisp/mh-e/mh-utils.el (mh-hidden-header-keymap):
* lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
* lisp/progmodes/etags-regen.el (etags-regen-mode-map):
* lisp/progmodes/octave.el (octave-help-mode-map):
* lisp/replace.el (multi-query-replace-map):
* lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/tab-bar.el (tab-bar-mode-map):
* lisp/textmodes/ispell.el (ispell-minor-keymap):
* lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map):
* lisp/tree-widget.el (tree-widget-button-keymap):
* lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
2025-03-16 13:48:11 +01:00
Michael Albinus
52e49a5616 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-03-15 12:52:37 +01:00