summaryrefslogtreecommitdiff
path: root/test/lisp/net
Commit message (Collapse)AuthorAgeFilesLines
* Fix problem in tramp-smb.elMichael Albinus2020-06-231-17/+37
| | | | | | | | | | | | | * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Use `directory-file-name'. * test/lisp/net/tramp-tests.el (trace): Require it. (tramp--test-instrument-test-case): Print also function traces. (tramp--test-smb-p): New defun. (tramp-test03-file-name-method-rules) (tramp-test05-expand-file-name-relative) (tramp-test21-file-links, tramp--test-windows-nt-or-smb-p) (tramp--test-check-files): Use it.
* Fix remaining problems with tramp-crypt.elMichael Albinus2020-06-211-0/+4
| | | | | | | | | | | | | | | | | | * lisp/net/tramp-compat.el (tramp-compat-make-temp-file): Simplify implementation. * lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-file) (tramp-crypt-handle-file-attributes, tramp-crypt-handle-file-system-info) (tramp-crypt-handle-make-directory): Let-bind `tramp-crypt-enabled' to nil. * lisp/net/tramp.el (tramp-file-name-for-operation): Fix for operations with two arguments. (tramp-handle-load): Suppress `signal-hook-function' when NOERROR is non-nil. * test/lisp/net/tramp-tests.el (tramp-test41-utf8) (tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl) (tramp-test41-utf8-with-ls): Skip if needed.
* Various dbus.el cleanups (bug#41744)Basil L. Contovounesios2020-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce removal of aliases obsolete since Emacs 24.3. * lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el. Quote function symbols as such. (dbus-ignore-errors): Don't add macro name to font-lock keywords, as emacs-lisp-mode now dynamically fontifies new macro definitions. (dbus-event-error-hooks, dbus-call-method-non-blocking): Remove aliases obsolete since Emacs 24.3. (dbus-register-signal, dbus-escape-as-identifier): Simplify. Use regexp \` and \' in place of ^ and $. (dbus--parse-xml-buffer): New function for libxml2 compatibility. (dbus-introspect-xml): Use it. (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-unescape-from-identifier, dbus-list-known-names) (dbus-introspect-get-all-nodes, dbus-get-all-properties) (dbus-get-all-managed-objects): Simplify. (dbus--introspect-names, dbus--introspect-name): New convenience functions. (dbus-introspect-get-node-names) (dbus-introspect-get-interface-names) (dbus-introspect-get-interface, dbus-introspect-get-method-names) (dbus-introspect-get-method, dbus-introspect-get-signal-names) (dbus-introspect-get-signal, dbus-introspect-get-property-names) (dbus-introspect-get-property) (dbus-introspect-get-annotation-names) (dbus-introspect-get-annotation) (dbus-introspect-get-argument-names, dbus-introspect-get-argument): Use them to DRY. * test/lisp/net/dbus-tests.el (dbus-test-all): Quote function symbols as such.
* Rearrange detecting remote uid and gid in TrampMichael Albinus2020-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-smb.el (tramp-smb-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-ownership-preserved-p'. (tramp-crypt-add-directory): Check, that NAME is not quoted. (tramp-crypt-handle-file-ownership-preserved-p): New defun. (tramp-crypt-handle-insert-directory): Fix docstring. * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'. (tramp-gvfs-handle-get-remote-uid) (tramp-gvfs-handle-get-remote-gid): Rename from `tramp-gvfs-get-remote-{uid,gid}'. Do not cache result. (tramp-gvfs-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid): Rename from `tramp-get-remote-{uid,gid}'. Do not cache result. (tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP when caching. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-sudoedit-handle-get-remote-uid) (tramp-sudoedit-handle-get-remote-gid): Rename from `tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result. (tramp-sudoedit-handle-set-file-uid-gid) (tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-sudoedit-maybe-open-connection): No special handling for remote uid and gid. * lisp/net/tramp.el (tramp-file-name-for-operation): Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'. (tramp-handle-write-region, tramp-check-cached-permissions): Call `tramp-get-remote-uid' and `tramp-get-remote-gid'. (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. (tramp-local-host-p): Simplify `tramp-get-remote-uid' call. * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards) Skip if needed.
* Further fixes while testing tramp-cryptMichael Albinus2020-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (External methods): Remove experimental note for rclone. (Keeping files encrypted): Mark file encryption as experimental. * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): Use `tramp-handle-file-truename'. (tramp-adb-handle-file-truename): Remove. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `file-writable-p'. (tramp-crypt-send-command): Return t if no error. (tramp-crypt-do-encrypt-or-decrypt-file-name) (tramp-crypt-do-encrypt-or-decrypt-file): Raise an error if it fails. (tramp-crypt-do-copy-or-rename-file): Flush file properties also when copying a directory. (tramp-crypt-handle-file-writable-p): New defun. (tramp-crypt-handle-insert-directory): Check for library `text-property-search'. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-uid-gid): Rename from `tramp-gvfs-set-file-uid-gid'. * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename): Use `tramp-handle-file-truename' as fallback. * lisp/net/tramp.el (tramp-handle-file-truename): Let-bind `tramp-crypt-enabled' to nil. (tramp-handle-write-region): Set also file ownership. * test/lisp/net/tramp-tests.el (tramp-test17-insert-directory): Skip if needed.
* Futher tramp-crypt implementation and documentationMichael Albinus2020-06-101-8/+17
| | | | | | | | | | | | | | | * doc/misc/tramp.texi (Top, Configuration): Insert section `Keeping files encrypted' in menu. (Keeping files encrypted): New node. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `tramp-set-file-uid-gid'. (tramp-crypt-maybe-open-connection): Simplify. (tramp-crypt-do-encrypt-or-decrypt-file): Use `binary' coding system. (tramp-crypt-handle-set-file-uid-gid): New defun. * test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents): Adapt test.
* Continue implementation of tramp-crypt.elMichael Albinus2020-06-091-16/+16
| | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file): Add leading "/" to infile. (tramp-crypt-add-directory): Fix docstring. Expand NAME. (tramp-crypt-remove-directory) (tramp-crypt-handle-file-name-all-completions) (tramp-crypt-handle-set-file-times): New defuns. (tramp-crypt-handle-file-executable-p) (tramp-crypt-handle-file-readable-p) (tramp-crypt-handle-file-system-info) (tramp-crypt-handle-set-file-modes): Fix implementation. * test/lisp/net/tramp-tests.el: Adapt call convention for (tramp--test-crypt-p).
* Add autoload problem in tramp-crypt.el.Michael Albinus2020-06-081-2/+0
| | | | | | | | | | * lisp/net/tramp-crypt.el (tramp-crypt-encfs-config): Add ;;;###tramp-autoload cookie. (tramp-crypt-directories): Move it up. (tramp-crypt-file-name-p): Move it up. Add ;;;###tramp-autoload cookie. Make it a defsubst. * test/lisp/net/tramp-tests.el (tramp-crypt): Do not require.
* * test/lisp/net/tramp-tests.el: tramp-crypt-file-name-p not autoloaded.Glenn Morris2020-06-071-0/+2
|
* Add file encryption to TrampMichael Albinus2020-06-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-crypt.el: New file. * lisp/net/tramp.el (tramp-run-real-handler): Add `tramp-crypt-file-name-handler'. (tramp-register-file-name-handlers): Call `tramp-register-crypt-file-name-handler'. (tramp-handle-insert-file-contents, tramp-local-host-p): Check for `tramp-crypt-enabled' * test/lisp/net/tramp-tests.el (tramp--test-crypt-p): New defun. (tramp-test24-file-acl, tramp-test25-file-selinux) (tramp-test28-process-file, tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test31-interrupt-process) (tramp-test32-shell-command) (tramp-test32-shell-command-dont-erase-buffer) (tramp-test33-environment-variables) (tramp-test33-environment-variables-and-port-numbers) (tramp-test34-explicit-shell-file-name, tramp-test35-exec-path) (tramp-test35-remote-path, tramp-test36-vc-registered) (tramp--test-check-files, tramp-test43-asynchronous-requests): Use it.
* Use lexical-binding in webjump.el and add testsSimen Heggestøyl2020-05-181-0/+73
| | | | | | | * lisp/net/webjump.el: Use lexical-binding. (webjump-read-url-choice): Remove redundant 'function' around lambda. * test/lisp/net/webjump-tests.el: New file with tests for webjump.el.
* Introduce process-file-return-signal-stringMichael Albinus2020-05-161-10/+20
| | | | | | | | | | | | | | | | | | | | * doc/lispref/processes.texi (Synchronous Processes): Describe `process-file-return-signal-string'. * doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers. (Remote processes): Describe `process-file-return-signal-string' and $INSIDE_EMACS. * etc/NEWS: Describe `process-file-return-signal-string'. Fix typos. * lisp/simple.el (process-file-return-signal-string): New user option. * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Use it. * lisp/net/tramp.el (tramp-get-signal-strings): New defun. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
* Fix some oddities, uncovered by Tramp testsMichael Albinus2020-05-131-3/+13
| | | | | | | | | | * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Prevent crash for older Emacsen. * lisp/net/tramp.el (tramp-process-running-p): Simplify. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test. (tramp-test33-environment-variables): Unset "INSIDE_EMACS" initially.
* Suppress test failure on hydra.nixos.orgGlenn Morris2020-05-121-1/+2
| | | | | * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Attempt to suppress hydra oddity.
* Handle signals in Tramp's process-fileMichael Albinus2020-05-071-0/+2
| | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-process-file): * lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Handle signals. * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
* process-file in Tramp must return exit code (Bug#41099)Michael Albinus2020-05-061-0/+1
| | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-send-command-and-check): Add optional argument EXIT-STATUS. (tramp-adb-handle-process-file): Use it. * lisp/net/tramp-sh.el (tramp-send-command-and-check): Add optional argument EXIT-STATUS. (tramp-sh-handle-process-file): Use it. (Bug#41099) * test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
* Adapt Tramp testsMichael Albinus2020-05-041-56/+62
| | | | | * test/lisp/net/tramp-tests.el (tramp-test33-environment-variables): Adapt test.
* Use lexical-binding in puny.el and add more testsStefan Kangas2020-04-281-0/+21
| | | | | | | * lisp/net/puny.el: Use lexical-binding. * test/lisp/net/puny-tests.el (puny-test-encode-domain) (puny-test-decode-domain, puny-highly-restrictive-domain-p): New tests.
* Use lexical-binding in hmac-md5.el and add testsStefan Kangas2020-04-281-0/+80
| | | | | * lisp/net/hmac-md5.el: Use lexical-binding. * test/lisp/net/hmac-md5-tests.el: New file.
* Fix tramp-test32-shell-command-dont-erase-bufferMichael Albinus2020-04-261-18/+134
| | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command-dont-erase-buffer): Adapt test.
* Use lexical-binding in dig.el and add testsStefan Kangas2020-04-261-0/+56
| | | | | | | * lisp/net/dig.el: Use lexical-binding. (dig-program, dig-dns-server, dig-font-lock-keywords): Remove redundant :group args. * test/lisp/net/dig-tests.el: New file.
* Use lexical-binding for all net testsStefan Kangas2020-04-245-5/+5
| | | | | | | | * test/lisp/net/dbus-tests.el: * test/lisp/net/gnutls-tests.el: * test/lisp/net/newsticker-tests.el: * test/lisp/net/puny-tests.el: * test/lisp/net/rfc2104-tests.el: Use lexical-binding.
* * test/lisp/net/tramp-tests.elMichael Albinus2020-04-241-1/+2
| | | | (tramp-test32-shell-command-dont-erase-buffer): Tag it :unstable.
* Merge from origin/emacs-27Glenn Morris2020-04-152-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f7c26907 (origin/emacs-27) * admin/authors.el: Add an author alias. d87a4d1f4e Limit RLIMIT_NOFILE to FD_SETSIZE on macOS e5ca8e5e73 Fix Elisp manual entry on 'set-window-configuration' 485f24223f ; Update ChangeLog.3 8f200254fb ; Update etc/AUTHORS c7adc851ad * admin/authors.el: Add missing author aliases. 4acdd7fe58 Fix edge case errors in filename-matching regexps 5f36e21fe5 Clarify the doc string of 'yank' 13301d4266 New function erc-track-switch-buffer-other-window 38f7538d8f New function erc-switch-to-buffer-other-window # Conflicts: # etc/NEWS
| * Fix edge case errors in filename-matching regexpsMattias Engdegård2020-04-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes fix actual or latent bugs in regexps that match file names, such as PATTERN arguments to 'directory-files'. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * admin/authors.el (authors-obsolete-files-regexps) (authors-renamed-files-regexps): * lisp/auth-source-pass.el (auth-source-pass-entries): * lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file) (todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string) (todo-reset-comment-string, todo-reset-highlight-item): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches): * lisp/cedet/semantic/texi.el (semantic-texi-associated-files): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/dired.el (dired-re-no-dot): * lisp/emacs-lisp/autoload.el (update-directory-autoloads): * lisp/emacs-lisp/shadow.el (load-path-shadows-find): * lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp): * lisp/finder.el (finder-compile-keywords): * lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode) (resolve-conf-generic-mode, etc-modules-conf-generic-mode): * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview) (gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-score.el (gnus-score-search-global-directories): * lisp/gnus/gnus-util.el (gnus-delete-directory): * lisp/gnus/gnus-uu.el (gnus-uu-dir-files): * lisp/gnus/nndraft.el (nndraft-request-group): * lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group): (nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads): * lisp/gnus/nnspool.el (nnspool-request-group): * lisp/gnus/spam-stat.el (spam-stat-process-directory) (spam-stat-test-directory): * lisp/help-fns.el (help-fns--first-release): * lisp/help.el (view-emacs-news): * lisp/international/quail.el (quail-update-leim-list-file): * lisp/international/titdic-cnv.el (batch-titdic-convert): * lisp/mail/mspools.el (mspools-set-vm-spool-files) (mspools-get-spool-files): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-speedbar-match-folder-regexp): * lisp/net/ange-ftp.el (ange-ftp-delete-directory): * lisp/net/tramp.el (tramp-use-absolute-autoload-file-names): * lisp/obsolete/gulp.el (gulp-send-requests): * lisp/obsolete/vc-arch.el (vc-arch-trim-revlib): * lisp/org/ob-core.el (org-babel-remove-temporary-directory): * lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database): * lisp/progmodes/executable.el (executable-command-find-posix-p): * lisp/startup.el (command-line): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/url/url-about.el (url-probe-protocols): * lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test19-directory-files-and-attributes): * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes): Replace ^ and $ with \` and \', respectively. Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to match anything but "." and "..", instead of several incorrect regexps.
* | Fix case that $PATH is longer than 4096 chars in TrampMichael Albinus2020-04-061-51/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-set-remote-path): Use `tramp-send-command' directly. * test/lisp/net/tramp-tests.el (tramp-test-vec): New defconst. (tramp--test-enabled, tramp--test-message) (tramp--test-backtrace, tramp-test03-file-name-host-rules) (tramp-test18-file-attributes, tramp-test20-file-modes) (tramp-test26-file-name-completion) (tramp-test33-environment-variables, tramp-test35-remote-path) (tramp-test36-vc-registered, ) (tramp-test43-asynchronous-requests): Use it. (tramp-test29-start-file-process, tramp-test30-make-process) (tramp-test33-environment-variables): Remove Hydra specific result. (tramp-test35-remote-path): Rewrite partially.
* | Make make-{network,serial}-process handle :coding nil consistentlyRobert Pluim2020-04-031-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of :coding nil was different between make-{network,serial}-process and make-{pipe}process. Now they all handle :coding nil as if :coding had not been specified. * process.c (Fmake_serial_process) (set_network_socket_coding_system): Use plist-get to check if :coding has been specified instead of plist-member, to ensure that ":coding nil" does not override coding-system-for-{read,write}. * network-stream-tests.el (check-network-process-coding-system-bind) (check-network-process-coding-system-no-override) (check-network-process-coding-system-override): New tests. * etc/NEWS: Describe change in make-network-process and make-serial-process :coding behavior.
* | ; * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Instrument.Michael Albinus2020-04-021-1/+2
| |
* | Mark recently failing Tramp tests on hydraGlenn Morris2020-03-301-0/+3
| | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test33-environment-variables): Expect failure on hydra.nixos.org, since March 29 Tramp cache changes.
* | Fix Bug#40156 in TrampMichael Albinus2020-03-211-1/+8
| | | | | | | | | | | | | | * lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Copy to temp file only if FILENAME exists. (Bug#40156) * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.
* | Finish implementation of set-file-times FLAG arg in TrampMichael Albinus2020-03-091-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): Implement FLAG. (tramp-adb-handle-copy-file): Adapt `set-file-times' call. * lisp/net/tramp-compat.el (tramp-compat-set-file-times): New defalias. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes) (tramp-gvfs-handle-set-file-times, tramp-gvfs-set-file-uid-gid): Simplify `tramp-gvfs-url-file-name' call. * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): Implement FLAG. (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-out-of-band): Add optional argument OK-IF-ALREADY-EXISTS. Adapt callees. (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band): Adapt `set-file-times' call. * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file): Adapt `set-file-times' call. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Adapt `set-file-times' call. (tramp-sudoedit-handle-set-file-times): Implement FLAG. * test/lisp/net/tramp-tests.el (tramp-test22-file-times): Extend test.
* | Add ‘nofollow’ flag to set-file-timesPaul Eggert2020-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a companion to the recent set-file-modes patch. It adds support for a ‘nofollow’ flag to set-file-times (Bug#39773). Like the set-file-modes patch, it needs work in the w32 port. * admin/merge-gnulib (GNULIB_MODULES): Add futimens, utimensat. Remove utimens. * doc/lispref/files.texi (Changing Files): * etc/NEWS: Mention the change. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lisp/files.el (copy-directory): * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): * lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): * lisp/net/tramp-smb.el (tramp-smb-handle-copy-file): * lisp/tar-mode.el (tar-copy): * test/lisp/filenotify-tests.el (file-notify-test03-events): * test/lisp/files-tests.el: (files-tests-file-name-non-special-set-file-times): * test/lisp/net/tramp-tests.el (tramp-test22-file-times): When setting file times, avoid following symbolic links when the file is not supposed to be a symbolic link. * lib/futimens.c, lib/utimensat.c, m4/futimens.m4, m4/utimensat.m4: New files, copied from Gnulib. * lisp/gnus/gnus-cloud.el (gnus-cloud-replace-file): When creating a file that is not supposed to exist already, use the excl flag to check this. * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times): Accept an optional FLAG arg that is currently ignored, and add a FIXME comment for it. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times): * src/fileio.c (Fset_file_times): Support an optional FLAG arg. * src/fileio.c (Fcopy_file): Use futimens instead of set_file_times, as it’s simpler and is a POSIX API. * src/sysdep.c (set_file_times): Move from here ... * src/w32.c (set_file_times): ... to here, and make it static, since it is now used only in w32.c. Presumably w32.c should also add support for futimens and utimensat (the POSIX APIs, which Emacs now uses) and it can remove fdutimens (the Gnulib API, which Emacs no longer uses).
* | Finish Tramp's implementation of 'nofollowMichael Albinus2020-02-261-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow. (tramp-adb-handle-set-file-modes): * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Handle FLAG properly. (tramp-get-remote-chmod-h): Adapt implementation. * test/lisp/net/tramp-tests.el (tramp-get-remote-chmod-h): Declare. (tramp--test-ignore-make-symbolic-link-error): Revert last change. (tramp-test20-file-modes): Adapt test.
* | Finish implementation of {set-}file-modes FLAG arg in TrampMichael Albinus2020-02-251-16/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy): Do not use 'nofollow for temporary files. Use `tramp-compat-set-file-modes'. (tramp-adb-handle-write-region): Do not use 'nofollow for temporary files. (tramp-adb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-compat.el (tramp-compat-file-modes) (tramp-compat-set-file-modes): New defaliases. * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes): Make explicit check (eq flag 'nofollow). * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes): Implement FLAG. (tramp-do-copy-or-rename-file-directly) (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): Do not use 'nofollow for temporary files. (tramp-get-remote-chmod-h): New defun. * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes): Implement FLAG. * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes): Implement FLAG. (tramp-sudoedit-handle-write-region): Use `tramp-compat-set-file-modes'. * lisp/net/tramp.el (tramp-default-file-modes): Optional argument FLAG. (tramp-handle-file-modes): Use `file-truename' instead of `file-chase-links'. The latter function does not work for remote file names. (tramp-handle-write-region): Call `tramp-default-file-modes' with 'nofollow if needed. Do not use 'nofollow for temporary files. * test/lisp/net/tramp-tests.el (tramp--test-ignore-make-symbolic-link-error): Check also for "Cannot chmod .* with nofollow flag" error. (tramp-test20-file-modes): Extend test. (tramp--test-emacs28-p): New defun.
* | Fix Tramp tests for MS WindowsMichael Albinus2020-02-141-10/+13
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process): Improve for MS-Windows.
* | Fix `tramp-interrupt-process'Michael Albinus2020-02-131-10/+8
| | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-interrupt-process): Improve command. * test/lisp/net/tramp-tests.el (tramp-test06-directory-file-name) (tramp-test26-file-name-completion): Simplify. (tramp-test31-interrupt-process): Remove :unstable tag.
* | Fix Tramp tests towards *BSDMichael Albinus2020-02-121-14/+33
| | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Declare. (tramp-test18-file-attributes): Check `file-ownership-preserved-p' only if possible. (tramp-test30-make-process): Modify test due to *BSD.
* | Minor fix in tramp-test32-shell-commandMichael Albinus2020-02-051-1/+2
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Set `default-directory'.
* | ; Fix docstring in TrampMichael Albinus2020-02-021-1/+2
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command-dont-erase-buffer): Fix docstring.
* | Implement `shell-command-dont-erase-buffer' in Tramp. (Bug#39067)Michael Albinus2020-02-011-26/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp.el (tramp-handle-shell-command): Handle `shell-command-dont-erase-buffer'. (Bug#39067) * test/lisp/net/tramp-tests.el (shell-command-dont-erase-buffer): Declare. (tramp-test10-write-region, tramp-test21-file-links): Use function symbols. (tramp--test-async-shell-command): Don't assume that `async-shell-command' returns the process object. (tramp-test32-shell-command): Rework `async-shell-command-width' test. (tramp-test32-shell-command-dont-erase-buffer): New test.
* | Fix problems in Tramp's async-shell-commandMichael Albinus2020-01-271-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-cache.el (top): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Use `insert-file-contents-literally'. * lisp/net/tramp.el (tramp-parse-file): Use `insert-file-contents-literally'. (tramp-handle-shell-command): Reorganize error-buffer handling. (tramp-handle-start-file-process): Use `consp' instead of `listp'. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Bind `delete-exited-processes'. (tramp--test-async-shell-command): Bind `delete-exited-processes'. Add additional `accept-process-output'. Move cleanup of output buffer ... (tramp-test32-shell-command): ... here. Test error buffer also for `async-shell-command'.
* | Adapt tramp-test32-shell-commandMichael Albinus2020-01-241-17/+12
| | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Test error buffer for synchronous `shell-command' only.
* | Sync with Tramp 2.5.0-preMichael Albinus2020-01-192-27/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi: Protext Tramp x.y and Emacs x.y by @w{}. (GVFS-based methods): Move "GNOME Online Accounts" index. (Customizing Methods, Android shell setup, File name completion) (Frequently Asked Questions): Fix typos. * doc/misc/trampver.texi: Change version to "2.5.0-pre". * lisp/net/trampver.el: Change version to "2.5.0-pre". (inhibit-message): Don't declare. * lisp/net/tramp.el: Bump version to 2.5.0-pre. Require Emacs 25.1. (tramp-debug-message): Simplify. (tramp-message): Don't use `tramp-message-show-message'. (tramp-with-demoted-errors, with-parsed-tramp-file-name) (with-tramp-file-property, with-tramp-connection-property): Adapt `declare' form. (with-tramp-progress-reporter): Suppress progress reporter when noninteractive. (tramp-completion-mode, tramp-completion-mode-p): Remove. * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (format-message): Remove compatibility code. (tramp-compat-directory-name-p) (tramp-compat-tramp-file-name-slots): Remove. * lisp/net/tramp.el (tramp-debug-message, tramp-message) (tramp-backtrace, tramp-error, tramp-error-with-buffer) (tramp-user-error, tramp-with-demoted-errors) (tramp-signal-hook-function): * lisp/net/tramp-compat.el (tramp-compat-funcall) * lisp/net/tramp-gvfs.el (tramp-dbus-function): Add `tramp-suppress-trace' property. * lisp/net/tramp.el (tramp-get-method-parameter) (tramp-dissect-file-name, tramp-error, tramp-error-with-buffer) (tramp-user-error, with-parsed-tramp-file-name) (with-tramp-progress-reporter, tramp-file-name-handler) (tramp-completion-file-name-handler, tramp-autoload-file-name-handler) (tramp-register-file-name-handlers, tramp-connectable-p) (tramp-handle-file-modes, tramp-handle-file-regular-p) (tramp-handle-file-truename, tramp-handle-insert-directory) (tramp-handle-load, tramp-set-file-uid-gid): * lisp/net/tramp-adb.el (tramp-adb-file-name-handler) (tramp-adb-handle-file-truename, tramp-adb-handle-copy-file) (tramp-adb-handle-rename-file): * lisp/net/tramp-archive.el (with-parsed-tramp-archive-file-name): * lisp/net/tramp-cache.el (tramp-get-file-property, tramp-cache-print): * lisp/net/tramp-compat.el (tramp-compat-process-running-p) (tramp-compat-exec-path): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler) (tramp-gvfs-dbus-byte-array-to-string) (tramp-gvfs-do-copy-or-rename-file): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler) (tramp-rclone-do-copy-or-rename-file): * lisp/net/tramp-sh.el (tramp-sh-handle-file-truename) (tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file) (tramp-sh-handle-insert-directory, tramp-sh-file-name-handler) (tramp-maybe-open-connection): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler) (tramp-smb-handle-copy-file, tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-insert-directory) (tramp-smb-handle-rename-file, tramp-smb-maybe-open-connection): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler) (tramp-sudoedit-do-copy-or-rename-file) (tramp-sudoedit-handle-file-truename): Use `if-let', `when-let', `directory-name-p', `inhibit-message', `non-essential and `cl-struct-slot-info'. Don't use `seconds-to-time'. * test/lisp/net/tramp-archive-tests.el (tramp-message-show-message): Don't set. * test/lisp/net/tramp-tests.el (inhibit-message): Don't declare. (tramp-message-show-message): Don't set. (tramp-test06-directory-file-name): Use `non-essential'. (tramp-test10-write-region): Use `inhibit-message'. (tramp-test36-vc-registered): No special handling for old Emacsen. (tramp--test-emacs25-p): Remove. (tramp-test45-unload): Special case of `tramp-completion-mode'.
* | Add SASL SCRAM-SHA-256 support.Simon Josefsson2020-01-161-2/+24
| | | | | | | | | | | | | | | | * lisp/net/sasl.el (sasl-mechanisms): Add SCRAM-SHA-256. (sasl-mechanism-alist): Ditto. * lisp/net/sasl-scram-sha256.el: New file. * tests/lisp/net/sasl-scram-rfc-tests.el (sasl-scram-sha-256-test): New function.
* | Refactor Tramp async process codeMichael Albinus2020-01-141-88/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Update stderr buffer when process has finished. Do not call `auto-revert'. * test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process): Tag it :unstable. Change `accept-process-output' arguments. (tramp--test-async-shell-command): New defun. (tramp--test-shell-command-to-string-asynchronously): Use it. (tramp-test32-shell-command): Refactor code.
* | Implement stderr in tramp-adb-handle-make-processMichael Albinus2020-01-071-65/+59
| | | | | | | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): Implement `stderr'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Flush connection properties in time. * test/lisp/net/tramp-tests.el (tramp-test30-make-process) (tramp-test32-shell-command): Test asynchronous stderr for tramp-adb.
* | ; Adapt tramp-tests.elMichael Albinus2020-01-061-20/+72
|/ | | | | * test/lisp/net/tramp-tests.el (tramp-test30-make-process): (tramp-test32-shell-command): Extend for asynchronous stderr.
* Update copyright year to 2020Paul Eggert2020-01-0114-14/+14
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Sync with Tramp 2.4.3Michael Albinus2019-12-291-14/+20
| | | | | | | | | | | | * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.4.3". * lisp/net/tramp.el: Bump version. (tramp-handle-shell-command): The temp file for error-buffer is remote. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Simplify buffer generation. (tramp-test32-shell-command): Extend test.
* Extend tramp-tests.el for other host name syntax and file name syntaxMichael Albinus2019-12-221-553/+656
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (inhibit-message) (connection-local-criteria-alist) (connection-local-profile-alist, async-shell-command-width): Declare. (tramp-test01-file-name-syntax) (tramp-test02-file-name-dissect): Set syntax to `default'. (tramp-test03-file-name-defaults) (tramp-test03-file-name-host-rules) (tramp-test03-file-name-method-rules) (tramp-test04-substitute-in-file-name) (tramp-test05-expand-file-name) (tramp-test06-directory-file-name, tramp-test44-auto-load): Skip unless syntax is `default'. (tramp-test06-directory-file-name, tramp-test10-write-region) (tramp-test17-dired-with-wildcards) (tramp-test26-file-name-completion): Handle IPv6 host names. (tramp-test21-file-links): Support all syntaxes. (tramp-test30-make-process, tramp-test45-unload): Suppress compiler warnings. (tramp-test37-make-auto-save-file-name): Skip for `separate' syntax.