'display-time-mode'.
---
-** New icon images for general use
-Several symbolic icons are added to etc/images/symbols, including
+** New icon images for general use.
+Several symbolic icons are added to "etc/images/symbols", including
plus, minus, check-mark, start, etc.
+
\f
* Editing Changes in Emacs 30.1
(setopt gdb-locals-table-row-config
`((type . 0) (name . 0) (value . ,gdb-locals-value-limit)))
-** Compile
+** Grep
*** New user option 'grep-use-headings'.
When non-nil, the output of Grep is split into sections, one for each
** Tramp
+++
-*** New connection method "toolbox".
-This allows accessing system containers provided by Toolbox.
+*** New connection methods "toolbox" and "flatpak".
+They allow accessing system containers provided by Toolbox or
+sandboxes provided by Flatpak.
+++
-*** Rename 'tramp-use-ssh-controlmaster-options' to 'tramp-use-connection-share.
-The old name still exists as defvaralias. This user option controls
-now connection sharing for both ssh-based and plink-based methods. It
-allows the values t, nil, and 'suppress'. The latter suppresses
-also "ControlMaster" settings in the user's "~/.ssh/config" file,
-or connection share configuration in PuTTY sessions, respectively.
+*** Rename 'tramp-use-ssh-controlmaster-options' to 'tramp-use-connection-share'.
+The old name still exists as obsolete variable alias. This user
+option controls now connection sharing for both ssh-based and
+plink-based methods. It allows the values t, nil, and 'suppress'.
+The latter suppresses also "ControlMaster" settings in the user's
+"~/.ssh/config" file, or connection share configuration in PuTTY
+sessions, respectively.
** EWW
early aid that relieves you from moving the buffer or reaching for the
mouse to consult an error message.
-** Python mode
+** Python Mode
---
*** New user option 'python-indent-block-paren-deeper'.
;; C-x C-f /kubernetes:POD:/path/to/file
;;
;; Where:
-;; POD is the pod to connect to.
-;; By default, the first container in that pod will be
-;; used.
+;; POD is the pod to connect to.
+;; By default, the first container in that pod will be
+;; used.
;;
;; Completion for POD and accessing it operate in the current
;; namespace, use this command to change it:
;;
;;
;;
-;; Open a file on an existing toolbox container via Toolbox:
+;; Open a file on an existing Toolbox container:
;;
;; C-x C-f /toolbox:CONTAINER:/path/to/file
;;
;;
;; If the container is not running, it is started. If no container is
;; specified, the default Toolbox container is used.
+;;
+;;
+;;
+;; Open a file on a running Flatpak sandbox:
+;;
+;; C-x C-f /flatpak:SANDBOX:/path/to/file
+;;
+;; Where:
+;; SANDBOX is the running sandbox to connect to.
+;; It could be an application ID, an instance ID, or a PID.
;;; Code:
:type '(choice (const "toolbox")
(string)))
+;;;###tramp-autoload
+(defcustom tramp-flatpak-program "flatpak"
+ "Name of the Flatpak client program."
+ :group 'tramp
+ :version "30.1"
+ :type '(choice (const "flatpak")
+ (string)))
+
;;;###tramp-autoload
(defconst tramp-docker-method "docker"
"Tramp method name to use to connect to Docker containers.")
(defconst tramp-toolbox-method "toolbox"
"Tramp method name to use to connect to Toolbox containers.")
+;;;###tramp-autoload
+(defconst tramp-flatpak-method "flatpak"
+ "Tramp method name to use to connect to Flatpak sandboxes.")
+
;;;###tramp-autoload
(defun tramp-container--completion-function (program)
"List running containers available for connection.
lines)))
(mapcar (lambda (name) (list nil name)) (delq nil names))))
+;;;###tramp-autoload
+(defun tramp-flatpak--completion-function (&rest _args)
+ "List Flatpak sandboxes available for connection.
+It returns application IDs or, in case there is no application
+ID, instance IDs.
+
+This function is used by `tramp-set-completion-function', please
+see its function help for a description of the format."
+ (when-let ((default-directory tramp-compat-temporary-file-directory)
+ (raw-list
+ (shell-command-to-string
+ (concat tramp-flatpak-program
+ " ps --columns=instance,application")))
+ (lines (split-string raw-list "\n" 'omit))
+ (names (mapcar
+ (lambda (line)
+ (when (string-match
+ (rx bol (* space) (group (+ (not space)))
+ (? (+ space) (group (+ (not space)))) eol)
+ line)
+ (or (match-string 2 line) (match-string 1 line))))
+ lines)))
+ (mapcar (lambda (name) (list nil name)) (delq nil names))))
+
;;;###tramp-autoload
(defvar tramp-default-remote-shell) ;; Silence byte compiler.
(add-to-list 'tramp-default-host-alist `(,tramp-toolbox-method nil ""))
+ (add-to-list 'tramp-methods
+ `(,tramp-flatpak-method
+ (tramp-login-program ,tramp-flatpak-program)
+ (tramp-login-args (("enter")
+ ("%h")
+ ("%l")))
+ (tramp-direct-async (,tramp-default-remote-shell "-c"))
+ (tramp-remote-shell ,tramp-default-remote-shell)
+ (tramp-remote-shell-login ("-l"))
+ (tramp-remote-shell-args ("-c"))))
+
(tramp-set-completion-function
tramp-docker-method
`((tramp-container--completion-function
(tramp-set-completion-function
tramp-toolbox-method
- '((tramp-toolbox--completion-function ""))))
+ '((tramp-toolbox--completion-function "")))
+
+ (tramp-set-completion-function
+ tramp-flatpak-method
+ '((tramp-flatpak--completion-function "")))
+
+ ;; Default connection-local variables for Tramp.
+
+ (defconst tramp-container-connection-local-default-flatpak-variables
+ `((tramp-remote-path . ,(cons "/app/bin" tramp-remote-path)))
+ "Default connection-local variables for remote flatpak connections.")
+
+ (connection-local-set-profile-variables
+ 'tramp-container-connection-local-default-flatpak-profile
+ tramp-container-connection-local-default-flatpak-variables)
+
+ (connection-local-set-profiles
+ `(:application tramp :protocol ,tramp-flatpak-method)
+ 'tramp-container-connection-local-default-flatpak-profile))
(add-hook 'tramp-unload-hook
(lambda ()