Michael Albinus
52dd3fcf89
Enable Tramp reloading
...
* lisp/net/tramp.el (tramp-file-name): Add ;;;###tramp-autoload
cookie. (Bug#50869)
* test/lisp/net/tramp-tests.el (tramp-test47-unload): Do not skip.
Test reload.
2022-03-17 15:32:01 +01:00
Michael Albinus
22239f2141
Do not cache directories with Tramp sshfs
...
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Add "-o dir_cache=no" to `tramp-mount-args'. (Bug#54126)
2022-03-17 09:09:54 +01:00
Manuel Giraud
6b2e6a53ec
* lisp/net/tramp-sh.el (tramp-find-file-exists-command): Fix comment.
2022-03-16 17:38:18 +01:00
Thomas Fitzsimmons
e56eb02a25
EUDC: Fix a bug and some docstrings
...
* lisp/net/eudc.el (eudc-register-protocol): Add doc string.
(eudc-expand-inline): Add TRY-ALL-SERVERS to docstring.
(eudc-query-with-words): Fix early-return bug reported by
Alexander Adolf.
(eudc-menu): Add doc string.
(eudc-install-menu): Likewise.
2022-03-14 17:36:35 -04:00
Michael Albinus
35f75b63b5
* lisp/net/ange-ftp.el (ange-ftp-ls): Make a loop when sanitizing LSARGS.
2022-03-13 16:50:14 +01:00
Thomas Fitzsimmons
0470a4a939
EUDC: Support querying all servers
...
* lisp/net/eudc.el (eudc-expand-try-all): New command.
(eudc-expand-inline): Add `try-all-servers' optional argument.
Update `eudc-query-with-words' call.
(eudc-query-with-words): Add `try-all-servers' optional argument.
Move response formatting into main query loop. Query next server
if `try-all-servers' is non-nil.
(eudc-tail-menu): Add "Expand Inline Query Trying All Servers"
menu item.
* doc/misc/eudc.texi (Installation): Recommend
eudc-expand-try-all.
(Emacs-only Configuration): Likewise.
(Inline Query Expansion, Inline Query Expansion): Likewise.
Document `eudc-expand-try-all'.
* etc/NEWS (EUDC): Describe new 'eudc-expand-try-all' command.
2022-03-11 18:04:53 -05:00
Thomas Fitzsimmons
190e1fe94b
EUDC: Update save-query-as-kill name and docstring
...
* lisp/net/eudc-vars.el (eudc-server): Fix quoting for checkdoc.
(eudc-expansion-save-query-as-kill): Rename from
`eudc-expansion-overwrites-query'. Define obsolete variable
alias. Update comment and documentation.
* lisp/net/eudc.el (eudc-expand-inline): Rename `replace' argument
to `save-query-as-kill'. Update argument documentation.
* doc/misc/eudc.texi (Inline Query Expansion): Rename
`eudc-expand-inline' argument.
* etc/NEWS (EUDC): Document `eudc-expansion-overwrites-query'
rename to `eudc-expansion-save-query-as-kill'.
2022-03-11 17:40:18 -05:00
Po Lu
61a038bec0
Handle Wayland displays correctly in browse-url
...
* lisp/net/browse-url.el (browse-url-process-environment): Use
WAYLAND_DISPLAY as the display environment variable on
PGTK. (bug#54333)
2022-03-11 16:36:11 +08:00
Michael Albinus
c6e079ae15
Support remote home directories via connection property
...
* doc/misc/tramp.texi (Home directories): New section.
(Top, Usage): Add it to the menue.
(Predefined connection information): Mention "~".
(Multi-hops, File name syntax): Fix typos.
* lisp/net/tramp.el (tramp-handle-expand-file-name): Check for
remote home directory. (Bug#53847)
2022-03-10 12:31:22 +01:00
Michael Albinus
ed543ca3e0
Implement abbreviate-file-name in Tramp for Google drive
...
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-get-home-directory):
Implement for Google drive.
2022-03-08 17:28:30 +01:00
Michael Albinus
d0d7765f23
Handle bug#54294 in Tramp
...
* lisp/net/tramp.el (tramp-handle-file-locked-p, tramp-handle-lock-file):
Use `tramp-system-name'. (Bug#54294)
2022-03-08 08:52:57 +01:00
Michael Albinus
3e4d4f472d
Rework `abbreviate-file-name' in Tramp
...
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.
* lisp/net/tramp-compat.el (tramp-file-name-handler): Declare.
(tramp-compat-exec-path): Use it.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-gvfs-handle-expand-file-name): Rewrite tilde handling.
(tramp-gvfs-handle-get-home-directory): New defun.
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sh-handle-get-home-directory): New defun.
(tramp-sh-handle-expand-file-name): Rewrite tilde handling.
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-smb-handle-expand-file-name): Rewrite tilde handling.
(tramp-smb-handle-get-home-directory): New defun.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'tramp-get-home-directory'.
(tramp-sudoedit-handle-expand-file-name): Rewrite tilde handling.
(tramp-sudoedit-handle-get-home-directory): New defun.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `tramp-get-home-directory'.
(tramp-get-home-directory): New defun.
(tramp-handle-abbreviate-file-name): Use it.
(tramp-set-file-uid-gid, tramp-get-remote-uid)
(tramp-get-remote-gid): Use `tramp-file-name-handler'.
(tramp-get-remote-null-device): Do not check for null VEC, it
doesn't happen anymore.
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name-relative):
Reorder checks.
(tramp-test07-abbreviate-file-name):
(tramp--test-ange-ftp-p): Adapt tests.
2022-03-07 13:42:30 +01:00
Stefan Kangas
8b66adfe06
Merge from origin/emacs-28
...
73f28fbde8 Add a comment for previous browse-url-of-dired-file change
9b74e84857 Restore documented Emacs 27.2 behaviour of browse-url-of-d...
cd77fd3b85 Update to Org 9.5.2-24-g668205
2022-03-07 06:33:56 +01:00
Lars Ingebrigtsen
5324722202
Fix typo in previous browse-url-file-url change
...
* lisp/net/browse-url.el (browse-url-file-url): Fix typo in
previous change.
2022-03-07 05:58:39 +01:00
Lars Ingebrigtsen
73f28fbde8
Add a comment for previous browse-url-of-dired-file change
...
* lisp/net/browse-url.el (browse-url-of-dired-file): Add a comment
for previous change.
2022-03-07 05:15:58 +01:00
Lars Ingebrigtsen
9b74e84857
Restore documented Emacs 27.2 behaviour of browse-url-of-dired-file
...
* lisp/net/browse-url.el (browse-url-of-dired-file): Restore the
documented behaviour -- open a web browser instead of passing to
the various handlers.
2022-03-07 05:13:19 +01:00
Lars Ingebrigtsen
e06319b39d
Fix `W' in Dired with non-ASCII file names
...
* lisp/net/browse-url.el (browse-url--file-name-coding-system):
Factor out into own function.
(browse-url-file-url): Property encode non-ASCII characters so
that external browsers can understand them.
(browse-url-emacs): Make `W' in Dired work with non-ASCII file
names (bug#54271).
2022-03-07 03:28:32 +01:00
Stefan Kangas
2fdc7d5044
Merge from origin/emacs-28
...
a50f8dec09 Follow OpenSSH changes in Tramp
e86eae21a9 Document better how to reset attributes of faces for new f...
2022-02-27 06:31:54 +01:00
Michael Albinus
a50f8dec09
Follow OpenSSH changes in Tramp
...
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Reimplement. OpenSSH has changed its diagnostics messages.
2022-02-26 12:51:26 +01:00
Stefan Kangas
c215158756
Merge from origin/emacs-28
...
ded89ed3fa * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): ...
2022-02-26 06:32:26 +01:00
Michael Albinus
ded89ed3fa
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Adapt test.
2022-02-25 10:11:40 +01:00
Michael Albinus
2db149539b
Fix symlinks in tramp-sshfs.el (Bug#54130)
...
* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Add "-o transform_symlinks" to `tramp-mount-args'.
(tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-file-writable-p'.
(tramp-sshfs-handle-file-writable-p): New defun. (Bug#54130)
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test20-file-modes): Adapt tests.
2022-02-24 16:11:01 +01:00
Lars Ingebrigtsen
5649b45323
Fix compilation warning introduced by previous shr.el change
...
* lisp/net/shr.el (url-file): Fix compilation warning.
2022-02-20 16:14:49 +01:00
Lars Ingebrigtsen
3a6129e723
Make eww work better on Tramp HTML
...
* lisp/net/eww.el (eww-open-file): Use it.
(eww-browse-url): Ditto.
* lisp/net/shr.el (shr-expand-url): Allow loading relative Tramp
files if we're reading from a file:// document.
* lisp/url/url-file.el (url-allow-non-local-files): New user option
(bug#40425).
2022-02-20 16:14:05 +01:00
Lars Ingebrigtsen
aa6d1027ce
Make `g' work in eww buffers displaying Tramp files
...
* lisp/net/eww.el (eww--file-buffer): Refactored out.
(eww-open-file): From here.
(eww-reload): Make reloading work in Tramp files.
2022-02-20 16:14:05 +01:00
Michael Albinus
f462620847
* lisp/net/tramp.el (tramp-read-passwd): Adapt for empty user names.
2022-02-20 14:04:24 +01:00
Philip Kaludercic
5767e06b8e
Revert "; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for"
2022-02-19 22:04:44 +01:00
Philip Kaludercic
43237f3d27
; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for
...
Compare
(benchmark-run 100000 (sit-for 0))
;; => (2.600030102 12 1.523461324000003)
with
(benchmark-run 100000 (sleep-for 0))
;; (0.015882939 0 0.0)
2022-02-19 20:35:01 +01:00
Michael Albinus
7e4ef09aa0
Adapt Tramp password prompts for sudo-like methods
...
* doc/misc/tramp.texi (Password handling): Explain entries for
doas, sudo and sudoedit.
* etc/NEWS (Tramp): Document changed password prompts.
* lisp/net/tramp-sh.el (tramp-methods) <sudo, doas>:
Add `tramp-password-previous-hop'.
(tramp-maybe-open-connection): Modify `previous-hop' if needed.
* lisp/net/tramp-sudoedit.el (tramp-methods) <sudoedit>:
Add `tramp-password-previous-hop'.
(tramp-sudoedit-null-hop): New defconst.
(tramp-sudoedit-send-command): Use it.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-null-hop): New defconst.
(tramp-get-remote-null-device): Use it.
2022-02-19 18:38:12 +01:00
Matthias Meulien
7c99526435
Extend bookmark menu with with handler type column
...
* lisp/bookmark.el (bookmark-bmenu--revert): Extend table entries with
handler type.
(bookmark-bmenu-mode): Add handler type column.
* lisp/doc-view.el (doc-view-bookmark-jump): Set bookmark handler type.
* lisp/help-mode.el (help-bookmark-jump): Set bookmark handler type.
* lisp/image-dired.el (image-dired-bookmark-jump): Set bookmark handler type.
* lisp/info.el (Info-bookmark-jump): Set bookmark handler type.
* lisp/net/eww.el (eww-bookmark-jump): Set bookmark handler type.
* lisp/vc/vc-dir.el (vc-dir-bookmark-jump): Set bookmark handler type.
* lisp/woman.el (woman-bookmark-jump): Set bookmark handler type.
2022-02-17 12:58:12 +01:00
Michael Albinus
3750612093
Fix problem with "~" in Tramp
...
* lisp/net/tramp.el (tramp-handle-substitute-in-file-name):
Remove special handling of "~" in localname. (Bug#53053)
2022-02-17 10:40:52 +01:00
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