1. 12 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Fix a problem with tramp-*-process-file · bfd15953
      Michael Albinus authored
      * 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):
      Use `(expand-file-name default-directory)'.
      bfd15953
  2. 11 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Use `auto-save-file-name-p' in tramp-*-write-region · ad6ad164
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
      Use `auto-save-file-name-p'.
      ad6ad164
  3. 09 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Further cleanup for file locks · 9ce6541a
      Michael Albinus authored
      * doc/misc/tramp.texi (Top, Configuration): Adapt node name for
      file locks.
      (Auto-save File Lock and Backup): Rename node name and section
      title.  Add file-lock to @cindex.  Describe file locks.
      
      * lisp/dired.el (dired-trivial-filenames): Add lock files.
      (dired-font-lock-keywords): Move files suffixed with
      `completion-ignored-extensions' up.  Add lock files to these checks.
      
      * lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
      Use `when-let'
      (tramp-lock-file-info-regexp): Rename from
      `tramp-lock-file-contents-regexp'.
      (tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
      (tramp-handle-lock-file): Set file modes of lockname.
      
      * src/buffer.c (Frestore_buffer_modified_p):
      * src/fileio.c (write_region):
      * src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
      
      * src/filelock.c (Qmake_lock_file_name): Declare symbol.
      (make_lock_file_name): Use it.  Don't check Fboundp, it doesn't
      work for interned symbols.
      (lock_file): Return a Lisp_Object.  Don't check create_lockfiles.
      Remove MSDOS version of the function.
      (Flock_file): Check create_lockfiles.
      (Flock_buffer): Call Flock_file.
      
      * src/lisp.h (lock_file): Remove.
      
      * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
      (shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
      
      * test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
      globally.
      (tramp-test39-lock-file): Check also for `set-visited-file-name'.
      9ce6541a
  4. 08 Jul, 2021 2 commits
    • Michael Albinus's avatar
      Code cleanup wrt file locks · a6a92e3a
      Michael Albinus authored
      * lisp/files.el (make-lock-file-name): Fix docstring.
      
      * 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-crypt.el (tramp-crypt-file-name-handler-alist):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      Add `make-lock-file-name'.
      
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `make-lock-file-name'.
      (tramp-handle-unlock-file): Call `userlock--handle-unlock-error'
      in case of error.
      
      * src/buffer.c (Frestore_buffer_modified_p):
      * src/editfns.c (Freplace_buffer_contents):
      * src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file.
      
      * src/filelock.c (unlock_file): Rename from unlock_file_body.
      Remove the other declarations of unlock_file.  Move file name
      handler check to ...
      (Funlock_file): ... here.  Adapt argument numbers.  Call
      unlock_file wrapped by internal_condition_case.
      (Flock_file): Adapt argument numbers.
      (unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file.
      
      * src/lisp.h (unlock_file): Remove.
      a6a92e3a
    • Michael Albinus's avatar
      Some further adaptions wrt Tramp file name locks · 6d580b00
      Michael Albinus authored
      * lisp/files.el (files--transform-file-name): Rename from
      `auto-save--transform-file-name'.  Wrap with `save-match-data'.
      (make-auto-save-file-name): Use it.
      (make-lock-file-name): Use it.  Call file name handler.
      
      * lisp/net/tramp.el (tramp-handle-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      Suppress file lock for temporary file.
      
      * lisp/net/tramp-compat.el (tramp-compat-make-lock-file-name):
      New defalias.
      
      * lisp/net/tramp.el (tramp-get-lock-file)
      (tramp-handle-lock-file, tramp-handle-unlock-file): Use it.
      (tramp-make-lock-name): Remove.
      
      * test/lisp/filenotify-tests.el (file-notify-test03-events-remote):
      Tag it :unstable temporarily.
      6d580b00
  5. 07 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Implement file locks for remote files (Bug#49261) · d35868be
      Michael Albinus authored
      * doc/lispref/files.texi (Magic File Names): Add file-locked-p,
      lock-file and unlock-file.
      
      * etc/NEWS: Tramp supports file locks now.
      
      * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-adb-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      
      * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
      (tramp-crypt-handle-unlock-file): New defun.
      
      * lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
      (tramp-fuse-unmount): New defun.
      
      * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sh-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-smb-handle-copy-directory): Use `sleep-for'.
      (tramp-smb-handle-write-region): Handle LOCKNAME.
      
      * lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sshfs-handle-write-region): Handle LOCKNAME.
      (tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.
      
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-sudoedit-maybe-open-connection):
      Set "lock-pid" connection property.
      
      * lisp/net/tramp.el (tramp-file-name-for-operation):
      Add `file-locked-p', `lock-file' and `unlock-file'.
      (tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
      (tramp-handle-file-locked-p, tramp-handle-lock-file)
      (tramp-handle-unlock-file): New defuns.
      (tramp-lock-file-contents-regexp): New regexp.
      (tramp-handle-write-region): Handle LOCKNAME.
      
      * src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
      Call handler if exists.
      (Flock_file, Funlock_file): New defuns.
      (Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
      (Slock_file, Sunlock_file): Declare subroutines.
      
      * test/lisp/net/tramp-archive-tests.el
      (tramp-archive-test40-make-nearby-temp-file)
      (tramp-archive-test43-file-system-info): Rename.
      
      * test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
      (tramp--test-fuse-p): New defun.
      (tramp-test14-delete-directory): Use it.
      (tramp-test39-lock-file): New test.
      (tramp-test40-make-nearby-temp-file)
      (tramp-test41-special-characters)
      (tramp-test41-special-characters-with-stat)
      (tramp-test41-special-characters-with-perl)
      (tramp-test41-special-characters-with-ls, tramp-test42-utf8)
      (tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
      (tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
      (tramp-test44-asynchronous-requests, tramp-test45-auto-load)
      (tramp-test45-delay-load, tramp-test45-recursive-load)
      (tramp-test45-remote-load-path, tramp-test46-unload): Rename.
      (tramp--test-special-characters, tramp--test-utf8)
      (tramp--test-asynchronous-requests-timeout): Modify docstring.
      d35868be
  6. 06 Jul, 2021 1 commit
    • Protesilaos Stavrou's avatar
      Add faces for shr heading elements (bug#49433) · 1431fd91
      Protesilaos Stavrou authored
      * etc/NEWS: Document new faces.
      * lisp/net/shr.el (shr-h1, shr-h2, shr-h3, shr-h4, shr-h5, shr-h6):
      Define new faces.
      (shr-tag-h1): Remove inclusion of 'variable-pitch' face.  Fix
      bug#49433 by applying a new face directly.
      (shr-tag-h2, shr-tag-h3, shr-tag-h4, shr-tag-h5, shr-tag-h6): Apply
      new faces.
      1431fd91
  7. 05 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Don't use LOCKNAME for temp files in Tramp (Bug#49406) · 579b0c00
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
      * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
      * lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
      Don't use LOCKNAME for temp file.  (Bug#49406)
      
      * test/lisp/shadowfile-tests.el (password-cache-expiry):
      Set `shadow-debug' also on emba.
      579b0c00
  8. 04 Jul, 2021 1 commit
  9. 02 Jul, 2021 1 commit
    • Michael Albinus's avatar
      Implement another fix for bug#49229 · 225ca617
      Michael Albinus authored
      * lisp/minibuffer.el (read-file-name-default): Respect remote files.
      (Bug#49229)
      
      * lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
      Handle special file names on MS Windows.
      
      * lisp/net/tramp.el (tramp-file-name-handler): Revert patch.
      (Bug#49229)
      225ca617
  10. 30 Jun, 2021 1 commit
  11. 29 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Sync with Tramp 2.5.1 · cd339e85
      Michael Albinus authored
      * doc/misc/trampver.texi:
      * lisp/net/trampver.el: Change version to "2.5.1".
      
      * lisp/tramp.el (tramp-handle-write-region):
      * lisp/tramp-adb.el (tramp-adb-handle-write-region):
      * lisp/tramp-sh.el (tramp-sh-handle-write-region): Call local
      `write-region' directly.
      
      * test/lisp/net/tramp-tests.el (tramp--test-utf8): Adapt test for
      MS Windows.
      cd339e85
  12. 26 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Fix Tramp bug#49229 · d4561201
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-file-name-handler): Drop possible
      volume letter when `expand-file-name' is called with a local
      absolute file name as first argument.  (Bug#49229)
      d4561201
  13. 25 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Fix Tramp bug#49178 · 2fbe17c4
      Michael Albinus authored
      * lisp/net/tramp.el (tramp-handle-find-backup-file-name)
      (tramp-handle-make-auto-save-file-name): Adapt checks.  (Bug#49178)
      2fbe17c4
  14. 24 Jun, 2021 2 commits
  15. 19 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Fix error in tramp-archive.el · 6636a644
      Michael Albinus authored
      * lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
      Archive must exist.  (Bug#49030, Bug#49043)
      
      * test/lisp/net/tramp-archive-tests.el
      (tramp-archive-test06-directory-file-name): Tag it :unstable temporarily.
      6636a644
  16. 14 Jun, 2021 1 commit
    • Michael Albinus's avatar
      Handle sensitive auto-save or backup remote files (Bug#45245) · 6536112b
      Michael Albinus authored
      * doc/misc/tramp.texi (Auto-save and Backup):
      Describe tramp-allow-unsafe-temporary-files.
      (Ad-hoc multi-hops): Use proper format.
      
      * etc/NEWS: Mention confirmation for writing sensitive auto-save
      or backup remote files to the local temporary directory..
      
      * lisp/net/tramp-cache.el (tramp-dump-connection-properties):
      Strengthen test.
      
      * lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): New defcustom.
      (tramp-handle-find-backup-file-name)
      (tramp-handle-make-auto-save-file-name): Don't expose sensible
      auto-save or backup files on local temporary directory.  (Bug#45245)
      
      * test/lisp/net/tramp-tests.el (tramp--test-always): New defalias.
      (tramp-test10-write-region, tramp-test21-file-links)
      (tramp--test--deftest-direct-async-process): Use it.
      (tramp-test37-make-auto-save-file-name)
      (tramp-test38-find-backup-file-name): Extend tests.
      6536112b
  17. 12 Jun, 2021 1 commit
    • Lars Ingebrigtsen's avatar
      Clarify some browse-url doc strings · 099c7a0c
      Lars Ingebrigtsen authored
      * lisp/net/browse-url.el (browse-url-of-file)
      (browse-url-of-buffer, browse-url-of-region, browse-url)
      (browse-url-at-point, browse-url-at-mouse): Clarify doc strings
      (bug#42432).
      099c7a0c
  18. 07 Jun, 2021 2 commits
  19. 06 Jun, 2021 1 commit
  20. 02 Jun, 2021 1 commit
    • Tassilo Horn's avatar
      Allow opening buttonized URL with secondary browser in rcirc · a4887169
      Tassilo Horn authored
      * lisp/net/browse-url.el (browse-url-button-open-url): Add autoload
      cookie.
      * lisp/net/rcirc.el (rcirc-markup-urls): Use
      `browse-url-button-open-url' instead of just `browse-url' in order to
      be able to use the secondary browser by giving a prefix arg.
      a4887169
  21. 01 Jun, 2021 1 commit
  22. 27 May, 2021 1 commit
  23. 23 May, 2021 1 commit
  24. 22 May, 2021 1 commit
    • Michael Albinus's avatar
      Fix bug#48476 · 4db69b32
      Michael Albinus authored
      * lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-handler):
      Add implementation.
      
      * lisp/net/tramp-integration.el (tramp-rename-files)
      (tramp-rename-these-files): Declare them.
      
      * lisp/net/tramp.el (tramp-autoload-file-name-handler):
      Load tramp-archive.el if needed.  (Bug#48476)
      
      * test/lisp/net/tramp-archive-tests.el (tramp-archive-test45-auto-load):
      Extend test.
      
      Use #' syntax for function symbols.
      4db69b32
  25. 18 May, 2021 5 commits
  26. 16 May, 2021 1 commit
  27. 15 May, 2021 3 commits
    • Eli Zaretskii's avatar
      Fix launching net-utils on MS-Windows · 248ec838
      Eli Zaretskii authored
      * lisp/net/net-utils.el (net-utils-run-simple): Bind
      coding-system-for-read around the code which starts the process.
      (Bug#48375)
      248ec838
    • Daniel Semyonov's avatar
      Mairix: use 'mairix-search-options' as documented · b00796ee
      Daniel Semyonov authored
      * lisp/net/mairix.el (mairix-call-mairix): Append
      'mairix-search-options' to the arguments passed to mairix.
      
      Copyright-paperwork-exempt: yes
      b00796ee
    • Daniel Semyonov's avatar
      Mairix: autoload main interactive functions · b1ac6797
      Daniel Semyonov authored
      * lisp/net/mairix.el (mairix-search, mairix-use-saved-search)
      (mairix-edit-saved-searches-customize, mairix-search-from-this-article)
      (mairix-search-thread-this-article, mairix-widget-search-based-on-article)
      (mairix-edit-saved-searches, mairix-widget-search, mairix-update-database):
      Add magic autoload comment.
      
      Copyright-paperwork-exempt: yes
      b1ac6797
  28. 13 May, 2021 1 commit
    • Michael Albinus's avatar
      Improve Tramp traces · c9773379
      Michael Albinus authored
      * lisp/net/tramp-cmds.el (tramp-list-tramp-buffers):
      List also trace buffers.
      
      * lisp/net/tramp.el (tramp-buffer-name):
      Add `tramp-suppress-trace' property.
      (tramp-get-debug-file-name): Fix docstring.
      (tramp-trace-buffer-name): New defun.
      (tramp-trace-functions): New defvar.
      (tramp-debug-message): Obey also `tramp-trace-functions'.
      
      * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
      Handle trace buffer accordingly.
      c9773379
  29. 09 May, 2021 1 commit
    • Michael Albinus's avatar
      Cleanups for Tramp out-of-band methods on MS Windows · 515cac0d
      Michael Albinus authored
      * doc/misc/tramp.texi (Frequently Asked Questions):
      tramp-use-ssh-controlmaster-options is nil on MS Windows.
      
      * lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
      change, it worked (not as expected but) properly.
      
      * test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
      Don't skip on MS Windows.
      (tramp--test-windows-nt-and-scp-p): Remove.
      (tramp--test-special-characters): Skip for out-of-band methods on
      MS Windows, sometimes.
      515cac0d
  30. 07 May, 2021 2 commits
    • Michael Albinus's avatar
      Tramp: Fix file name quoting on MS Windows · 9457d4f2
      Michael Albinus authored
      * lisp/net/tramp-sh.el (tramp-make-copy-program-file-name):
      Use `tramp-unquote-shell-quote-argument'.
      
      * lisp/net/tramp.el (tramp-unquote-shell-quote-argument):
      Adapt for MS Windows.
      
      * test/lisp/net/tramp-tests.el (tramp--test-special-characters):
      Adapt for MS Windows.
      9457d4f2
    • Michael Albinus's avatar
      Fix some annoyances wrt file-name-non-special · f50577ea
      Michael Albinus authored
      * lisp/files.el (file-name-non-special): Do not expand `file-truename'.
      
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
      Use local `default-directory' for `start-process'.
      f50577ea