Michael Albinus
8737d79be8
Fix problem with file-modification-time in tramp-sshfs.el
...
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-handle-file-notify-add-watch',
`tramp-handle-file-notify-rm-watch' and
`tramp-handle-file-notify-valid-p'.
(tramp-sshfs-handle-write-region): Set file modification time.
(Bug#54016)
* test/lisp/net/tramp-tests.el (tramp--test-asynchronous-processes-p):
Filter out tramp-adb on multi-byte `default-directory'.
(tramp--test-hpux-p, tramp--test-macos-p): Protect against errors.
(tramp--test-check-files): Discriminate also tramp-sshfs.el.
2022-02-16 20:22:45 +01:00
Michael Albinus
8415a9d58f
Some Tramp cleanup
...
* doc/misc/tramp.texi (Remote processes): Add also tramp-sshfs.el.
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Error-out for multi-byte `default-directory'.
* lisp/net/tramp.el (tramp-tolerate-tilde): Move it up.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-read-passwd): Show literal passphrase prompt.
2022-02-15 16:15:55 +01:00
Jim Porter
a4dd94de80
Don't attempt to connect to a remote server during 'abbreviate-file-name'
...
* lisp/net/tramp.el (tramp-handle-abbreviate-file-name): Only use the
"home-directory" when a connection has been established.
2022-02-15 08:10:21 -05:00
Michael Albinus
bd07d4fac9
Improve Tramp's process-file implementations
...
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file)
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve implementation. (Bug#53854)
* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp--test-check-files, tramp-test47-unload): Extend tests.
2022-02-13 20:50:51 +01:00
Michael Albinus
bced4d26d9
Tolerate tilde in remote file names when needed
...
* lisp/net/tramp.el (tramp-tolerate-tilde): New defvar.
(tramp-handle-expand-file-name):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
Respect it.
* lisp/net/tramp-adb.el (tramp-adb-tolerate-tilde):
* lisp/net/tramp-sshfs.el (tramp-sshfs-tolerate-tilde): New defuns.
Advice `shell-mode' with them.
(tramp-methods) <sshfs>: Add "-t -t" to `tramp-login-args'.
2022-02-11 09:37:48 +01:00
Michael Albinus
8ababad570
Improve handling of file modes in Tramp
...
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Do not assume that the default
location is owned be the remote uid/gid.
(tramp-gvfs-handle-file-executable-p):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for setuid/setgid bit.
* lisp/net/tramp.el (tramp-check-cached-permissions): Check also
for ?s access type. Check whether remote uid/gid are unknown.
2022-02-10 14:14:06 +01:00
Michael Albinus
f06915c93c
Tilde expansion is not possible for Tramp sshfs method
...
* lisp/net/tramp.el (tramp-handle-expand-file-name):
Tilde expansion is not possible. (Bug#53847)
2022-02-09 17:02:29 +01:00
Michael Albinus
fe37e49a97
Fix processes on remote default-directory with special characters
...
* lisp/net/tramp.el (tramp-handle-make-process): Quote `localname'.
* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Test also remote `default-directory' for processes. (Bug#53846)
2022-02-08 15:45:09 +01:00
Michael Albinus
dfda7d1463
Sanitize ls switches in ange-ftp (bug#53360)
...
* lisp/net/ange-ftp.el (ls-lisp--sanitize-switches): Declare.
(ange-ftp-ls): Sanitize LSARGS. (Bug#53360)
2022-02-07 10:07:15 +01:00
Michael Albinus
49192d1418
Remove superfluous `font-lock-add-keywords' calls in Tramp
...
* lisp/net/tramp.el (with-parsed-tramp-file-name)
(with-tramp-progress-reporter, with-tramp-file-property)
(with-tramp-connection-property, with-tramp-locked-connection):
* lisp/net/tramp-gvfs.el (with-tramp-dbus-call-method)
(with-tramp-dbus-get-all-properties): Do not call
`font-lock-add-keywords' for macros, it isn't needed anymore.
2022-02-05 11:30:20 +01:00
Michael Albinus
3a8e140ad1
Adapt Tramp to changed unload behavior (bug#53632)
...
* lisp/net/tramp.el (tramp-autoload-file-name-handler)
(tramp-register-autoload-file-name-handlers)
(tramp-unload-file-name-handlers, tramp-unload-tramp):
* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp)
(tramp-archive-autoload-file-name-handler)
(tramp-register-archive-file-name-handler):
Add `tramp-autoload' function property.
2022-02-05 11:12:17 +01:00
Stefan Monnier
d52c929e31
(with-demoted-errors): Warn on missing format arg
...
The `format` arg has been mandatory for a while, but the backward
compatibility code that handled the case of a missing `format` arg
made it hard to notice when using the old calling convention.
* lisp/subr.el (with-demoted-errors): Warn on missing `format` arg.
* lisp/emacs-lisp/smie.el (smie-indent--separator-outdent): Don't abuse
`with-demoted-errors`.
(smie-indent-line, smie-auto-fill):
* test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors):
* lisp/vc/vc-hooks.el (vc-refresh-state):
* lisp/vc/vc-annotate.el (vc-annotate-background-mode):
* lisp/vc/diff-mode.el (diff-syntax-fontify-hunk):
* lisp/textmodes/reftex-toc.el (reftex-re-enlarge):
* lisp/progmodes/sh-script.el (sh-smie-sh-rules):
* lisp/progmodes/octave.el (inferior-octave-startup):
* lisp/pcmpl-gnu.el (pcmpl-gnu-make-all-targets):
* lisp/org/org-refile.el (org-refile):
* lisp/org/org-capture.el (org-capture-store-last-position):
* lisp/nxml/nxml-mode.el (nxml-mode):
* lisp/notifications.el (notifications-notify):
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/finder.el (finder-unload-function):
* lisp/files.el (safe-local-variable-p, backup-buffer-copy
* lisp/autorevert.el (auto-revert-notify-handler):
Pass `format` arg to `with-demoted-errors`.
2022-02-04 19:39:53 -05:00
Michael Albinus
37c433e4e2
* lisp/net/tramp-gvfs.el (tramp-gvfs-send-command): Fix problem with locale.
2022-02-04 11:59:56 +01:00
Stefan Kangas
e0260f0fe2
Merge from origin/emacs-28
...
0591aa6cd3 Revert an erroneous change in tramp-cache.el
2022-02-04 06:30:30 +01:00
Michael Albinus
0591aa6cd3
Revert an erroneous change in tramp-cache.el
...
* lisp/net/tramp-cache.el (tramp-get-hash-table):
Use `string-match-p' instead of `string-search'. The latter one
was introduced by accident. Reported by Kai Tetzlaff <kai@tetzlaff.eu>.
2022-02-03 15:30:39 +01:00
Thomas Fitzsimmons
37eef19fd6
soap-client: Add minimum supported Emacs version
...
* lisp/net/soap-client.el: Add Emacs 24.1 to Package-Requires.
Bump version to 3.2.1.
2022-02-03 09:19:03 -05:00
Michael Albinus
895562a8b2
Implement file modification check in Tramp
...
* lisp/net/tramp.el (tramp-handle-lock-file): Check, whether FILE
is modified.
* test/lisp/net/tramp-tests.el (tramp-test39-detect-external-change):
New test.
2022-02-03 14:21:23 +01:00
Mattias Engdegård
3bd8a8bb91
Don't use string-replace in soap-client (bug#53744)
...
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Cease using `string-replace` since it requires Emacs 28.
2022-02-03 12:25:53 +01:00
Mattias Engdegård
1b0342628e
Don't use string-search in soap-client (bug#53744)
...
* lisp/net/soap-client.el (soap-decode-xs-complex-type):
Since soap-client is a core ELPA package and may be used with
Emacs versions older than 28, it cannot use `string-search`;
revert to `string-match`.
2022-02-03 12:17:23 +01:00
Michael Albinus
b085ca237d
Fix insert-file-contents for tramp-crypt
...
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Use `tramp-handle-insert-file-contents'.
2022-01-26 14:05:11 +01:00
Stefan Kangas
1319d108da
Merge from origin/emacs-28
...
6d3608be88 Seccomp: improve support for newer versions of glibc (Bug#...
e58ecd01d5 EUDC: Fix a quoting bug in the BBDB backend
2022-01-23 06:30:31 +01:00
Michael Albinus
6139a05241
Add direct remote copying in Tramp's scp support
...
* doc/misc/tramp.texi: Use @trampfn{} function where possible.
(Top, Configuration): Insert section 'Ssh setup' and remove
section 'Windows setup hints' in menu.
(Default Method): Mention tramp-use-scp-direct-remote-copying.
(Ssh setup): New node.
(Windows setup hints): Move it to that new node.
(Frequently Asked Questions): Move items about ssh config to that node.
* etc/NEWS: Add Tramp's direct remote copying feature. Fix typos.
* lisp/net/tramp-sh.el (tramp-use-scp-direct-remote-copying):
New defcustom.
(tramp-methods) <scp, scpx>: Add "%y" marker.
(tramp-scp-direct-remote-copying): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Extend for direct
remote copying.
* lisp/net/tramp.el (tramp-methods): Extend docstring.
(tramp-password-prompt-not-unique): New defvar.
(tramp-read-passwd): Adapt docstring.
(tramp-read-passwd-without-cache): New defun.
(tramp-action-password): Call it.
2022-01-22 17:12:14 +01:00
Lars Ingebrigtsen
a0e6e67ac1
Fix HTML target marking in shr
...
* lisp/net/shr.el (shr-descend): Use a marker (because we may be
altering the text later for indentation), and mark the start, not
the end of the tag (bug#53409).
(shr-tag-a): Ditto.
2022-01-22 13:14:43 +01:00
Thomas Fitzsimmons
e58ecd01d5
EUDC: Fix a quoting bug in the BBDB backend
...
* lisp/net/eudcb-bbdb.el (eudc-bbdb-query-internal): Fix a quoting
bug introduced during lexical-binding conversion.
2022-01-21 17:47:46 -05:00
Lars Ingebrigtsen
55c1670bc5
Rename the textsec-check function to textsec-suspicious-p
...
* lisp/net/shr.el (shr-tag-a):
* lisp/international/textsec-check.el (textsec-suspicious-p):
* lisp/gnus/message.el (message-send-mail):
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
* etc/NEWS (like):
* doc/lispref/text.texi (Suspicious Text):
(Suspicious Text): Rename the textsec-check function to
textsec-suspicious-p.
2022-01-20 14:33:36 +01:00
Stefan Monnier
f08dfa9b53
Fix menu-bar mouse clicks in "C-h c" and "C-h k" (bug#53322)
...
* lisp/subr.el (event-start, event-end): Handle '(menu-bar)'
events.
* lisp/net/browse-url.el (browse-url-interactive-arg): Simplify
accordingly.
(cherry picked from commit 9ceb3070e3 )
2022-01-20 14:17:16 +02:00
Lars Ingebrigtsen
e58b4b24cf
Add text for suspicious links
...
* lisp/international/textsec-check.el (textsec-check): Note `link'.
(textsec-propertize): Fix typo.
* lisp/international/textsec.el (textsec-link-suspicious-p): New
function.
* lisp/net/shr.el (shr-tag-a): Check for sus links.
2022-01-19 17:50:21 +01:00
Lars Ingebrigtsen
9e9d83482c
Don't overwrite the link text in shr-tag-a for suspicious URLs
...
* lisp/net/shr.el (shr-tag-a): Tweak how the suspiciousness
warning is handled.
2022-01-19 17:17:49 +01:00
Michael Albinus
63a03d5101
; Fix bug#53367
...
* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Handle small buffers. (Bug#53367)
2022-01-19 17:16:08 +01:00
Lars Ingebrigtsen
1bfc086391
Make shr mark links with suspicious URLs
...
* lisp/international/textsec-check.el (textsec-propertize): New
function.
(textsec-check): Only check, don't alter STRING.
* lisp/international/textsec.el (textsec-url-suspicious-p): New
function.
* lisp/net/shr.el (shr-tag-a): Mark suspicious links.
2022-01-19 16:37:05 +01:00
Michael Albinus
86dbe8682d
Respect structure of Tramp archive file names
...
* lisp/net/tramp.el (tramp-make-tramp-file-name):
Respect structure of archive file names.
2022-01-19 09:07:49 +01:00
Michael Albinus
702ce8dc3e
Morka handling of multi-hops in Tramp more consistent
...
* lisp/net/tramp.el (tramp-make-tramp-file-name): Adapt argument list.
Add hops to `tramp-default-proxies-alist'.
(tramp-find-foreign-file-name-handler): Adapt argument list.
(tramp-handle-abbreviate-file-name): Abbreviate multi-hops.
(tramp-handle-file-remote-p): Adapt handling of hops.
(tramp-add-hops): New defun.
(tramp-compute-multi-hops): Use it.
* lisp/net/tramp.el (tramp-make-tramp-hop-name, tramp-get-buffer)
(tramp-file-name-handler, tramp-handle-file-truename)
(tramp-handle-insert-file-contents, tramp-local-host-p)
(tramp-read-passwd, tramp-clear-passwd):
* lisp/net/tramp-archive.el (tramp-archive-dissect-file-name)
(tramp-archive-gvfs-file-name):
* lisp/net/tramp-cache.el (tramp-get-hash-table):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-sh-handle-make-process, tramp-sh-handle-process-file)
(tramp-sh-file-name-handler-p, tramp-get-remote-path):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename):
Adapt callees.
* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test07-abbreviate-file-name): Adapt tests.
2022-01-18 11:27:15 +01:00
Michael Albinus
c9d06d080b
Improve handling of INFILE in tramp*-process-file (Bug#53284)
...
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve handling of INFILE. Fix thinko using
`process-file-side-effects'. (Bug#53284)
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-set-file-times'.
(tramp-sshfs-handle-set-file-times): New defun.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Extend test.
2022-01-17 10:46:58 +01:00
Stefan Kangas
19d681d24b
Merge from origin/emacs-28
...
e488601849 Update to Org 9.5.2-9-g7ba24c
95640360f0 * lisp/net/dictionary.el (dictionary-context-menu): Use pa...
2022-01-16 06:51:09 +01:00
Juri Linkov
95640360f0
* lisp/net/dictionary.el (dictionary-context-menu): Use package prefix.
2022-01-15 20:58:31 +02:00
Tassilo Horn
45f1e427fc
mailcap: Docfix & handle function-viewer case in mailcap-view-file
...
* lisp/net/mailcap.el (mailcap-mime-data): Fix docstring: if viewer is
a symbol/function, it should have zero args and expect the file's
contents to be in the current buffer.
(mailcap-view-file): Implement the case where the chosen viewer is a
function and not a shell command.
2022-01-15 11:27:20 +01:00
Lars Ingebrigtsen
e3b43f6cd8
Fix mailcap setup when no mailcap files exist
...
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Ensure that we
populate mailcap--computed-mime-data even if none of the files
exist (bug#53009).
2022-01-14 09:26:06 +01:00
Stefan Monnier
917a623a9d
Merge remote-tracking branch 'origin/emacs-28' into trunk
2022-01-12 15:57:29 -05:00
Glenn Morris
6998b30115
; Fix typo loose/lose
2022-01-12 10:23:31 -08:00
Michael Albinus
9652736b08
Adapt Tramp for `auth-info-password'
...
* lisp/net/tramp-compat.el (tramp-compat-auth-info-password):
New defalias.
* lisp/net/tramp.el (tramp-read-passwd): Use it.
2022-01-08 13:38:18 +01:00
Sam Steingold
ad5cf84fa7
Add `auth-info-password' and use it instead of ad hoc code
...
* lisp/auth-source.el (auth-info-password):
Extract from `auth-source-pick-first-password'.
(auth-source-pick-first-password, auth-source-secrets-create)
(auth-source-user-and-password): Use `auth-info-password'.
* lisp/erc/erc-services.el (erc-nickserv-get-password):
Use `auth-source-pick-first-password'.
* lisp/erc/erc.el (erc-open, erc-server-join-channel): Likewise.
* lisp/gnus/mail-source.el (mail-source-set-1): Add a comment.
* lisp/gnus/nnimap.el (nnimap-credentials): Use `auth-info-password'.
* lisp/gnus/nntp.el (nntp-send-authinfo): Likewise.
* lisp/mail/rmail.el (rmail-get-remote-password): Likewise.
* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Likewise.
* lisp/net/sieve-manage.el (sieve-sasl-auth): Likewise.
* lisp/net/tramp.el (tramp-read-passwd): Likewise.
* lisp/net/rcirc.el (rcirc): Likewise (fixes a bug: the possibility
that password might be a function was not handled).
2022-01-07 14:48:59 -05:00
Eli Zaretskii
7945d86829
; Fix recent changes in rcirc documentation
...
* doc/misc/rcirc.texi (Changing the time stamp format):
* lisp/net/rcirc.el (rcirc-when): Fix documentation wording.
2022-01-06 18:53:45 +02:00
Philip Kaludercic
0d46683202
Add rcirc-when command
...
* doc/misc/rcirc.texi: Document rcirc-when.
* etc/NEWS: Document rcirc-when.
* lisp/net/rcirc.el (rcirc-when): Add command.
2022-01-06 14:56:23 +01:00
Eli Zaretskii
dcd76bd48d
Merge from origin/emacs-28
...
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year.
86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year
ebe8772f65 ; Minor fixes related to copyright years
23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye...
8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t.
19dcb237b5 ; Add 2022 to copyright years.
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
# lib/cdefs.h
# lisp/erc/erc-dcc.el
# lisp/erc/erc-imenu.el
# lisp/erc/erc-replace.el
# lisp/image-dired.el
# lisp/progmodes/xref.el
# m4/alloca.m4
# m4/byteswap.m4
# m4/errno_h.m4
# m4/getopt.m4
# m4/gnulib-common.m4
# m4/inttypes.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/sys_socket_h.m4
2022-01-01 07:03:03 -05:00
Michael Albinus
86cbc6ee4a
* lisp/net/tramp-sh.el: Adapt copyright year
2022-01-01 12:22:15 +01:00
Eli Zaretskii
19dcb237b5
; Add 2022 to copyright years.
2022-01-01 02:45:51 -05:00
Michael Albinus
db0cab990c
Documentation update for Secret Service
...
* doc/misc/auth.texi (Secret Service API): Precise "session" collection.
* lisp/auth-source.el (auth-sources): Adapt custom label.
* lisp/net/secrets.el: Adjust comments.
2021-12-31 14:36:49 +01:00
Michael Albinus
4ab5b89de8
The temprary "session" collection might not exist in Secret Service
...
* doc/misc/auth.texi (Secret Service API):
* test/lisp/net/secrets-tests.el (secrets--test-delete-all-session-items)
(secrets-test02-collections, secrets-test03-items)
(secrets-test04-search): The temporary "session" collection might
not exist.
* lisp/net/secrets.el (secrets-struct-secret-content-type):
Remove compatibility hack.
(secrets-create-item): Adapt accordingly.
2021-12-27 19:53:00 +01:00
Michael Albinus
01df347947
Use `permission-denied' in Tramp tests, and more
...
* lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
Simplify code.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-system-info):
Adapt for "mtp" method.
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Use `permission-denied' error. Simplify code.
(tramp-test24-file-acl, tramp-test26-file-name-completion):
Simplify code.
2021-12-27 19:51:58 +01:00
Stefan Kangas
fe80d24a0b
* lisp/net/webjump.el: Add TODO section. (Bug#14624)
2021-12-25 16:39:31 +01:00