1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add Tramp method "apptainer"

* doc/misc/tramp.texi (Top, Configuration): Add "Optional methods".
(Optional methods): New section.
(Inline methods) <androidsu, toolbox, flatpak>: These are optional
methods.
(Inline methods) <apptainer>: Add.

* etc/NEWS: New Tramp method "apptainer".
Some Tramp methods are optional.
Fix typos.

* lisp/net/tramp-androidsu.el (tramp-enable-androidsu-method):
New defun.  Call it when `system-type' is `android'.

* lisp/net/tramp-container.el (tramp-apptainer-program): New defcustom.
(tramp-apptainer-method): New defconst.
(tramp-apptainer--completion-function)
(tramp-enable-toolbox-method, tramp-enable-flatpak-method)
(tramp-enable-apptainer-method): New defuns.

* lisp/net/tramp.el (tramp-enable-method): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "apptainer".
(tramp--test-supports-processes-p): Extend function.
This commit is contained in:
Michael Albinus 2024-05-07 09:56:05 +02:00
parent 3bc9c38c47
commit 4808c63d43
6 changed files with 242 additions and 106 deletions

View file

@ -1460,6 +1460,15 @@ calling HANDLER.")
;;; Internal functions which must come first:
(defun tramp-enable-method (method)
"Enable optional METHOD if possible."
(interactive "Mmethod: ")
(when-let (((not (assoc method tramp-methods)))
(fn (intern (format "tramp-enable-%s-method" method)))
((functionp fn)))
(funcall fn)
(message "Tramp method \"%s\" enabled" method)))
;; Conversion functions between external representation and
;; internal data structure. Convenience functions for internal
;; data structure.