diff --git a/elpa/archives/gnu/archive-contents b/elpa/archives/gnu/archive-contents index a1e4483a..93513efe 100644 --- a/elpa/archives/gnu/archive-contents +++ b/elpa/archives/gnu/archive-contents @@ -1517,7 +1517,7 @@ ("Phillip Lord" . "phillip.lord@russet.org.uk")) (:url . "http://elpa.gnu.org/packages/persist.html"))]) (phps-mode . - [(0 3 34) + [(0 3 36) ((emacs (26))) "Major mode for PHP with Semantic integration" tar diff --git a/elpa/ein-20200217.1252/ein-k8s.el b/elpa/ein-20200217.1252/ein-k8s.el deleted file mode 100644 index 0644b716..00000000 --- a/elpa/ein-20200217.1252/ein-k8s.el +++ /dev/null @@ -1,171 +0,0 @@ -;;; ein-k8s.el --- hooks to chrisbarrett's kubernetes*.el -*- lexical-binding: t; -*- - -;; Copyright (C) 2019 The Authors - -;; Authors: dickmao - -;; This file is NOT part of GNU Emacs. - -;; ein-k8s.el is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; ein-k8s.el is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with ein-k8s.el. If not, see . - -;;; Commentary: - -;;; Code: - -(require 'kubernetes) - -(defcustom ein:k8s-name-deployment nil - "Regexp by which we recognize jupyter services." - :type 'string - :group 'ein) - -(defcustom ein:k8s-name-service "jupyter-service" - "Regexp by which we recognize jupyter services." - :type 'string - :group 'ein) - -(defun ein:k8s-select-context (&optional query-p) - (interactive "p") - (when (or query-p - (null (kubernetes-state-config (kubernetes-state)))) - (kubernetes-contexts-refresh-now) - (if-let ((contexts (ein:k8s-get-contexts))) - (let ((desired-context - (ein:completing-read "Select context: " contexts nil t))) - (message "Rereading state...") - (kubernetes-state-clear) - (let ((response - (kubernetes-kubectl-await - (apply-partially #'kubernetes-kubectl - kubernetes-props - (kubernetes-state) - (split-string (format "config use-context %s" - desired-context))) - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "Switched to context \"" - (group (+? nonl)) "\"." (* space) eol) - (buffer-string)) - (match-string 1 (buffer-string))))))) - (if (string= response desired-context) - (progn - (kubernetes-state-update-config (kubernetes-kubectl-await-on-async - kubernetes-props - (kubernetes-state) - #'kubernetes-kubectl-config-view)) - (let ((current-name (alist-get - 'name - (kubernetes-state-current-context - (kubernetes-state))))) - (unless (string= current-name desired-context) - (error "ein:k8s-select-context': could not update state for %s" - desired-context)) - (if (kubernetes-nodes-refresh-now) - (progn - (mapc (lambda (resource) - (when-let ((refresh-f - (intern-soft (format "kubernetes-%s-refresh-now" resource)))) - (when (fboundp refresh-f) - (funcall refresh-f)))) - (cl-remove-if (apply-partially #'eq 'nodes) - (mapcar #'car kubernetes-overview-views-alist))) - (message "")) - (error "ein:k8s-select-context: %s is down" current-name)))) - (error "ein:k8s-select-context: use-context returned %s, expected %s" - response desired-context)))) - (error "ein:k8s-select-context: No contexts found")))) - -(defun ein:k8s-get-contexts () - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props - (kubernetes-state) - #'kubernetes-kubectl-config-view))) - (-let* [((&alist 'contexts contexts 'current-context current) response) - (names (--map (alist-get 'name it) (append contexts nil)))] - (when (member current names) - (setq names (cons current (-remove-item current names)))) - names))) - -(defun ein:k8s-get-deployment () - (-let* [(deployments (kubernetes-state-deployments (kubernetes-state))) - ((&alist 'items items) deployments)] - (seq-some (lambda (it) - (-let [(&alist 'metadata (&alist 'name)) it] - (and (string= name ein:k8s-name-deployment) it))) - items))) - -(defun ein:k8s-get-pod () - (when-let ((deployment (ein:k8s-get-deployment))) - (cl-first (kubernetes-overview--pods-for-deployment (kubernetes-state) - deployment)))) -(defun ein:k8s-get-service () - (-let* [(services (kubernetes-state-services (kubernetes-state))) - ((&alist 'items items) services)] - (seq-some (lambda (it) - (-let [(&alist 'metadata (&alist 'name)) it] - (and (string= name ein:k8s-name-service) it))) - items))) - -(defun ein:k8s-get-node () - (-when-let* ((pod (ein:k8s-get-pod)) - ((&alist 'spec (&alist 'nodeName)) pod) - (node (kubernetes-state-lookup-node nodeName (kubernetes-state))) - ((&alist 'metadata (&alist 'name)) node)) - node)) - -(defsubst ein:k8s-ensure () - (and ein:k8s-name-deployment (executable-find kubernetes-kubectl-executable) - (condition-case err - (progn - (ein:k8s-select-context) - (kubernetes-state-current-context (kubernetes-state))) - (error (ein:log 'info "ein:k8s-ensure: %s" (error-message-string err)) - nil)))) - -(defsubst ein:k8s-in-cluster (addr) - "Is ein client inside the k8s cluster?" - (if-let ((ip-command (executable-find "ip"))) - (with-temp-buffer - (apply #'call-process ip-command nil t nil - (split-string (format "n ls %s" addr))) - (goto-char (point-min)) - (search-forward addr nil t)) - ;; hack if ip command not found - (string= "minikube" - (alist-get 'name (kubernetes-state-current-context - (kubernetes-state)))))) - -(defun ein:k8s-service-url-or-port () - (ein:k8s-ensure) - (-when-let* ((service (ein:k8s-get-service)) - ((&alist 'spec (&alist 'ports [(&alist 'nodePort)])) service) - (node (ein:k8s-get-node)) - ((&alist 'status (&alist 'addresses)) node) - (host-ip - (seq-some (lambda (address) - (when (string= (alist-get 'type address) "InternalIP") - (alist-get 'address address))) - addresses))) - (if (ein:k8s-in-cluster host-ip) - (ein:url (concat "http://" host-ip ":" (number-to-string nodePort))) - (when-let ((ips (kubernetes-kubectl-await-command ingress - (lambda (item) - (-let* (((&alist 'status - (&alist 'loadBalancer - (&alist 'ingress - [(&alist 'ip)]))) - item)) - ip))))) - (ein:url (concat "http://" (car ips))))))) - -(provide 'ein-k8s) diff --git a/elpa/ein-20200217.1252/ein-k8s.elc b/elpa/ein-20200217.1252/ein-k8s.elc deleted file mode 100644 index c334c25b..00000000 Binary files a/elpa/ein-20200217.1252/ein-k8s.elc and /dev/null differ diff --git a/elpa/ein-20200217.1252/ein-autoloads.el b/elpa/ein-20200219.1501/ein-autoloads.el similarity index 98% rename from elpa/ein-20200217.1252/ein-autoloads.el rename to elpa/ein-20200219.1501/ein-autoloads.el index 89a9a5cf..f73f538f 100644 --- a/elpa/ein-20200217.1252/ein-autoloads.el +++ b/elpa/ein-20200219.1501/ein-autoloads.el @@ -150,13 +150,6 @@ Log on to a jupyterhub server using PAM authentication. Requires jupyterhub vers (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ein-jupyterhub" '("ein:" "*ein:jupyterhub-connections*"))) -;;;*** - -;;;### (autoloads nil "ein-k8s" "ein-k8s.el" (0 0 0 0)) -;;; Generated autoloads from ein-k8s.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ein-k8s" '("ein:k8s-"))) - ;;;*** ;;;### (autoloads nil "ein-kernel" "ein-kernel.el" (0 0 0 0)) diff --git a/elpa/ein-20200217.1252/ein-cell.el b/elpa/ein-20200219.1501/ein-cell.el similarity index 99% rename from elpa/ein-20200217.1252/ein-cell.el rename to elpa/ein-20200219.1501/ein-cell.el index aa0f2651..6774bc3b 100644 --- a/elpa/ein-20200217.1252/ein-cell.el +++ b/elpa/ein-20200219.1501/ein-cell.el @@ -42,11 +42,11 @@ (require 'ein-kernel) (require 'ein-output-area) -(declare-function mm-encode-buffer "mm-encode") -(declare-function mm-possibly-verify-or-decrypt "mm-decode") -(declare-function mm-dissect-singlepart "mm-decode") -(declare-function mm-display-external "mm-decode") -(declare-function mm-handle-media-type "mm-decode") +(autoload 'mm-encode-buffer "mm-encode") +(autoload 'mm-possibly-verify-or-decrypt "mm-decode") +(autoload 'mm-dissect-singlepart "mm-decode") +(autoload 'mm-display-external "mm-decode") +(autoload 'mm-handle-media-type "mm-decode") (defun ein:cell--ewoc-delete (ewoc &rest nodes) "Delete NODES from EWOC." diff --git a/elpa/ein-20200217.1252/ein-cell.elc b/elpa/ein-20200219.1501/ein-cell.elc similarity index 80% rename from elpa/ein-20200217.1252/ein-cell.elc rename to elpa/ein-20200219.1501/ein-cell.elc index 175735b0..df0e1d97 100644 Binary files a/elpa/ein-20200217.1252/ein-cell.elc and b/elpa/ein-20200219.1501/ein-cell.elc differ diff --git a/elpa/ein-20200217.1252/ein-classes.el b/elpa/ein-20200219.1501/ein-classes.el similarity index 100% rename from elpa/ein-20200217.1252/ein-classes.el rename to elpa/ein-20200219.1501/ein-classes.el diff --git a/elpa/ein-20200217.1252/ein-classes.elc b/elpa/ein-20200219.1501/ein-classes.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-classes.elc rename to elpa/ein-20200219.1501/ein-classes.elc index 1f91f11c..7f541eb7 100644 Binary files a/elpa/ein-20200217.1252/ein-classes.elc and b/elpa/ein-20200219.1501/ein-classes.elc differ diff --git a/elpa/ein-20200217.1252/ein-completer.el b/elpa/ein-20200219.1501/ein-completer.el similarity index 100% rename from elpa/ein-20200217.1252/ein-completer.el rename to elpa/ein-20200219.1501/ein-completer.el diff --git a/elpa/ein-20200217.1252/ein-completer.elc b/elpa/ein-20200219.1501/ein-completer.elc similarity index 95% rename from elpa/ein-20200217.1252/ein-completer.elc rename to elpa/ein-20200219.1501/ein-completer.elc index 3ae325ee..f9772c85 100644 Binary files a/elpa/ein-20200217.1252/ein-completer.elc and b/elpa/ein-20200219.1501/ein-completer.elc differ diff --git a/elpa/ein-20200217.1252/ein-contents-api.el b/elpa/ein-20200219.1501/ein-contents-api.el similarity index 100% rename from elpa/ein-20200217.1252/ein-contents-api.el rename to elpa/ein-20200219.1501/ein-contents-api.el diff --git a/elpa/ein-20200217.1252/ein-contents-api.elc b/elpa/ein-20200219.1501/ein-contents-api.elc similarity index 86% rename from elpa/ein-20200217.1252/ein-contents-api.elc rename to elpa/ein-20200219.1501/ein-contents-api.elc index 5c32e296..c2cf788d 100644 Binary files a/elpa/ein-20200217.1252/ein-contents-api.elc and b/elpa/ein-20200219.1501/ein-contents-api.elc differ diff --git a/elpa/ein-20200217.1252/ein-core.el b/elpa/ein-20200219.1501/ein-core.el similarity index 100% rename from elpa/ein-20200217.1252/ein-core.el rename to elpa/ein-20200219.1501/ein-core.el diff --git a/elpa/ein-20200217.1252/ein-core.elc b/elpa/ein-20200219.1501/ein-core.elc similarity index 91% rename from elpa/ein-20200217.1252/ein-core.elc rename to elpa/ein-20200219.1501/ein-core.elc index b7f1bd1d..778ba434 100644 Binary files a/elpa/ein-20200217.1252/ein-core.elc and b/elpa/ein-20200219.1501/ein-core.elc differ diff --git a/elpa/ein-20200217.1252/ein-dev.el b/elpa/ein-20200219.1501/ein-dev.el similarity index 100% rename from elpa/ein-20200217.1252/ein-dev.el rename to elpa/ein-20200219.1501/ein-dev.el diff --git a/elpa/ein-20200217.1252/ein-dev.elc b/elpa/ein-20200219.1501/ein-dev.elc similarity index 84% rename from elpa/ein-20200217.1252/ein-dev.elc rename to elpa/ein-20200219.1501/ein-dev.elc index da2dc5d4..134cd9ac 100644 Binary files a/elpa/ein-20200217.1252/ein-dev.elc and b/elpa/ein-20200219.1501/ein-dev.elc differ diff --git a/elpa/ein-20200217.1252/ein-events.el b/elpa/ein-20200219.1501/ein-events.el similarity index 100% rename from elpa/ein-20200217.1252/ein-events.el rename to elpa/ein-20200219.1501/ein-events.el diff --git a/elpa/ein-20200217.1252/ein-events.elc b/elpa/ein-20200219.1501/ein-events.elc similarity index 98% rename from elpa/ein-20200217.1252/ein-events.elc rename to elpa/ein-20200219.1501/ein-events.elc index 20f0e579..de421cd3 100644 Binary files a/elpa/ein-20200217.1252/ein-events.elc and b/elpa/ein-20200219.1501/ein-events.elc differ diff --git a/elpa/ein-20200217.1252/ein-file.el b/elpa/ein-20200219.1501/ein-file.el similarity index 100% rename from elpa/ein-20200217.1252/ein-file.el rename to elpa/ein-20200219.1501/ein-file.el diff --git a/elpa/ein-20200217.1252/ein-file.elc b/elpa/ein-20200219.1501/ein-file.elc similarity index 98% rename from elpa/ein-20200217.1252/ein-file.elc rename to elpa/ein-20200219.1501/ein-file.elc index acf3cd3e..d22d9fec 100644 Binary files a/elpa/ein-20200217.1252/ein-file.elc and b/elpa/ein-20200219.1501/ein-file.elc differ diff --git a/elpa/ein-20200217.1252/ein-ipdb.el b/elpa/ein-20200219.1501/ein-ipdb.el similarity index 98% rename from elpa/ein-20200217.1252/ein-ipdb.el rename to elpa/ein-20200219.1501/ein-ipdb.el index 26ccf448..da192187 100644 --- a/elpa/ein-20200217.1252/ein-ipdb.el +++ b/elpa/ein-20200219.1501/ein-ipdb.el @@ -86,12 +86,8 @@ (get-buffer-create (format "*ipdb: %s*" (ein:pdb-session-id session)))) (set (make-local-variable 'ein:ipdb-buffer-active-kernel) (ein:pdb-session-id session)) (set (make-local-variable 'ein:ipdb-buffer-prompt) prompt) - (put 'ein:ipdb-buffer-active-kernel 'permanent-local t) - (put 'ein:ipdb-buffer-prompt 'permanent-local t) (add-hook 'kill-buffer-hook 'ein:ipdb-on-stop) - (ein:ipdb-mode) - (pop-to-buffer (ein:$ipdb-session-buffer session)))) (defun ein:ipdb-on-stop () diff --git a/elpa/ein-20200217.1252/ein-ipdb.elc b/elpa/ein-20200219.1501/ein-ipdb.elc similarity index 96% rename from elpa/ein-20200217.1252/ein-ipdb.elc rename to elpa/ein-20200219.1501/ein-ipdb.elc index 841642f4..12de0aa6 100644 Binary files a/elpa/ein-20200217.1252/ein-ipdb.elc and b/elpa/ein-20200219.1501/ein-ipdb.elc differ diff --git a/elpa/ein-20200217.1252/ein-ipynb-mode.el b/elpa/ein-20200219.1501/ein-ipynb-mode.el similarity index 100% rename from elpa/ein-20200217.1252/ein-ipynb-mode.el rename to elpa/ein-20200219.1501/ein-ipynb-mode.el diff --git a/elpa/ein-20200217.1252/ein-ipynb-mode.elc b/elpa/ein-20200219.1501/ein-ipynb-mode.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-ipynb-mode.elc rename to elpa/ein-20200219.1501/ein-ipynb-mode.elc index 12fd4cd7..fea4086f 100644 Binary files a/elpa/ein-20200217.1252/ein-ipynb-mode.elc and b/elpa/ein-20200219.1501/ein-ipynb-mode.elc differ diff --git a/elpa/ein-20200217.1252/ein-jupyter.el b/elpa/ein-20200219.1501/ein-jupyter.el similarity index 91% rename from elpa/ein-20200217.1252/ein-jupyter.el rename to elpa/ein-20200219.1501/ein-jupyter.el index e9cebd45..9ec335c8 100644 --- a/elpa/ein-20200217.1252/ein-jupyter.el +++ b/elpa/ein-20200219.1501/ein-jupyter.el @@ -26,7 +26,6 @@ (require 'ein-core) (require 'ein-notebooklist) (require 'ein-dev) -(require 'ein-k8s) (defcustom ein:jupyter-use-containers nil "Take EIN in a different direcsh." @@ -122,17 +121,7 @@ with the call to the jupyter notebook." (defun ein:jupyter-process-lines (url-or-port command &rest args) "If URL-OR-PORT registered as a k8s url, preface COMMAND ARGS with `kubectl exec'." (condition-case err - (cond ((-when-let* ((url-or-port url-or-port) - (parsed-url (url-generic-parse-url url-or-port)) - (not-local (not (string= (url-host parsed-url) - ein:url-localhost)))) - (string= url-or-port (ein:k8s-service-url-or-port))) - (let ((pod-name (kubernetes-state-resource-name (ein:k8s-get-pod)))) - (apply #'process-lines kubernetes-kubectl-executable - (nconc - (split-string (format "exec %s -- %s" pod-name command)) - args)))) - (t (apply #'process-lines command args))) + (apply #'process-lines command args) (error (ein:log 'info "ein:jupyter-process-lines: %s" (error-message-string err)) nil))) @@ -238,20 +227,18 @@ our singleton jupyter server process here." ;;;###autoload (defun ein:jupyter-crib-running-servers () "Shell out to jupyter for running servers." - (nconc - (cl-loop for line in - (apply #'ein:jupyter-process-lines nil - ein:jupyter-server-command - (split-string - (format "%s%s %s" - (aif ein:jupyter-server-use-subcommand - (concat it " ") "") - "list" "--json"))) - collecting (destructuring-bind - (&key url &allow-other-keys) - (ein:json-read-from-string line) - (ein:url url))) - (aif (ein:k8s-service-url-or-port) (list it)))) + (cl-loop for line in + (apply #'ein:jupyter-process-lines nil + ein:jupyter-server-command + (split-string + (format "%s%s %s" + (aif ein:jupyter-server-use-subcommand + (concat it " ") "") + "list" "--json"))) + collecting (destructuring-bind + (&key url &allow-other-keys) + (ein:json-read-from-string line) + (ein:url url)))) ;;;###autoload (defun ein:jupyter-server-start (server-command diff --git a/elpa/ein-20200217.1252/ein-jupyter.elc b/elpa/ein-20200219.1501/ein-jupyter.elc similarity index 65% rename from elpa/ein-20200217.1252/ein-jupyter.elc rename to elpa/ein-20200219.1501/ein-jupyter.elc index 2993427d..2db54552 100644 Binary files a/elpa/ein-20200217.1252/ein-jupyter.elc and b/elpa/ein-20200219.1501/ein-jupyter.elc differ diff --git a/elpa/ein-20200217.1252/ein-jupyterhub.el b/elpa/ein-20200219.1501/ein-jupyterhub.el similarity index 100% rename from elpa/ein-20200217.1252/ein-jupyterhub.el rename to elpa/ein-20200219.1501/ein-jupyterhub.el diff --git a/elpa/ein-20200217.1252/ein-jupyterhub.elc b/elpa/ein-20200219.1501/ein-jupyterhub.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-jupyterhub.elc rename to elpa/ein-20200219.1501/ein-jupyterhub.elc index 4a5b221f..2a958d4c 100644 Binary files a/elpa/ein-20200217.1252/ein-jupyterhub.elc and b/elpa/ein-20200219.1501/ein-jupyterhub.elc differ diff --git a/elpa/ein-20200217.1252/ein-kernel.el b/elpa/ein-20200219.1501/ein-kernel.el similarity index 100% rename from elpa/ein-20200217.1252/ein-kernel.el rename to elpa/ein-20200219.1501/ein-kernel.el diff --git a/elpa/ein-20200217.1252/ein-kernel.elc b/elpa/ein-20200219.1501/ein-kernel.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-kernel.elc rename to elpa/ein-20200219.1501/ein-kernel.elc index bddd4894..fb08d2b5 100644 Binary files a/elpa/ein-20200217.1252/ein-kernel.elc and b/elpa/ein-20200219.1501/ein-kernel.elc differ diff --git a/elpa/ein-20200217.1252/ein-kernelinfo.el b/elpa/ein-20200219.1501/ein-kernelinfo.el similarity index 100% rename from elpa/ein-20200217.1252/ein-kernelinfo.el rename to elpa/ein-20200219.1501/ein-kernelinfo.el diff --git a/elpa/ein-20200217.1252/ein-kernelinfo.elc b/elpa/ein-20200219.1501/ein-kernelinfo.elc similarity index 98% rename from elpa/ein-20200217.1252/ein-kernelinfo.elc rename to elpa/ein-20200219.1501/ein-kernelinfo.elc index 6e58bc99..83d0662b 100644 Binary files a/elpa/ein-20200217.1252/ein-kernelinfo.elc and b/elpa/ein-20200219.1501/ein-kernelinfo.elc differ diff --git a/elpa/ein-20200217.1252/ein-kill-ring.el b/elpa/ein-20200219.1501/ein-kill-ring.el similarity index 100% rename from elpa/ein-20200217.1252/ein-kill-ring.el rename to elpa/ein-20200219.1501/ein-kill-ring.el diff --git a/elpa/ein-20200217.1252/ein-kill-ring.elc b/elpa/ein-20200219.1501/ein-kill-ring.elc similarity index 97% rename from elpa/ein-20200217.1252/ein-kill-ring.elc rename to elpa/ein-20200219.1501/ein-kill-ring.elc index ecb66f4e..b1498cbf 100644 Binary files a/elpa/ein-20200217.1252/ein-kill-ring.elc and b/elpa/ein-20200219.1501/ein-kill-ring.elc differ diff --git a/elpa/ein-20200217.1252/ein-log.el b/elpa/ein-20200219.1501/ein-log.el similarity index 100% rename from elpa/ein-20200217.1252/ein-log.el rename to elpa/ein-20200219.1501/ein-log.el diff --git a/elpa/ein-20200217.1252/ein-log.elc b/elpa/ein-20200219.1501/ein-log.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-log.elc rename to elpa/ein-20200219.1501/ein-log.elc index 47510001..608b3312 100644 Binary files a/elpa/ein-20200217.1252/ein-log.elc and b/elpa/ein-20200219.1501/ein-log.elc differ diff --git a/elpa/ein-20200217.1252/ein-markdown-mode.el b/elpa/ein-20200219.1501/ein-markdown-mode.el similarity index 100% rename from elpa/ein-20200217.1252/ein-markdown-mode.el rename to elpa/ein-20200219.1501/ein-markdown-mode.el diff --git a/elpa/ein-20200217.1252/ein-markdown-mode.elc b/elpa/ein-20200219.1501/ein-markdown-mode.elc similarity index 95% rename from elpa/ein-20200217.1252/ein-markdown-mode.elc rename to elpa/ein-20200219.1501/ein-markdown-mode.elc index fa961782..d41db6aa 100644 Binary files a/elpa/ein-20200217.1252/ein-markdown-mode.elc and b/elpa/ein-20200219.1501/ein-markdown-mode.elc differ diff --git a/elpa/ein-20200217.1252/ein-node.el b/elpa/ein-20200219.1501/ein-node.el similarity index 100% rename from elpa/ein-20200217.1252/ein-node.el rename to elpa/ein-20200219.1501/ein-node.el diff --git a/elpa/ein-20200217.1252/ein-node.elc b/elpa/ein-20200219.1501/ein-node.elc similarity index 91% rename from elpa/ein-20200217.1252/ein-node.elc rename to elpa/ein-20200219.1501/ein-node.elc index 11008da2..71fb449d 100644 Binary files a/elpa/ein-20200217.1252/ein-node.elc and b/elpa/ein-20200219.1501/ein-node.elc differ diff --git a/elpa/ein-20200217.1252/ein-notebook.el b/elpa/ein-20200219.1501/ein-notebook.el similarity index 96% rename from elpa/ein-20200217.1252/ein-notebook.el rename to elpa/ein-20200219.1501/ein-notebook.el index 0349da03..a971c741 100644 --- a/elpa/ein-20200217.1252/ein-notebook.el +++ b/elpa/ein-20200219.1501/ein-notebook.el @@ -59,7 +59,7 @@ (require 'ein-notebooklist) (require 'poly-ein) -(declare-function ob-ein-anonymous-p "ob-ein") +(autoload 'ob-ein-anonymous-p "ob-ein") (make-obsolete-variable 'ein:use-smartrep nil "0.17.0") @@ -87,28 +87,6 @@ notebook. For global setting and more information, see (const :tag "Use global setting" nil)) :group 'ein) -(defcustom ein:helm-kernel-history-search-key nil - "Bind `helm-ein-kernel-history' to this key in notebook mode. - -Example:: - - (setq ein:helm-kernel-history-search-key \"\\M-r\") - -This key will be installed in the `ein:notebook-mode-map'." - :type 'boolean - :group 'ein) - -(defcustom ein:anything-kernel-history-search-key nil - "Bind `anything-ein-kernel-history' to this key in notebook mode. - -Example:: - - (setq ein:anything-kernel-history-search-key \"\\M-r\") - -This key will be installed in the `ein:notebook-mode-map'." - :type 'boolean - :group 'ein) - (defcustom ein:notebook-set-buffer-file-name nil "[DEPRECATED] Set `buffer-file-name' of notebook buffer. Currently does nothing." :type 'boolean @@ -169,28 +147,6 @@ And I don't know if I can on account of the dont-save-cells nonsense." ;;; Notebook utility functions -(defun ein:notebook-update-url-or-port (new-url-or-port notebook) - "Change the url and port the notebook is saved to. Calling -this will propagate the change to the kernel, trying to restart -the kernel in the process. Use case for this command is when -the jupyter server dies and restarted on a different port. - -If you have enabled token or password security on server running -at the new url/port, then please be aware that this new url-port -combo must match exactly these url/port you used format -`ein:notebooklist-login'." - (interactive (list - (ein:notebooklist-ask-url-or-port) - (ein:notebook--get-nb-or-error))) - (message "Updating server info and restarting kernel for notebooklist %s" - (ein:$notebook-notebook-name notebook)) - (setf (ein:$notebook-url-or-port notebook) new-url-or-port) - (with-current-buffer (ein:notebook-buffer notebook) - (ein:kernel-retrieve-session (ein:$notebook-kernel notebook)) - (rename-buffer (format ein:notebook-buffer-name-template - (ein:$notebook-url-or-port notebook) - (ein:$notebook-notebook-name notebook))))) - (defun ein:notebook-buffer (notebook) "Return first buffer in NOTEBOOK's worksheets." (aif notebook @@ -1358,17 +1314,7 @@ watch the fireworks!" ;; BODY contains code to execute each time the mode is enabled or disabled. ;; It is executed after toggling the mode, and before running MODE-hook. - (when ein:notebook-mode - (aif ein:helm-kernel-history-search-key - (ein:notebook--define-key ein:notebook-mode-map it helm-ein-kernel-history)) - (aif ein:anything-kernel-history-search-key - (ein:notebook--define-key ein:notebook-mode-map it anything-ein-kernel-history)) - (setq indent-tabs-mode nil) ;; Being T causes problems with Python code. - )) - -;; To avoid MuMaMo to discard `ein:notebook-mode', make it -;; permanent local. -(put 'ein:notebook-mode 'permanent-local t) + ) (defun ein:notebook-fetch-data (notebook callback &optional cbargs) "Fetch data in body tag of NOTEBOOK html page. diff --git a/elpa/ein-20200217.1252/ein-notebook.elc b/elpa/ein-20200219.1501/ein-notebook.elc similarity index 92% rename from elpa/ein-20200217.1252/ein-notebook.elc rename to elpa/ein-20200219.1501/ein-notebook.elc index 184935b2..206a91c7 100644 Binary files a/elpa/ein-20200217.1252/ein-notebook.elc and b/elpa/ein-20200219.1501/ein-notebook.elc differ diff --git a/elpa/ein-20200217.1252/ein-notebooklist.el b/elpa/ein-20200219.1501/ein-notebooklist.el similarity index 96% rename from elpa/ein-20200217.1252/ein-notebooklist.el rename to elpa/ein-20200219.1501/ein-notebooklist.el index 8494db7e..7440c7ac 100644 --- a/elpa/ein-20200217.1252/ein-notebooklist.el +++ b/elpa/ein-20200219.1501/ein-notebooklist.el @@ -78,29 +78,12 @@ :type '(choice (const :tag "Name" :name) (const :tag "Last modified" :last_modified)) :group 'ein) -(make-variable-buffer-local 'ein:notebooklist-sort-field) -(put 'ein:notebooklist-sort-field 'permanent-local t) (defcustom ein:notebooklist-sort-order :ascending "The notebook list sort order." :type '(choice (const :tag "Ascending" :ascending) (const :tag "Descending" :descending)) :group 'ein) -(make-variable-buffer-local 'ein:notebooklist-sort-order) -(put 'ein:notebooklist-sort-order 'permanent-local t) - -(defmacro ein:make-sorting-widget (tag custom-var) - "Create the sorting widget." - ;; assume that custom-var has type `choice' of `const's. - `(widget-create - 'menu-choice :tag ,tag - :value ,custom-var - :notify (lambda (widget &rest _ignore) - (run-at-time 1 nil #'ein:notebooklist-reload) - (setq ,custom-var (widget-value widget))) - ,@(mapcar (lambda (const) - `'(item :tag ,(third const) :value ,(fourth const))) - (rest (custom-variable-type custom-var))))) (define-obsolete-variable-alias 'ein:notebooklist 'ein:%notebooklist% "0.1.2") @@ -160,7 +143,7 @@ Return nil if unclear what, if any, authentication applies." (multiple-value-bind (password-p token) (ein:jupyter-crib-token url-or-port) (multiple-value-bind (my-url-or-port my-token) (ein:jupyter-server-conn-info) (cond ((eq password-p t) (read-passwd (format "Password for %s: " url-or-port))) - ((and (stringp token) (eql password-p :json-false)) token) + ((and (stringp token) (eq password-p :json-false)) token) ((equal url-or-port my-url-or-port) my-token) (t nil))))) @@ -395,10 +378,10 @@ This function is called via `ein:notebook-after-rename-hook'." (cl-defun ein:nblist--sort-group (group by-param order) (sort group #'(lambda (x y) - (cond ((eql order :ascending) + (cond ((eq order :ascending) (string-lessp (plist-get x by-param) (plist-get y by-param))) - ((eql order :descending) + ((eq order :descending) (string-greaterp (plist-get x by-param) (plist-get y by-param))))))) @@ -412,11 +395,12 @@ This function is called via `ein:notebook-after-rename-hook'." (nbs (ein:nblist--sort-group (cdr (assoc "notebook" groups)) sort-param sort-order)) - (files (ein:nblist--sort-group (-flatten-n 1 (-map #'cdr (-group-by - #'(lambda (x) (car (last (s-split "\\." (plist-get x :name))))) - (cdr (assoc "file" groups))))) - sort-param - sort-order))) + (files (ein:nblist--sort-group + (-flatten-n 1 (-map #'cdr (-group-by + #'(lambda (x) (car (last (split-string (plist-get x :name) "\\.")))) + (cdr (assoc "file" groups))))) + sort-param + sort-order))) (-concat dirs nbs files))) (defun render-header (url-or-port &rest args) diff --git a/elpa/ein-20200217.1252/ein-notebooklist.elc b/elpa/ein-20200219.1501/ein-notebooklist.elc similarity index 81% rename from elpa/ein-20200217.1252/ein-notebooklist.elc rename to elpa/ein-20200219.1501/ein-notebooklist.elc index 2357a688..407bc78e 100644 Binary files a/elpa/ein-20200217.1252/ein-notebooklist.elc and b/elpa/ein-20200219.1501/ein-notebooklist.elc differ diff --git a/elpa/ein-20200217.1252/ein-notification.el b/elpa/ein-20200219.1501/ein-notification.el similarity index 100% rename from elpa/ein-20200217.1252/ein-notification.el rename to elpa/ein-20200219.1501/ein-notification.el diff --git a/elpa/ein-20200217.1252/ein-notification.elc b/elpa/ein-20200219.1501/ein-notification.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-notification.elc rename to elpa/ein-20200219.1501/ein-notification.elc index a4b7655e..66c2ade3 100644 Binary files a/elpa/ein-20200217.1252/ein-notification.elc and b/elpa/ein-20200219.1501/ein-notification.elc differ diff --git a/elpa/ein-20200217.1252/ein-output-area.el b/elpa/ein-20200219.1501/ein-output-area.el similarity index 100% rename from elpa/ein-20200217.1252/ein-output-area.el rename to elpa/ein-20200219.1501/ein-output-area.el diff --git a/elpa/ein-20200217.1252/ein-output-area.elc b/elpa/ein-20200219.1501/ein-output-area.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-output-area.elc rename to elpa/ein-20200219.1501/ein-output-area.elc index 2972940d..f6b15cdc 100644 Binary files a/elpa/ein-20200217.1252/ein-output-area.elc and b/elpa/ein-20200219.1501/ein-output-area.elc differ diff --git a/elpa/ein-20200217.1252/ein-pager.el b/elpa/ein-20200219.1501/ein-pager.el similarity index 100% rename from elpa/ein-20200217.1252/ein-pager.el rename to elpa/ein-20200219.1501/ein-pager.el diff --git a/elpa/ein-20200217.1252/ein-pager.elc b/elpa/ein-20200219.1501/ein-pager.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-pager.elc rename to elpa/ein-20200219.1501/ein-pager.elc index df1596cc..3e54f9f0 100644 Binary files a/elpa/ein-20200217.1252/ein-pager.elc and b/elpa/ein-20200219.1501/ein-pager.elc differ diff --git a/elpa/ein-20200217.1252/ein-pkg.el b/elpa/ein-20200219.1501/ein-pkg.el similarity index 51% rename from elpa/ein-20200217.1252/ein-pkg.el rename to elpa/ein-20200219.1501/ein-pkg.el index c688b4d4..f29112fa 100644 --- a/elpa/ein-20200217.1252/ein-pkg.el +++ b/elpa/ein-20200219.1501/ein-pkg.el @@ -1,13 +1,11 @@ -(define-package "ein" "20200217.1252" "Emacs IPython Notebook" +(define-package "ein" "20200219.1501" "Emacs IPython Notebook" '((emacs "25") (websocket "20190620.338") (anaphora "20180618") (request "20200117.0") (deferred "0.5") - (polymode "20190426.1729") - (kubernetes "20200114.0") - (dash "2.13.0") - (s "1.11.0"))) + (polymode "20190714.0") + (dash "2.13.0"))) ;; Local Variables: ;; no-byte-compile: t ;; End: diff --git a/elpa/ein-20200217.1252/ein-process.el b/elpa/ein-20200219.1501/ein-process.el similarity index 97% rename from elpa/ein-20200217.1252/ein-process.el rename to elpa/ein-20200219.1501/ein-process.el index 56f9404a..2d07391f 100644 --- a/elpa/ein-20200217.1252/ein-process.el +++ b/elpa/ein-20200219.1501/ein-process.el @@ -29,7 +29,6 @@ (require 'ein-jupyter) (require 'ein-file) (require 'ein-notebooklist) -(require 'ein-k8s) (defcustom ein:process-jupyter-regexp "\\(jupyter\\|ipython\\)\\(-\\|\\s-+\\)note" "Regexp by which we recognize notebook servers." @@ -209,10 +208,9 @@ is used instead. BUFFER-CALLBACK is called after notebook opened." (defun ein:process-find-file-callback () "A callback function for `find-file-hook' to open notebook." (interactive) - (cl-letf (((symbol-function 'ein:k8s-select-context) #'ignore)) - (-when-let* ((filename buffer-file-name) - (match-p (string-match-p "\\.ipynb$" filename))) - (ein:process-open-notebook filename #'kill-buffer-if-not-modified)))) + (-when-let* ((filename buffer-file-name) + (match-p (string-match-p "\\.ipynb$" filename))) + (ein:process-open-notebook filename #'kill-buffer-if-not-modified))) (provide 'ein-process) diff --git a/elpa/ein-20200217.1252/ein-process.elc b/elpa/ein-20200219.1501/ein-process.elc similarity index 88% rename from elpa/ein-20200217.1252/ein-process.elc rename to elpa/ein-20200219.1501/ein-process.elc index a159d542..670d6ddd 100644 Binary files a/elpa/ein-20200217.1252/ein-process.elc and b/elpa/ein-20200219.1501/ein-process.elc differ diff --git a/elpa/ein-20200217.1252/ein-pytools.el b/elpa/ein-20200219.1501/ein-pytools.el similarity index 100% rename from elpa/ein-20200217.1252/ein-pytools.el rename to elpa/ein-20200219.1501/ein-pytools.el diff --git a/elpa/ein-20200217.1252/ein-pytools.elc b/elpa/ein-20200219.1501/ein-pytools.elc similarity index 98% rename from elpa/ein-20200217.1252/ein-pytools.elc rename to elpa/ein-20200219.1501/ein-pytools.elc index cb632266..202434c1 100644 Binary files a/elpa/ein-20200217.1252/ein-pytools.elc and b/elpa/ein-20200219.1501/ein-pytools.elc differ diff --git a/elpa/ein-20200217.1252/ein-query.el b/elpa/ein-20200219.1501/ein-query.el similarity index 100% rename from elpa/ein-20200217.1252/ein-query.el rename to elpa/ein-20200219.1501/ein-query.el diff --git a/elpa/ein-20200217.1252/ein-query.elc b/elpa/ein-20200219.1501/ein-query.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-query.elc rename to elpa/ein-20200219.1501/ein-query.elc index e702d83f..f34b455a 100644 Binary files a/elpa/ein-20200217.1252/ein-query.elc and b/elpa/ein-20200219.1501/ein-query.elc differ diff --git a/elpa/ein-20200217.1252/ein-scratchsheet.el b/elpa/ein-20200219.1501/ein-scratchsheet.el similarity index 100% rename from elpa/ein-20200217.1252/ein-scratchsheet.el rename to elpa/ein-20200219.1501/ein-scratchsheet.el diff --git a/elpa/ein-20200217.1252/ein-scratchsheet.elc b/elpa/ein-20200219.1501/ein-scratchsheet.elc similarity index 98% rename from elpa/ein-20200217.1252/ein-scratchsheet.elc rename to elpa/ein-20200219.1501/ein-scratchsheet.elc index 347027a3..d5b668cf 100644 Binary files a/elpa/ein-20200217.1252/ein-scratchsheet.elc and b/elpa/ein-20200219.1501/ein-scratchsheet.elc differ diff --git a/elpa/ein-20200217.1252/ein-shared-output.el b/elpa/ein-20200219.1501/ein-shared-output.el similarity index 100% rename from elpa/ein-20200217.1252/ein-shared-output.el rename to elpa/ein-20200219.1501/ein-shared-output.el diff --git a/elpa/ein-20200217.1252/ein-shared-output.elc b/elpa/ein-20200219.1501/ein-shared-output.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-shared-output.elc rename to elpa/ein-20200219.1501/ein-shared-output.elc index 11bf4e91..615ff5eb 100644 Binary files a/elpa/ein-20200217.1252/ein-shared-output.elc and b/elpa/ein-20200219.1501/ein-shared-output.elc differ diff --git a/elpa/ein-20200217.1252/ein-traceback.el b/elpa/ein-20200219.1501/ein-traceback.el similarity index 100% rename from elpa/ein-20200217.1252/ein-traceback.el rename to elpa/ein-20200219.1501/ein-traceback.el diff --git a/elpa/ein-20200217.1252/ein-traceback.elc b/elpa/ein-20200219.1501/ein-traceback.elc similarity index 99% rename from elpa/ein-20200217.1252/ein-traceback.elc rename to elpa/ein-20200219.1501/ein-traceback.elc index c418f645..d832f992 100644 Binary files a/elpa/ein-20200217.1252/ein-traceback.elc and b/elpa/ein-20200219.1501/ein-traceback.elc differ diff --git a/elpa/ein-20200217.1252/ein-utils.el b/elpa/ein-20200219.1501/ein-utils.el similarity index 99% rename from elpa/ein-20200217.1252/ein-utils.el rename to elpa/ein-20200219.1501/ein-utils.el index 1f9c2ea6..8df24bf6 100644 --- a/elpa/ein-20200217.1252/ein-utils.el +++ b/elpa/ein-20200219.1501/ein-utils.el @@ -27,12 +27,10 @@ (require 'cc-mode) (require 'json) -(require 's) (require 'dash) (require 'url) (require 'deferred) - ;;; Macros and core functions/variables (defmacro ein:with-undo-disabled (&rest body) @@ -210,8 +208,7 @@ at point, i.e. any word before then \"(\", if it is present." (setq url-or-port (format "http://localhost:%s" url-or-port))) (let ((parsed-url (url-generic-parse-url url-or-port))) (when (null (url-host parsed-url)) - (setq url-or-port (concat (if (string= url-or-port (ein:k8s-service-url-or-port)) - "http" "https") "://" url-or-port)) + (setq url-or-port (concat "https://" url-or-port)) (setq parsed-url (url-generic-parse-url url-or-port))) (when (or (string= (url-host parsed-url) "localhost") (string= (url-host parsed-url) ein:url-localhost) @@ -685,7 +682,6 @@ Use `ein:log' for debugging and logging." (when ein:enable-gc-adjust (setq gc-cons-threshold current-gc-cons-threshold)))) - ;;; Git utilities (defun ein:call-process (command &optional args) diff --git a/elpa/ein-20200217.1252/ein-utils.elc b/elpa/ein-20200219.1501/ein-utils.elc similarity index 85% rename from elpa/ein-20200217.1252/ein-utils.elc rename to elpa/ein-20200219.1501/ein-utils.elc index d9546bba..d1219ef7 100644 Binary files a/elpa/ein-20200217.1252/ein-utils.elc and b/elpa/ein-20200219.1501/ein-utils.elc differ diff --git a/elpa/ein-20200217.1252/ein-websocket.el b/elpa/ein-20200219.1501/ein-websocket.el similarity index 100% rename from elpa/ein-20200217.1252/ein-websocket.el rename to elpa/ein-20200219.1501/ein-websocket.el diff --git a/elpa/ein-20200217.1252/ein-websocket.elc b/elpa/ein-20200219.1501/ein-websocket.elc similarity index 88% rename from elpa/ein-20200217.1252/ein-websocket.elc rename to elpa/ein-20200219.1501/ein-websocket.elc index d7ad3661..105dbfba 100644 Binary files a/elpa/ein-20200217.1252/ein-websocket.elc and b/elpa/ein-20200219.1501/ein-websocket.elc differ diff --git a/elpa/ein-20200217.1252/ein-worksheet.el b/elpa/ein-20200219.1501/ein-worksheet.el similarity index 100% rename from elpa/ein-20200217.1252/ein-worksheet.el rename to elpa/ein-20200219.1501/ein-worksheet.el diff --git a/elpa/ein-20200217.1252/ein-worksheet.elc b/elpa/ein-20200219.1501/ein-worksheet.elc similarity index 94% rename from elpa/ein-20200217.1252/ein-worksheet.elc rename to elpa/ein-20200219.1501/ein-worksheet.elc index 10d006cb..4301536b 100644 Binary files a/elpa/ein-20200217.1252/ein-worksheet.elc and b/elpa/ein-20200219.1501/ein-worksheet.elc differ diff --git a/elpa/ein-20200217.1252/ein.el b/elpa/ein-20200219.1501/ein.el similarity index 100% rename from elpa/ein-20200217.1252/ein.el rename to elpa/ein-20200219.1501/ein.el diff --git a/elpa/ein-20200217.1252/ein.elc b/elpa/ein-20200219.1501/ein.elc similarity index 95% rename from elpa/ein-20200217.1252/ein.elc rename to elpa/ein-20200219.1501/ein.elc index 13a49619..cb42b685 100644 Binary files a/elpa/ein-20200217.1252/ein.elc and b/elpa/ein-20200219.1501/ein.elc differ diff --git a/elpa/ein-20200217.1252/ob-ein.el b/elpa/ein-20200219.1501/ob-ein.el similarity index 100% rename from elpa/ein-20200217.1252/ob-ein.el rename to elpa/ein-20200219.1501/ob-ein.el diff --git a/elpa/ein-20200217.1252/ob-ein.elc b/elpa/ein-20200219.1501/ob-ein.elc similarity index 99% rename from elpa/ein-20200217.1252/ob-ein.elc rename to elpa/ein-20200219.1501/ob-ein.elc index 768c9f79..d0c67385 100644 Binary files a/elpa/ein-20200217.1252/ob-ein.elc and b/elpa/ein-20200219.1501/ob-ein.elc differ diff --git a/elpa/ein-20200217.1252/poly-ein.el b/elpa/ein-20200219.1501/poly-ein.el similarity index 100% rename from elpa/ein-20200217.1252/poly-ein.el rename to elpa/ein-20200219.1501/poly-ein.el diff --git a/elpa/ein-20200217.1252/poly-ein.elc b/elpa/ein-20200219.1501/poly-ein.elc similarity index 99% rename from elpa/ein-20200217.1252/poly-ein.elc rename to elpa/ein-20200219.1501/poly-ein.elc index 99c1aaa8..c91abfde 100644 Binary files a/elpa/ein-20200217.1252/poly-ein.elc and b/elpa/ein-20200219.1501/poly-ein.elc differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-ast.el b/elpa/kubernetes-20200114.436/kubernetes-ast.el deleted file mode 100644 index 51185f24..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-ast.el +++ /dev/null @@ -1,312 +0,0 @@ -;;; kubernetes-ast.el --- Rendering AST. -*- lexical-binding: t; -*- -;;; Commentary: - -;; Implements an interpreter for a simple layout DSL for magit sections. - -;;; Code: - -(require 'cl-lib) -(require 'magit) -(require 'subr-x) - -;; Derived component support. - -(defconst kubernetes-ast--components (make-hash-table :test #'eq) - "A mapping from the name of a component to its interpretation function. - -When traversing a rendering AST, any list beginning with a symbol -is interpreted as a component reference. That symbol is used to -look up an interpretation function in this table. That function is -applied to any remaining elements of that cons. - -The result of a function in this hash-table should be a new -rendering AST, or a string value to be inserted directly.") - -(defmacro kubernetes-ast-define-component (name arglist &rest body) - "Define a rendering component. - -NAME is the name of the component, which may thereafter be -referenced directly in rendering ASTs. - -ARGLIST is the arguments that must be supplied to construct the -component. - -BODY is the definition of the component." - (declare (indent 2)) - (cl-assert (symbolp name)) - (cl-assert (listp arglist)) - (let ((fname (intern (format "kubernetes-ast--generated--%s" name))) - (docstring (format "Auto-generated component constructor function. - -Creates instances of %s components, which may be referred to as -such in rendering ASTs." name))) - `(progn - (cl-defun ,fname ,arglist ,docstring ,@body) - (puthash ',name #',fname kubernetes-ast--components)))) - -(kubernetes-ast-define-component line (inner-ast) - `(,inner-ast - (padding))) - -(kubernetes-ast-define-component key-value (width key value) - (cl-assert (numberp width) t) - (cl-assert (<= 0 width) t) - (cl-assert (stringp key) t) - (cl-assert (stringp value) t) - (let* ((fmt-string (concat "%-" (number-to-string width) "s")) - (str (concat (propertize (format fmt-string (concat key ": ")) 'face 'magit-header-line) - value))) - (unless (string-blank-p (buffer-substring (line-beginning-position) (line-end-position))) - (newline)) - `(copy-prop ,value (line ,str)))) - -(kubernetes-ast-define-component nav-prop (spec &rest inner-ast) - `(propertize (kubernetes-nav ,spec) - ,inner-ast)) - -(kubernetes-ast-define-component copy-prop (copy-str &rest inner-ast) - (cl-assert (stringp copy-str) t) - `(propertize (kubernetes-copy ,copy-str) - ,inner-ast)) - - -;; Special operations. - -(defun kubernetes-ast-put-delete-mark-on-line-at-pt (point) - (save-excursion - (goto-char point) - (goto-char (line-beginning-position)) - (let* ((existing-props (text-properties-at (point))) - (props (append existing-props '(face kubernetes-delete-mark))) - (mark-str (concat (apply #'propertize "D" props) - (apply #'propertize " " existing-props)))) - (cond - ((member 'kubernetes-delete-mark existing-props) - nil) - ((looking-at-p (rx bol space space)) - (delete-char 2) - (insert mark-str)) - (t - (insert mark-str)))))) - - -;; AST interpreter. - -(defconst kubernetes-ast--indentation-width 2) -(defconst kubernetes-ast--space ?\ ) - -(defsubst kubernetes-ast--indentation (indent-level) - (make-string (* indent-level kubernetes-ast--indentation-width) kubernetes-ast--space)) - -(defsubst kubernetes-ast--eval-string (s indent-level) - (let ((value (if (string-empty-p (buffer-substring (line-beginning-position) (point))) - (concat (kubernetes-ast--indentation indent-level) s) - s))) - (insert value))) - -(defsubst kubernetes-ast--finalize-heading (start-pos) - ;; This implementation is adapted from `magit-insert-heading'. - - ;; Apply heading face if no other face is set. - (let ((heading (buffer-substring start-pos (line-end-position)))) - (unless (next-single-property-change 0 'face (concat "0" heading)) - (add-text-properties start-pos (point) '(face magit-section-heading)))) - (unless (bolp) - (insert ?\n)) - - ;; Update containing section to point to this heading. - (setf (oref magit-insert-section--current content) (point-marker))) - -(defsubst kubernetes-ast--finalize-delete-marks (start-pos) - (let ((end-line (line-number-at-pos))) - (save-excursion - (goto-char start-pos) - (kubernetes-ast-put-delete-mark-on-line-at-pt (point)) - (while (< (line-number-at-pos) end-line) - (kubernetes-ast-put-delete-mark-on-line-at-pt (point)) - (forward-line 1))))) - -(defsubst kubernetes-ast--finalize-list-item (start-pos) - (save-excursion - (goto-char start-pos) - (goto-char (line-beginning-position)) - (skip-chars-forward " ") - (unless (eq (char-after) ?-) - (delete-char -2) - (insert "- ")))) - -(defun kubernetes-ast--append-sentinel (instructions sentinel) - (append (list instructions) (list sentinel))) - -(defun kubernetes-ast-eval (ast &optional indent-level) - "Evaluate AST as a set of instructions for inserting text into the current buffer." - - ;; The evaluator is implemented as a loop over an instruction stack. The - ;; `instruction-stack' variable is a stack of AST instructions, the head of - ;; which is the instruction to interpret. Its initial value is set to the - ;; input to this function. After an instruction is interpreted, the item at - ;; the top of the stack is popped. The loop ends when there are no more - ;; instructions on the stack. - ;; - ;; If nested instructions are encountered in the AST, they are pushed onto the - ;; stack, generally with a sentinel instruction to restore previous - ;; interpreter state. - - (let ((instruction-stack (list ast)) - (indent-level (or indent-level 0))) - - (while instruction-stack - (pcase (car instruction-stack) - - ;; Strings are inserted directly, possibly with indentation. - - ((and (pred stringp) s) - (kubernetes-ast--eval-string s indent-level) - (!cdr instruction-stack)) - - ;; Padding gets some special error checking to make sure it has no inner - ;; AST, since I get `padding' and `indent' mixed up all the time. - - ((and `(padding . ,_rest) (guard _rest)) - (error "Padding takes no arguments")) - (`(padding) - (newline) - (!cdr instruction-stack)) - - ;; Indentation - ;; - ;; The current indentation level is tracked by the interpreter. When an - ;; `indent' directive is encountered, the indent level is incremented - ;; and the inner AST is pushed to the stack with a sentinel appended. - ;; When the sentinel is encountered, the indentation level is decreased. - - (`(indent . ,inner-ast) - (let ((next (kubernetes-ast--append-sentinel inner-ast 'kubernetes-ast--indent-sentinel))) - (setq indent-level (1+ indent-level)) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`kubernetes-ast--indent-sentinel - (setq indent-level (1- indent-level)) - (!cdr instruction-stack)) - - ;; Properties - ;; - ;; To propertize some inserted text, the inner AST is pushed to the - ;; stack with a sentinel appended. The sentinel records the properties - ;; to apply and the start position of the span. Once the sentinel is - ;; encountered, the end position of the span is known and properties can - ;; be applied. - - (`(propertize ,spec . ,inner-ast) - (let ((next (kubernetes-ast--append-sentinel inner-ast `(kubernetes-ast--propertize-sentinel ,(point) ,spec)))) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`(kubernetes-ast--propertize-sentinel ,start ,spec) - (add-text-properties start (point) spec) - (!cdr instruction-stack)) - - ;; Deletion marks - ;; - ;; Deletion marks are applied to every line of the inner AST, so the - ;; inner AST is pushed to the stack with a sentinel that records the - ;; start position. Once the sentinel is encountered, the range of lines - ;; that must be modified is known and the marks are written. - - (`(mark-for-delete . ,inner-ast) - (let ((next (kubernetes-ast--append-sentinel inner-ast `(kubernetes-ast--mark-for-delete-sentinel . ,(point))))) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`(kubernetes-ast--mark-for-delete-sentinel . ,start) - (kubernetes-ast--finalize-delete-marks start) - (!cdr instruction-stack)) - - ;; Bulleted lists - ;; - ;; A bulleted list is decomposed into a sequence of instructions, each - ;; of which tracks its buffer positions using sentinel values. - ;; - ;; The bullet group is indented, and each item's start position is - ;; recorded in a sentinel value. When an item's sentinel is encountered, - ;; the item's dash is written to the buffer. - - (`(list . ,items) - (let ((next `(indent ,@(--map `(kubernetes-ast--list-item . ,it) items)))) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`(kubernetes-ast--list-item . ,inner-ast) - (let ((next (kubernetes-ast--append-sentinel inner-ast `(kubernetes-ast--list-item-sentinel . ,(point))))) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`(kubernetes-ast--list-item-sentinel . ,start) - (kubernetes-ast--finalize-list-item start) - (!cdr instruction-stack)) - - ;; Headings - ;; - ;; Heading insertion requires interpretation of an inner AST to build - ;; the heading text. A special sentinel is appended to the inner AST - ;; that tells the interpreter to finalise the heading after interpreting - ;; the inner value. - - (`(heading ,inner-ast) - (unless magit-insert-section--current (error "Eval AST: Inserting a heading, but not in a section")) - (let ((next (kubernetes-ast--append-sentinel inner-ast `(kubernetes-ast--heading-sentinel . ,(point))))) - (!cdr instruction-stack) - (!cons next instruction-stack))) - - (`(kubernetes-ast--heading-sentinel . ,start-pos) - (kubernetes-ast--finalize-heading start-pos) - (!cdr instruction-stack)) - - ;; Sections - ;; - ;; KLUDGE: The section insertion logic in magit has complex state. It's - ;; easier just to evaluate recursively than try to reproduce that logic - ;; in the interpreter. This is safe so long as section nesting doesn't - ;; approach `max-lisp-eval-depth'. - - (`(section (,sym ,hide) . ,inner) - (!cdr instruction-stack) - (eval `(magit-insert-section (,sym nil ,hide) - (kubernetes-ast-eval ',inner ,indent-level)))) - - ;; Custom components - ;; - ;; If the current instruction is a list and its head is a symbol, look - ;; it up in the component definition table. If the lookup succeeds, - ;; evaluate the component's constructor function to derive an AST, and - ;; push that AST onto the stack. - - ((and `(,component . ,args) - (guard component) - (guard (symbolp component))) - (!cdr instruction-stack) - (if-let (constructor (gethash component kubernetes-ast--components)) - (!cons (apply constructor args) instruction-stack) - (error "Component not defined: %s" component))) - - ;; Lists of instructions - ;; - ;; If the list being scrutinised does not begin with a symbol, it is - ;; assumed to be a sequence of instructions. The items are pushed to the - ;; stack. - - ((and (pred listp) actions) - (!cdr instruction-stack) - (setq instruction-stack (append actions instruction-stack))) - - ;; Heck, you've done the interpreter a frighten. - - (other - (message "Stack: %s" instruction-stack) - (error "Unknown AST instruction: %s" other)))))) - - -(provide 'kubernetes-ast) - -;;; kubernetes-ast.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-ast.elc b/elpa/kubernetes-20200114.436/kubernetes-ast.elc deleted file mode 100644 index f93636bf..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-ast.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-autoloads.el b/elpa/kubernetes-20200114.436/kubernetes-autoloads.el deleted file mode 100644 index 67001e71..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-autoloads.el +++ /dev/null @@ -1,518 +0,0 @@ -;;; kubernetes-autoloads.el --- automatically extracted autoloads -;; -;;; Code: - -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) - - -;;;### (autoloads nil "kubernetes-ast" "kubernetes-ast.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from kubernetes-ast.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-ast" '("kubernetes-ast-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-commands" "kubernetes-commands.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-commands.el - -(autoload 'kubernetes-mark-for-delete "kubernetes-commands" "\ -Mark the thing at POINT for deletion, then advance to the next line. - -\(fn POINT)" t nil) - -(autoload 'kubernetes-unmark "kubernetes-commands" "\ -Unmark the thing at POINT, then advance to the next line. - -\(fn POINT)" t nil) - -(autoload 'kubernetes-unmark-all "kubernetes-commands" "\ -Unmark everything in the buffer. - -\(fn)" t nil) - -(autoload 'kubernetes-execute-marks "kubernetes-commands" "\ -Action all marked items in the buffer. - -\(fn)" t nil) - -(autoload 'kubernetes-copy-thing-at-point "kubernetes-commands" "\ -Perform a context-sensitive copy action. - -Inspects the `kubernetes-copy' text property at POINT to determine -what to copy. - -\(fn POINT)" t nil) - -(autoload 'kubernetes-refresh "kubernetes-commands" "\ -Force Kubernetes buffers to redraw. - -With optional argument VERBOSE, log status changes. - -\(fn &optional VERBOSE)" t nil) - -(autoload 'kubernetes-navigate "kubernetes-commands" "\ -Perform a context-sensitive navigation action. - -STATE is the current application state. - -Inspecs the `kubernetes-nav' text property at POINT to determine -how to navigate. If that property is not found, attempt to toggle -the magit section at point. - -\(fn POINT STATE)" t nil) - -(autoload 'kubernetes-describe-dwim "kubernetes-commands" "\ -Describe the thing at point. - -THING must be a valid target for `kubectl describe'. - -\(fn THING)" t nil) - -(autoload 'kubernetes-describe-pod "kubernetes-commands" "\ -Display a buffer for describing a pod. - -POD-NAME is the name of the pod to describe. - -\(fn POD-NAME)" t nil) - -(autoload 'kubernetes-exec-into "kubernetes-commands" "\ -Open a terminal for execting into a pod. - -POD-NAME is the name of the pod to exec into. - -ARGS are additional args to pass to kubectl. - -EXEC-COMMAND is the command to run in the container. - -STATE is the current application state. - -Should be invoked via command `kubernetes-logs-popup'. - -\(fn POD-NAME ARGS EXEC-COMMAND STATE)" t nil) - -(autoload 'kubernetes-set-namespace "kubernetes-commands" "\ -Set the namespace to query to NS. - -Overrides the namespace settings for the current context. - -STATE is the current application state. - -\(fn NS STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-commands" '("kubernetes-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-configmaps" "kubernetes-configmaps.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-configmaps.el - -(autoload 'kubernetes-display-configmap "kubernetes-configmaps" "\ -Display information for a configmap in a new window. - -STATE is the current application state. - -CONFIGMAP-NAME is the name of the configmap to display. - -\(fn CONFIGMAP-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-configmaps" '("kubernetes-configmaps-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-contexts" "kubernetes-contexts.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-contexts.el - -(autoload 'kubernetes-display-config "kubernetes-contexts" "\ -Display information for CONFIG in a new window. - -\(fn CONFIG)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-contexts" '("kubernetes-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-deployments" "kubernetes-deployments.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-deployments.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-deployments" '("kubernetes-d"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-errors" "kubernetes-errors.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-errors.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-errors" '("kubernetes-errors-render"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-ingress" "kubernetes-ingress.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-ingress.el - -(autoload 'kubernetes-display-ingress "kubernetes-ingress" "\ -Display information for a ingress in a new window. - -STATE is the current application state. - -INGRESS-NAME is the name of the ingress to display. - -\(fn INGRESS-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-ingress" '("kubernetes-ingress-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-jobs" "kubernetes-jobs.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from kubernetes-jobs.el - -(autoload 'kubernetes-display-job "kubernetes-jobs" "\ -Display information for a job in a new window. - -STATE is the current application state. - -JOB-NAME is the name of the job to display. - -\(fn JOB-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-jobs" '("kubernetes-jobs-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-kubectl" "kubernetes-kubectl.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-kubectl.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-kubectl" '("kubernetes-kubectl"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-labels" "kubernetes-labels.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-labels.el - -(autoload 'kubernetes-show-pods-for-label "kubernetes-labels" "\ -Display a buffer for pods matching a label. - -LABEL-QUERY is a string used to match pods. - -\(fn LABEL-QUERY)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-labels" '("kubernetes-labels--"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-logs" "kubernetes-logs.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from kubernetes-logs.el - -(autoload 'kubernetes-logs-inspect-line "kubernetes-logs" "\ -Show detail for the log line at POS. - -\(fn POS)" t nil) - -(autoload 'kubernetes-logs-previous-line "kubernetes-logs" "\ -Move backward and inspect the line at point. - -\(fn)" t nil) - -(autoload 'kubernetes-logs-forward-line "kubernetes-logs" "\ -Move forward and inspect the line at point. - -\(fn)" t nil) - -(autoload 'kubernetes-logs-follow "kubernetes-logs" "\ -Open a streaming logs buffer for a pod. - -POD-NAME is the name of the pod to log. - -ARGS are additional args to pass to kubectl. - -STATE is the current application state. - -\(fn POD-NAME ARGS STATE)" t nil) - -(autoload 'kubernetes-logs-fetch-all "kubernetes-logs" "\ -Open a streaming logs buffer for POD. - -POD-NAME is the name of the pod to log. - -ARGS are additional args to pass to kubectl. - -STATE is the current application state - -\(fn POD-NAME ARGS STATE)" t nil) - -(defvar kubernetes-logs-mode-map (let ((keymap (make-sparse-keymap))) (define-key keymap (kbd "n") #'kubernetes-logs-forward-line) (define-key keymap (kbd "p") #'kubernetes-logs-previous-line) (define-key keymap (kbd "RET") #'kubernetes-logs-inspect-line) keymap) "\ -Keymap for `kubernetes-logs-mode'.") - -(autoload 'kubernetes-logs-mode "kubernetes-logs" "\ -Mode for displaying and inspecting Kubernetes logs. - -\\Type \\[kubernetes-logs-inspect-line] to open the line at point in a new buffer. - -\\{kubernetes-logs-mode-map} - -\(fn)" t nil) - -(defvar kubernetes-log-line-mode-map (let ((keymap (make-sparse-keymap))) (define-key keymap (kbd "n") #'kubernetes-logs-forward-line) (define-key keymap (kbd "p") #'kubernetes-logs-previous-line) keymap) "\ -Keymap for `kubernetes-log-line-mode'.") - -(autoload 'kubernetes-log-line-mode "kubernetes-logs" "\ -Mode for inspecting Kubernetes log lines. - -\\{kubernetes-log-line-mode-map} - -\(fn)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-logs" '("kubernetes-logs--log-line-buffer-for-string"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-modes" "kubernetes-modes.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from kubernetes-modes.el - -(autoload 'kubernetes-display-thing-mode "kubernetes-modes" "\ -Mode for inspecting a Kubernetes object. - -\\{kubernetes-display-thing-mode-map} - -\(fn)" t nil) - -(defvar kubernetes-mode-map (let ((keymap (make-sparse-keymap))) (define-key keymap (kbd "p") #'magit-section-backward) (define-key keymap (kbd "n") #'magit-section-forward) (define-key keymap (kbd "M-p") #'magit-section-backward-sibling) (define-key keymap (kbd "M-n") #'magit-section-forward-sibling) (define-key keymap (kbd "C-i") #'magit-section-toggle) (define-key keymap (kbd "^") #'magit-section-up) (define-key keymap [tab] #'magit-section-toggle) (define-key keymap [C-tab] #'magit-section-cycle) (define-key keymap [M-tab] #'magit-section-cycle-diffs) (define-key keymap [S-tab] #'magit-section-cycle-global) (define-key keymap (kbd "q") #'quit-window) (define-key keymap (kbd "RET") #'kubernetes-navigate) (define-key keymap (kbd "M-w") #'kubernetes-copy-thing-at-point) (define-key keymap (kbd "h") #'describe-mode) (define-key keymap (kbd "?") #'kubernetes-overview-popup) (define-key keymap (kbd "c") #'kubernetes-config-popup) (define-key keymap (kbd "d") #'kubernetes-describe-popup) (define-key keymap (kbd "D") #'kubernetes-mark-for-delete) (define-key keymap (kbd "e") #'kubernetes-exec-popup) (define-key keymap (kbd "g") #'kubernetes-refresh) (define-key keymap (kbd "l") #'kubernetes-logs-popup) (define-key keymap (kbd "L") #'kubernetes-labels-popup) (define-key keymap (kbd "u") #'kubernetes-unmark) (define-key keymap (kbd "U") #'kubernetes-unmark-all) (define-key keymap (kbd "x") #'kubernetes-execute-marks) keymap) "\ -Keymap for `kubernetes-mode'. This is the base keymap for all derived modes.") - -(autoload 'kubernetes-mode "kubernetes-modes" "\ -Base mode for Kubernetes modes. - -\\{kubernetes-mode-map} - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "kubernetes-namespaces" "kubernetes-namespaces.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-namespaces.el - -(autoload 'kubernetes-display-namespace "kubernetes-namespaces" "\ -Display information for a namespace in a new window. - -STATE is the current application state. - -NAMESPACE-NAME is the name of the namespace to display. - -\(fn NAMESPACE-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-namespaces" '("kubernetes-namespaces--read-name"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-nodes" "kubernetes-nodes.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from kubernetes-nodes.el - -(autoload 'kubernetes-display-node "kubernetes-nodes" "\ -Display information for a node in a new window. - -STATE is the current application state. - -NODE-NAME is the name of the node to display. - -\(fn NODE-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-nodes" '("kubernetes-nodes--"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-overview" "kubernetes-overview.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-overview.el - -(autoload 'kubernetes-overview-mode "kubernetes-overview" "\ -Mode for working with Kubernetes overview. - -\\Type \\[kubernetes-overview-set-sections] to choose which resources to display. - -Type \\[kubernetes-mark-for-delete] to mark an object for deletion, and \\[kubernetes-execute-marks] to execute. -Type \\[kubernetes-unmark] to unmark the object at point, or \\[kubernetes-unmark-all] to unmark all objects. - -Type \\[kubernetes-navigate] to inspect the object on the current line. - -Type \\[kubernetes-copy-thing-at-point] to copy the thing at point. - -Type \\[kubernetes-refresh] to refresh the buffer. - -\\{kubernetes-overview-mode-map} - -\(fn)" t nil) - -(autoload 'kubernetes-overview "kubernetes-overview" "\ -Display an overview buffer for Kubernetes. - -\(fn)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-overview" '("kubernetes-overview-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-pod-line" "kubernetes-pod-line.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-pod-line.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-pod-line" '("kubernetes-pod-line-ok-p"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-pods" "kubernetes-pods.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from kubernetes-pods.el - -(autoload 'kubernetes-display-pod "kubernetes-pods" "\ -Display information for a pod in a new window. - -STATE is the current application state. - -POD-NAME is the name of the pod to display. - -\(fn POD-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-pods" '("kubernetes-pods-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-popups" "kubernetes-popups.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-popups.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-popups" '("kubernetes-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-process" "kubernetes-process.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-process.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-process" '("kubernetes-process-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-props" "kubernetes-props.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from kubernetes-props.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-props" '("kubernetes-props"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-secrets" "kubernetes-secrets.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-secrets.el - -(autoload 'kubernetes-display-secret "kubernetes-secrets" "\ -Display information for a secret in a new window. - -STATE is the current application state. - -SECRET-NAME is the name of the secret to display. - -\(fn SECRET-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-secrets" '("kubernetes-secrets-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-services" "kubernetes-services.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-services.el - -(autoload 'kubernetes-display-service "kubernetes-services" "\ -Display information for a service in a new window. - -STATE is the current application state. - -SERVICE-NAME is the name of the service to display. - -\(fn SERVICE-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-services" '("kubernetes-services-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-state" "kubernetes-state.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from kubernetes-state.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-state" '("kubernetes-state"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-statefulsets" "kubernetes-statefulsets.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-statefulsets.el - -(autoload 'kubernetes-display-statefulset "kubernetes-statefulsets" "\ -Display information for a statefulset in a new window. - -STATE is the current application state. - -STATEFULSET-NAME is the name of the statefulset to display. - -\(fn STATEFULSET-NAME STATE)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-statefulsets" '("kubernetes-statefulsets-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-timers" "kubernetes-timers.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from kubernetes-timers.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-timers" '("kubernetes-timers-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-utils" "kubernetes-utils.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from kubernetes-utils.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-utils" '("kubernetes-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-vars" "kubernetes-vars.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from kubernetes-vars.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-vars" '("kubernetes-"))) - -;;;*** - -;;;### (autoloads nil "kubernetes-yaml" "kubernetes-yaml.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from kubernetes-yaml.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "kubernetes-yaml" '("kubernetes-yaml-"))) - -;;;*** - -;;;### (autoloads nil nil ("kubernetes-loading-container.el" "kubernetes-pkg.el" -;;;;;; "kubernetes.el") (0 0 0 0)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; coding: utf-8 -;; End: -;;; kubernetes-autoloads.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-commands.el b/elpa/kubernetes-20200114.436/kubernetes-commands.el deleted file mode 100644 index 64b18d28..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-commands.el +++ /dev/null @@ -1,398 +0,0 @@ -;;; kubernetes-commands.el --- Interactive commands for Kubernetes modes. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'kubernetes-ast) -(require 'kubernetes-modes) -(require 'kubernetes-popups) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) - -(autoload 'kubernetes-configmaps-delete-marked "kubernetes-configmaps") -(autoload 'kubernetes-deployments-delete-marked "kubernetes-deployments") -(autoload 'kubernetes-statefulsets-delete-marked "kubernetes-statefulsets") -(autoload 'kubernetes-ingress-delete-marked "kubernetes-ingress") -(autoload 'kubernetes-display-config "kubernetes-contexts") -(autoload 'kubernetes-display-configmap "kubernetes-configmaps") -(autoload 'kubernetes-display-deployment "kubernetes-deployments") -(autoload 'kubernetes-display-statefulset "kubernetes-statefulsets") -(autoload 'kubernetes-display-ingress "kubernetes-ingress") -(autoload 'kubernetes-display-node "kubernetes-nodes") -(autoload 'kubernetes-display-job "kubernetes-jobs") -(autoload 'kubernetes-display-namespace "kubernetes-namespaces") -(autoload 'kubernetes-display-pod "kubernetes-pods") -(autoload 'kubernetes-display-secret "kubernetes-secrets") -(autoload 'kubernetes-display-service "kubernetes-services") -(autoload 'kubernetes-jobs-delete-marked "kubernetes-jobs") -(autoload 'kubernetes-pods-delete-marked "kubernetes-pods") -(autoload 'kubernetes-secrets-delete-marked "kubernetes-secrets") -(autoload 'kubernetes-services-delete-marked "kubernetes-services") -(autoload 'kubernetes-show-pods-for-label "kubernetes-labels") - - -;; Mark management - -;;;###autoload -(defun kubernetes-mark-for-delete (point) - "Mark the thing at POINT for deletion, then advance to the next line." - (interactive "d") - (pcase (get-text-property point 'kubernetes-nav) - (`(:pod-name ,name) - (kubernetes-state-mark-pod name)) - (`(:configmap-name ,name) - (kubernetes-state-mark-configmap name)) - (`(:ingress-name ,name) - (kubernetes-state-mark-ingress name)) - (`(:job-name ,name) - (kubernetes-state-mark-job name)) - (`(:secret-name ,name) - (kubernetes-state-mark-secret name)) - (`(:service-name ,name) - (kubernetes-state-mark-service name)) - (`(:deployment-name ,name) - (kubernetes-state-mark-deployment name)) - (`(:statefulset-name ,name) - (kubernetes-state-mark-statefulset name)) - (_ - (user-error "Nothing here can be marked"))) - - (let ((inhibit-read-only t)) - (kubernetes-ast-put-delete-mark-on-line-at-pt point)) - (magit-section-forward)) - -;;;###autoload -(defun kubernetes-unmark (point) - "Unmark the thing at POINT, then advance to the next line." - (interactive "d") - (pcase (get-text-property point 'kubernetes-nav) - (`(:pod-name ,name) - (kubernetes-state-unmark-pod name)) - (`(:configmap-name ,name) - (kubernetes-state-unmark-configmap name)) - (`(:ingress-name ,name) - (kubernetes-state-unmark-ingress name)) - (`(:job-name ,name) - (kubernetes-state-unmark-job name)) - (`(:secret-name ,name) - (kubernetes-state-unmark-secret name)) - (`(:service-name ,name) - (kubernetes-state-unmark-service name)) - (`(:deployment-name ,name) - (kubernetes-state-unmark-deployment name)) - (`(:statefulset-name ,name) - (kubernetes-state-unmark-statefulset name))) - (kubernetes-state-trigger-redraw) - (goto-char point) - (magit-section-forward)) - -;;;###autoload -(defun kubernetes-unmark-all () - "Unmark everything in the buffer." - (interactive) - (kubernetes-state-unmark-all) - (let ((pt (point))) - (kubernetes-state-trigger-redraw) - (goto-char pt))) - -;;;###autoload -(defun kubernetes-execute-marks () - "Action all marked items in the buffer." - (interactive) - (let ((state (kubernetes-state))) - (let ((n (length (kubernetes-state-marked-pods state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s pod%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-pods-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-configmaps state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s configmap%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-configmaps-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-ingress state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s ingress%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-ingress-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-secrets state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s secret%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-secrets-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-deployments state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s deployment%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-deployments-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-statefulsets state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s statefulsets%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-statefulsets-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-jobs state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s job%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-jobs-delete-marked state))) - - (let ((n (length (kubernetes-state-marked-services state)))) - (when (and (not (zerop n)) - (y-or-n-p (format "Delete %s service%s? " n (if (equal 1 n) "" "s")))) - (kubernetes-services-delete-marked state)))) - - (kubernetes-unmark-all)) - - -;; Misc commands - -;;;###autoload -(defun kubernetes-copy-thing-at-point (point) - "Perform a context-sensitive copy action. - -Inspects the `kubernetes-copy' text property at POINT to determine -what to copy." - (interactive "d") - (when-let (s (get-text-property point 'kubernetes-copy)) - (kill-new s) - - ;; Print a user-friendly message for feedback. - (let ((n-lines 1) (first-line nil)) - (with-temp-buffer - (insert s) - (goto-char (point-min)) - (setq first-line (buffer-substring (line-beginning-position) (line-end-position))) - (while (search-forward "\n" nil t) - (setq n-lines (1+ n-lines)))) - (let ((ellipsized (kubernetes-utils-ellipsize first-line 70))) - (if (< 1 n-lines) - (message "Copied %s lines, starting with: %s" n-lines ellipsized) - (message "Copied: %s" ellipsized)))))) - -;;;###autoload -(defun kubernetes-refresh (&optional verbose) - "Force Kubernetes buffers to redraw. - -With optional argument VERBOSE, log status changes." - (interactive "p") - (run-hook-with-args 'kubernetes-poll-hook verbose) - (kubernetes-state-trigger-redraw)) - -;;;###autoload -(defun kubernetes-navigate (point state) - "Perform a context-sensitive navigation action. - -STATE is the current application state. - -Inspecs the `kubernetes-nav' text property at POINT to determine -how to navigate. If that property is not found, attempt to toggle -the magit section at point." - (interactive (list (point) (kubernetes-state))) - (pcase (get-text-property point 'kubernetes-nav) - (:display-config - (kubernetes-display-config (alist-get 'config state))) - (`(:configmap-name ,configmap-name) - (kubernetes-display-configmap configmap-name state)) - (`(:service-name ,service-name) - (kubernetes-display-service service-name state)) - (`(:deployment-name ,deployment-name) - (kubernetes-display-deployment deployment-name state)) - (`(:statefulset-name ,statefulset-name) - (kubernetes-display-statefulset statefulset-name state)) - (`(:ingress-name ,ingress-name) - (kubernetes-display-ingress ingress-name state)) - (`(:node-name ,node-name) - (kubernetes-display-node node-name state)) - (`(:job-name ,job-name) - (kubernetes-display-job job-name state)) - (`(:secret-name ,secret-name) - (kubernetes-display-secret secret-name state)) - (`(:namespace-name ,namespace-name) - (kubernetes-display-namespace namespace-name state)) - (`(:pod-name ,pod-name) - (kubernetes-display-pod pod-name state)) - (`(:selector ,selector) - (kubernetes-show-pods-for-label selector)) - (_ - (when-let (section (get-text-property (point) 'magit-section)) - (magit-section-toggle section))))) - -(defun kubernetes--describable-thing-at-pt () - (save-excursion - (back-to-indentation) - (get-text-property (point) 'kubernetes-nav))) - -;;;###autoload -(defun kubernetes-describe-dwim (thing) - "Describe the thing at point. - -THING must be a valid target for `kubectl describe'." - (interactive (list (kubernetes--describable-thing-at-pt))) - (pcase thing - (`(:pod-name ,pod-name) - (kubernetes-describe-pod pod-name)) - (_ - (user-error "Nothing at point to describe")))) - -;;;###autoload -(defun kubernetes-describe-pod (pod-name) - "Display a buffer for describing a pod. - -POD-NAME is the name of the pod to describe." - (interactive (list (or (kubernetes-utils-maybe-pod-name-at-point) (kubernetes-utils-read-pod-name (kubernetes-state))))) - (let ((buf (get-buffer-create kubernetes-pod-buffer-name)) - (marker (make-marker))) - (with-current-buffer buf - (kubernetes-display-thing-mode) - (let ((inhibit-read-only t)) - (erase-buffer) - (set-marker marker (point)) - (insert (propertize "Loading..." 'face 'magit-dimmed)))) - (let* ((populate-buffer (lambda (s) - (with-current-buffer (marker-buffer marker) - (setq-local tab-width 8) - (let ((inhibit-read-only t) - (inhibit-redisplay t)) - (erase-buffer) - (insert "---\n") - (insert s) - (untabify (point-min) (point-max)) - (goto-char (point-min)))))) - (proc (kubernetes-kubectl-describe-pod kubernetes-props - (kubernetes-state) - pod-name - populate-buffer))) - (with-current-buffer buf - (add-hook 'kill-buffer-hook (lambda () (kubernetes-process-kill-quietly proc)) nil t))) - - (select-window (display-buffer buf)) - buf)) - -;;;###autoload -(defun kubernetes-exec-into (pod-name args exec-command state) - "Open a terminal for execting into a pod. - -POD-NAME is the name of the pod to exec into. - -ARGS are additional args to pass to kubectl. - -EXEC-COMMAND is the command to run in the container. - -STATE is the current application state. - -Should be invoked via command `kubernetes-logs-popup'." - (interactive (let* ((state (kubernetes-state)) - (pod-name (or (kubernetes-utils-maybe-pod-name-at-point) (kubernetes-utils-read-pod-name state))) - (command - (let ((cmd (string-trim (read-string (format "Command (default: %s): " kubernetes-default-exec-command) - nil 'kubernetes-exec-history)))) - (if (string-empty-p cmd) kubernetes-default-exec-command cmd)))) - (list pod-name (kubernetes-exec-arguments) command state))) - - (let* ((command-args (append (list "exec") (kubernetes-kubectl--flags-from-state (kubernetes-state)) - args - (when-let (ns (kubernetes-state-current-namespace state)) - (list (format "--namespace=%s" ns))) - (list pod-name exec-command))) - - (interactive-tty (member "-t" args)) - (buf - (if interactive-tty - (kubernetes-utils-term-buffer-start kubernetes-exec-buffer-name - kubernetes-kubectl-executable - command-args) - (kubernetes-utils-process-buffer-start kubernetes-exec-buffer-name - #'kubernetes-mode - kubernetes-kubectl-executable - command-args)))) - - (when (and interactive-tty kubernetes-clean-up-interactive-exec-buffers) - (set-process-sentinel (get-buffer-process buf) #'kubernetes-process-kill-quietly)) - - (select-window (display-buffer buf)))) - - -;; View management - -(defun kubernetes-commands-display-buffer-fullframe (buffer) - (let ((display-fn - (lambda (buffer alist) - (when-let (window (or (display-buffer-reuse-window buffer alist) - (display-buffer-same-window buffer alist) - (display-buffer-pop-up-window buffer alist) - (display-buffer-use-some-window buffer alist))) - (delete-other-windows window) - window)))) - (display-buffer buffer (list display-fn)))) - -(defun kubernetes-commands-display-buffer (buffer) - (let ((window (funcall kubernetes-commands-display-buffer-function buffer))) - (when kubernetes-commands-display-buffer-select - (select-frame-set-input-focus - (window-frame (select-window window)))))) - - -;; Config management - -;;;###autoload -(defun kubernetes-set-namespace (ns state) - "Set the namespace to query to NS. - -Overrides the namespace settings for the current context. - -STATE is the current application state." - (interactive - (let ((state (kubernetes-state))) - (list (completing-read "Use namespace: " (kubernetes--namespace-names state) nil t) - state))) - (kubernetes-process-kill-polling-processes) - (kubernetes-state-clear) - (goto-char (point-min)) - - ;; State for the context and view should be preserved. - (kubernetes-state-update-config (kubernetes-state-config state)) - (kubernetes-state-update-current-namespace ns) - (kubernetes-state-update-overview-sections (kubernetes-state-overview-sections state)) - - (kubernetes-state-trigger-redraw)) - -(defun kubernetes--namespace-names (state) - (-let* ((config (or (kubernetes-state-namespaces state) (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-namespaces))) - ((&alist 'items items) config)) - (-map (-lambda ((&alist 'metadata (&alist 'name name))) name) items))) - -(defun kubernetes-use-context (context) - "Switch Kubernetes context refresh the pods buffer. - -CONTEXT is the name of a context as a string." - (interactive (list (completing-read "Context: " (kubernetes--context-names (kubernetes-state)) nil t))) - (kubernetes-process-kill-polling-processes) - - (let ((state (kubernetes-state))) - (kubernetes-state-clear) - (kubernetes-state-update-overview-sections (kubernetes-state-overview-sections state))) - - (kubernetes-state-trigger-redraw) - - (when-let (buf (get-buffer kubernetes-overview-buffer-name)) - (with-current-buffer buf - (goto-char (point-min)))) - - (let ((state (kubernetes-state))) - (kubernetes-kubectl-config-use-context - kubernetes-props - state - context - (lambda (_) - (when kubernetes-default-overview-namespace - (kubernetes-set-namespace kubernetes-default-overview-namespace - state)) - (kubernetes-state-trigger-redraw))))) - -(defun kubernetes--context-names (state) - (-let* ((config (or (kubernetes-state-config state) (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-config-view))) - ((&alist 'contexts contexts) config)) - (--map (alist-get 'name it) contexts))) - -(provide 'kubernetes-commands) - -;;; kubernetes-commands.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-commands.elc b/elpa/kubernetes-20200114.436/kubernetes-commands.elc deleted file mode 100644 index 87c99b47..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-commands.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-configmaps.el b/elpa/kubernetes-20200114.436/kubernetes-configmaps.el deleted file mode 100644 index 73e010da..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-configmaps.el +++ /dev/null @@ -1,137 +0,0 @@ -;;; kubernetes-configmaps.el --- Rendering for Kubernetes configmaps. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-process) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-configmaps--column-heading - ["%-45s %6s %6s" "Name Data Age"]) - -(kubernetes-ast-define-component configmap-detail (configmap) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time)) configmap] - `((section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component configmap-line (state configmap) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-configmaps-pending-deletion state)) - (marked-configmaps (kubernetes-state-marked-configmaps state)) - ((&alist 'data data - 'metadata (&alist 'name name 'creationTimestamp created-time)) - configmap) - ([fmt] kubernetes-configmaps--column-heading) - (list-fmt (split-string fmt)) - (line `(line ,(concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Data - (propertize (format (pop list-fmt) (seq-length data)) 'face 'magit-dimmed) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - `(nav-prop (:configmap-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-configmaps) - `(mark-for-delete ,line)) - (t - line)))))) - -(kubernetes-ast-define-component configmap (state configmap) - `(section (,(intern (kubernetes-state-resource-name configmap)) t) - (heading (configmap-line ,state ,configmap)) - (section (details nil) - (indent - (configmap-detail ,configmap) - (padding))))) - -(kubernetes-ast-define-component configmaps-list (state &optional hidden) - (-let (((&alist 'items configmaps) (kubernetes-state-configmaps state)) - ([fmt labels] kubernetes-configmaps--column-heading)) - `(section (configmaps-container ,hidden) - (header-with-count "Configmaps" ,configmaps) - (indent - (columnar-loading-container ,configmaps - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,(--map `(configmap ,state ,it) configmaps))) - (padding)))) - - -;; Requests and state management - -(kubernetes-state-define-refreshers configmaps) - -(defun kubernetes-configmaps-delete-marked (state) - (let ((names (kubernetes-state-marked-configmaps state))) - (dolist (name names) - (kubernetes-state-delete-configmap name) - (kubernetes-kubectl-delete-configmap kubernetes-props state name - (lambda (_) - (message "Deleting configmap %s succeeded." name)) - (lambda (_) - (message "Deleting configmap %s failed" name) - (kubernetes-state-mark-configmap name)))) - (kubernetes-state-trigger-redraw))) - - -;; Displaying configmaps. - -(defun kubernetes-configmaps--read-name (state) - "Read a configmap name from the user. - -STATE is the current application state. - -Update the configmap state if it not set yet." - (-let* (((&alist 'items configmaps) - (or (kubernetes-state-configmaps state) - (progn - (message "Getting configmaps...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-configmaps))) - (kubernetes-state-update-configmaps response) - response)))) - (configmaps (append configmaps nil)) - (names (-map #'kubernetes-state-resource-name configmaps))) - (completing-read "Configmap: " names nil t))) - - -;;;###autoload -(defun kubernetes-display-configmap (configmap-name state) - "Display information for a configmap in a new window. - -STATE is the current application state. - -CONFIGMAP-NAME is the name of the configmap to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-configmaps--read-name state) state))) - (if-let (configmap (kubernetes-state-lookup-configmap configmap-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-configmap-buffer-name configmap))) - (error "Unknown configmap: %s" configmap-name))) - - -(provide 'kubernetes-configmaps) - -;;; kubernetes-configmaps.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-configmaps.elc b/elpa/kubernetes-20200114.436/kubernetes-configmaps.elc deleted file mode 100644 index 233765ce..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-configmaps.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-contexts.el b/elpa/kubernetes-20200114.436/kubernetes-contexts.el deleted file mode 100644 index b81a905b..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-contexts.el +++ /dev/null @@ -1,83 +0,0 @@ -;;; kubernetes-contexts.el --- Rendering for Kubernetes contexts -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-kubectl) -(require 'kubernetes-modes) -(require 'kubernetes-process) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Component - -(defun kubernetes-contexts--render-current-context (context current-namespace) - (-let* (((&alist 'name name - 'context (&alist 'cluster cluster-name - 'namespace context-namespace)) - context) - (context-name (propertize name 'face 'kubernetes-context-name)) - (namespace-in-use (or current-namespace context-namespace "default"))) - `((nav-prop :display-config - (heading (key-value 12 "Context" ,context-name)) - (key-value 12 "Cluster" ,cluster-name)) - (section (namespace nil) - (nav-prop (:namespace-name ,namespace-in-use) - (key-value 12 "Namespace" ,(propertize namespace-in-use 'face 'kubernetes-namespace))))))) - -(defun kubernetes-contexts--render-namespace-only (current-namespace) - (let ((none (propertize "" 'face 'magit-dimmed))) - `((heading (nav-prop :display-config (key-value 12 "Context" ,none))) - (section (namespace nil) - (nav-prop (:namespace-name ,current-namespace) - (key-value 12 "Namespace" ,(propertize current-namespace 'face 'kubernetes-namespace))))))) - -(defun kubernetes-contexts--render-fetching () - (let ((fetching (propertize "Fetching..." 'face 'kubernetes-progress-indicator))) - `(heading (key-value 12 "Context" ,fetching)))) - -(defun kubernetes-contexts-render (state) - (let ((current-namespace (kubernetes-state-current-namespace state)) - (current-context (kubernetes-state-current-context state))) - - `(section (context-container nil) - (section (context nil) - ,(cond - (current-context - (kubernetes-contexts--render-current-context current-context current-namespace)) - (current-namespace - (kubernetes-contexts--render-namespace-only current-namespace)) - (t - (kubernetes-contexts--render-fetching))) - - (padding))))) - - -;; Requests and state management - -(kubernetes-state-define-refreshers config kubernetes-kubectl-config-view - "config view -o json") - -(defalias 'kubernetes-contexts-refresh-now 'kubernetes-config-refresh-now) -(defalias 'kubernetes-contexts-refresh 'kubernetes-config-refresh-now) -(defalias 'kubernetes-state-contexts 'kubernetes-state-config) -(defalias 'kubernetes-state-update-contexts 'kubernetes-state-update-config) - -;; Displaying config. - -;;;###autoload -(defun kubernetes-display-config (config) - "Display information for CONFIG in a new window." - (interactive (list (kubernetes-kubectl-await-on-async kubernetes-props (kubernetes-state) #'kubernetes-kubectl-config-view))) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-config-buffer-name config)))) - - -(provide 'kubernetes-contexts) - -;;; kubernetes-contexts.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-contexts.elc b/elpa/kubernetes-20200114.436/kubernetes-contexts.elc deleted file mode 100644 index 6908a2d1..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-contexts.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-deployments.el b/elpa/kubernetes-20200114.436/kubernetes-deployments.el deleted file mode 100644 index 7c797d36..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-deployments.el +++ /dev/null @@ -1,195 +0,0 @@ -;;; kubernetes-deployments.el --- Rendering for Kubernetes deployments. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-kubectl) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-vars) -(require 'kubernetes-yaml) - - -;;;; Components - -(defconst kubernetes-deployments--column-heading - ["%-45s %10s %10s %10s %6s" "Name Replicas UpToDate Available Age"]) - -(kubernetes-ast-define-component deployment-detail (deployment) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time) - 'spec (&alist 'selector (&alist 'matchLabels - (&alist 'name selector-name - 'component component-name) - 'matchExpressions match-expressions))) - deployment] - `(,(when selector-name - `(section (selector nil) - (nav-prop (:selector ,selector-name) - (key-value 12 "Selector" ,(propertize selector-name 'face 'kubernetes-selector))))) - ,(when component-name - `(section (component nil) - (nav-prop (:component ,component-name) - (key-value 12 "Component" ,(propertize component-name 'face 'kubernetes-component))))) - - ,(when match-expressions - `(section (expressions nil) - (heading "Match Expressions") - (indent ,(kubernetes-yaml-render match-expressions)))) - - (section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component deployment-line (state deployment) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-deployments-pending-deletion state)) - (marked-deployments (kubernetes-state-marked-deployments state)) - - ((&alist 'metadata (&alist 'name name 'creationTimestamp created-time) - - 'spec (&alist 'replicas desired) - - 'status (&alist 'replicas current - 'availableReplicas available - 'updatedReplicas up-to-date)) - deployment) - (current (or current 0)) - (desired (or desired 0)) - (available (or available 0)) - (up-to-date (or up-to-date 0)) - ([fmt] kubernetes-deployments--column-heading) - (list-fmt (split-string fmt)) - (line `(line ,(concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Replicas (current/desired) - (let ((next (pop list-fmt)) - (str (format "%s/%s" current desired))) - (cond - ((zerop desired) - (format next str)) - ((zerop current) - (propertize (format next str) 'face 'warning)) - ((/= current desired) - (format next str)) - (t - (propertize (format next str) 'face 'magit-dimmed)))) - " " - ;; Up-to-date - (let ((next (pop list-fmt))) - (cond - ((zerop desired) - (format next up-to-date)) - ((zerop up-to-date) - (propertize (format next up-to-date) 'face 'warning)) - (t - (propertize (format next up-to-date) 'face 'magit-dimmed)))) - " " - ;; Available - (let ((next (pop list-fmt))) - (cond - ((zerop desired) - (format next available)) - ((zerop available) - (propertize (format next available) 'face 'warning)) - (t - (propertize (format next available) 'face 'magit-dimmed)))) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - `(nav-prop (:deployment-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-deployments) - `(mark-for-delete ,line)) - ((zerop desired) - `(propertize (face magit-dimmed) ,line)) - (t - line)))))) - -(kubernetes-ast-define-component deployment (state deployment) - `(section (,(intern (kubernetes-state-resource-name deployment)) t) - (heading (deployment-line ,state ,deployment)) - (section (details nil) - (indent - (deployment-detail ,deployment) - (padding))))) - -(kubernetes-ast-define-component deployments-list (state &optional hidden) - (-let (((state-set-p &as &alist 'items deployments) (kubernetes-state-deployments state)) - ([fmt labels] kubernetes-deployments--column-heading)) - `(section (deployments-container ,hidden) - (header-with-count "Deployments" ,deployments) - (indent - (columnar-loading-container ,deployments - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,(--map `(deployment ,state ,it) deployments))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers deployments) - -(defun kubernetes-deployments-delete-marked (state) - (let ((names (kubernetes-state-marked-deployments state))) - (dolist (name names) - (kubernetes-state-delete-deployment name) - (kubernetes-kubectl-delete-deployment kubernetes-props state name - (lambda (_) - (message "Deleting deployment %s succeeded." name)) - (lambda (_) - (message "Deleting deployment %s failed" name) - (kubernetes-state-mark-deployment name)))) - (kubernetes-state-trigger-redraw))) - - -;;;; Displaying deployments - -(defun kubernetes-deployments--read-name (state) - "Read a deployment name from the user. - -STATE is the current application state. - -Update the deployment state if it not set yet." - (-let* (((&alist 'items deployments) - (or (kubernetes-state-deployments state) - (progn - (message "Getting deployments...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-deployments))) - (kubernetes-state-update-deployments response) - response)))) - (deployments (append deployments nil)) - (names (-map #'kubernetes-state-resource-name deployments))) - (completing-read "Deployment: " names nil t))) - -;;###autoload -(defun kubernetes-display-deployment (deployment-name state) - "Display information for a deployment in a new window. - -STATE is the current application state. - -DEPLOYMENT-NAME is the name of the deployment to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-deployments--read-name state) state))) - (if-let (deployment (kubernetes-state-lookup-deployment deployment-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-deployment-buffer-name deployment))) - (error "Unknown deployment: %s" deployment-name))) - - -(provide 'kubernetes-deployments) - -;;; kubernetes-deployments.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-deployments.elc b/elpa/kubernetes-20200114.436/kubernetes-deployments.elc deleted file mode 100644 index 892ab016..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-deployments.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-errors.el b/elpa/kubernetes-20200114.436/kubernetes-errors.el deleted file mode 100644 index 6eb2b24a..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-errors.el +++ /dev/null @@ -1,31 +0,0 @@ -;;; kubernetes-errors.el --- Rendering for Kubernetes errors -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'subr-x) - -(require 'kubernetes-state) - -(defun kubernetes-errors-render (state) - (-when-let* (((&alist 'message message 'command command) (kubernetes-state-last-error state)) - (message-paragraph - (with-temp-buffer - (insert message) - (fill-region (point-min) (point-max)) - (indent-region (point-min) (point-max) 2) - (string-trim-right (buffer-string))))) - - `(section (error nil) - (heading (propertize (face font-lock-warning-face) "kubectl command failed")) - (padding) - (section (message nil) - (copy-prop ,message (line ,message-paragraph)) - (padding)) - (section (command nil) - (key-value 10 "Command" ,command) - (padding))))) - -(provide 'kubernetes-errors) - -;;; kubernetes-errors.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-errors.elc b/elpa/kubernetes-20200114.436/kubernetes-errors.elc deleted file mode 100644 index f7d0e4ed..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-errors.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-ingress.el b/elpa/kubernetes-20200114.436/kubernetes-ingress.el deleted file mode 100644 index 52261371..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-ingress.el +++ /dev/null @@ -1,138 +0,0 @@ -;;; kubernetes-ingress.el --- Rendering routines for Kubernetes ingress. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-ingress--column-heading - (propertize (format "%-45s %-25s %20s %10s" "Name" "Hosts" "Address" "Age") - 'face 'magit-section-heading)) - -(kubernetes-ast-define-component ingress-detail (ingress) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time)) ingress] - `((section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component ingress-line (state ingress) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-ingress-pending-deletion state)) - (marked-ingress (kubernetes-state-marked-ingress state)) - ((&alist 'metadata (&alist 'name name 'creationTimestamp created-time) - 'spec (&alist 'rules ingress-rules) - 'status (&alist 'loadBalancer (&alist 'ingress ingress-lb-list))) - ingress) - (line `(line ,(concat - ;; Name - (format "%-45s " (kubernetes-utils-ellipsize name 45)) - - ;; Hosts - (format "%-25s " (--mapcat (alist-get 'host it) ingress-rules)) - - ;; Address - (format "%20s " - (mapconcat - 'identity - (mapcar - (lambda (i) (format "%s" (alist-get 'ip i ))) - ingress-lb-list) - ", ")) - - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format "%10s" (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - - `(nav-prop (:ingress-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-ingress) - `(mark-for-delete ,line)) - (t - line)))))) - -(kubernetes-ast-define-component ingress (state ingress) - `(section (,(intern (kubernetes-state-resource-name ingress)) t) - (heading (ingress-line ,state ,ingress)) - (section (details nil) - (indent - (ingress-detail ,ingress) - (padding))))) -(kubernetes-ast-define-component ingress-list (state &optional hidden) - (-let [(&alist 'items ingress) (kubernetes-state-ingress state)] - `(section (ingress-container ,hidden) - (header-with-count "Ingress" ,ingress) - (indent - (columnar-loading-container ,ingress ,kubernetes-ingress--column-heading - ,(--map `(ingress ,state ,it) ingress))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers ingress) - -(defun kubernetes-ingress-delete-marked (state) - (let ((names (kubernetes-state-marked-ingress state))) - (dolist (name names) - (kubernetes-state-delete-ingress name) - (kubernetes-kubectl-delete-ingress kubernetes-props state name - (lambda (_) - (message "Deleting ingress %s succeeded." name)) - (lambda (_) - (message "Deleting ingress %s failed" name) - (kubernetes-state-mark-ingress name)))) - (kubernetes-state-trigger-redraw))) - -;; Displaying ingress - -(defun kubernetes-ingress--read-name (state) - "Read a ingress name from the user. - -STATE is the current application state. - -Update the ingress state if it not set yet." - (-let* (((&alist 'items ingress) - (or (kubernetes-state-ingress state) - (progn - (message "Getting ingress...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-ingress))) - (kubernetes-state-update-ingress response) - response)))) - (ingress (append ingress nil)) - (names (-map #'kubernetes-state-resource-name ingress))) - (completing-read "Ingress: " names nil t))) - -;;;###autoload -(defun kubernetes-display-ingress (ingress-name state) - "Display information for a ingress in a new window. - -STATE is the current application state. - -INGRESS-NAME is the name of the ingress to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-ingress--read-name state) state))) - (if-let (ingress (kubernetes-state-lookup-ingress ingress-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-ingress-buffer-name ingress))) - (error "Unknown ingress: %s" ingress-name))) - - - -(provide 'kubernetes-ingress) - -;;; kubernetes-ingress.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-ingress.elc b/elpa/kubernetes-20200114.436/kubernetes-ingress.elc deleted file mode 100644 index 5ca692d2..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-ingress.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-jobs.el b/elpa/kubernetes-20200114.436/kubernetes-jobs.el deleted file mode 100644 index d820606b..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-jobs.el +++ /dev/null @@ -1,180 +0,0 @@ -;;; kubernetes-jobs.el --- Rendering for Kubernetes jobs. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-kubectl) -(require 'kubernetes-modes) -(require 'kubernetes-pod-line) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-vars) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-jobs--column-heading - ["%-45s %10s %6s" "Name Successful Age"]) - -(kubernetes-ast-define-component job-detail (state pod job) - (-let* (((&alist 'metadata (&alist 'namespace ns - 'creationTimestamp time) - 'spec (&alist 'template - (&alist 'spec (&alist 'restartPolicy restart-policy))) - 'status (&alist - 'startTime start-time - 'completionTime completion-time)) - job) - ((&alist 'items pods) (kubernetes-state-pods state))) - - `((section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - ,(when restart-policy - `(key-value 12 "RestartPolicy" ,restart-policy)) - (padding) - - (key-value 12 "Created" ,time) - ,(when start-time - `(key-value 12 "Started" ,start-time)) - ,(when completion-time - `(key-value 12 "Completed" ,completion-time)) - (padding) - - (section (pod nil) - (heading "Pod") - (indent - (membership-loading-container ,pod ,pods - (pod-line ,state ,pod) - (padding))))))) - -(kubernetes-ast-define-component job-line (state pod job) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-jobs-pending-deletion state)) - (marked-jobs (kubernetes-state-marked-jobs state)) - - ((&alist 'metadata (&alist 'name name 'creationTimestamp created-time) - 'status (&alist 'succeeded successful - 'completionTime completion-time)) - job) - (successful (or successful 0)) - ([fmt] kubernetes-jobs--column-heading) - (list-fmt (split-string fmt)) - (line (concat - ;; Name - (let ((name-str (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)))) - (cond - ((and completion-time (< 0 successful)) - (propertize name-str 'face 'magit-dimmed)) - ((not (kubernetes-pod-line-ok-p pod)) - (propertize name-str 'face 'warning)) - (t - name-str))) - " " - ;; Successful - (propertize (format (pop list-fmt) successful) 'face 'magit-dimmed) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed))))) - - `(nav-prop (:job-name ,name) - (copy-prop ,name - (line ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-jobs) - `(mark-for-delete ,line)) - (t - line))))))) - -(defun kubernetes-jobs--lookup-pod-for-job (job state) - (-let* (((&alist 'metadata (&alist 'labels (&alist 'job-name job-name))) job) - ((&alist 'items items) (kubernetes-state-pods state))) - (seq-find (lambda (pod) - (let ((pod-name (kubernetes-state-resource-name pod))) - (string-prefix-p job-name pod-name))) - items))) - -(kubernetes-ast-define-component job (state job) - (let ((pod (kubernetes-jobs--lookup-pod-for-job job state))) - `(section (,(intern (kubernetes-state-resource-name job)) t) - (heading (job-line ,state ,pod ,job)) - (section (details nil) - (indent - (job-detail ,state ,pod ,job)))))) - -(kubernetes-ast-define-component jobs-list (state &optional hidden) - (-let (((state-set-p &as &alist 'items jobs) (kubernetes-state-jobs state)) - ([fmt labels] kubernetes-jobs--column-heading)) - `(section (jobs-container ,hidden) - (header-with-count "Jobs" ,jobs) - (indent - (columnar-loading-container ,jobs - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,(--map `(job ,state ,it) jobs))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers jobs) - -(defun kubernetes-jobs-delete-marked (state) - (let ((names (kubernetes-state-marked-jobs state))) - (dolist (name names) - (kubernetes-state-delete-job name) - (kubernetes-kubectl-delete-job kubernetes-props state name - (lambda (_) - (message "Deleting job %s succeeded." name)) - (lambda (_) - (message "Deleting job %s failed" name) - (kubernetes-state-mark-job name)))) - (kubernetes-state-trigger-redraw))) - - -;; Displaying jobs - -(defun kubernetes-jobs--read-name (state) - "Read a job name from the user. - -STATE is the current application state. - -Update the job state if it not set yet." - (-let* (((&alist 'items jobs) - (or (kubernetes-state-jobs state) - (progn - (message "Getting jobs...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-jobs))) - (kubernetes-state-update-jobs response) - response)))) - (jobs (append jobs nil)) - (names (-map #'kubernetes-state-resource-name jobs))) - (completing-read "Job: " names nil t))) - -;;;###autoload -(defun kubernetes-display-job (job-name state) - "Display information for a job in a new window. - -STATE is the current application state. - -JOB-NAME is the name of the job to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-jobs--read-name state) state))) - (if-let (job (kubernetes-state-lookup-job job-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-job-buffer-name job))) - (error "Unknown job: %s" job-name))) - - -(provide 'kubernetes-jobs) - -;;; kubernetes-jobs.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-jobs.elc b/elpa/kubernetes-20200114.436/kubernetes-jobs.elc deleted file mode 100644 index 4f6790aa..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-jobs.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-kubectl.el b/elpa/kubernetes-20200114.436/kubernetes-kubectl.el deleted file mode 100644 index 7f2504f8..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-kubectl.el +++ /dev/null @@ -1,524 +0,0 @@ -;;; kubernetes-kubectl.el --- Low-level kubectl integration routines. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-process) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-vars) - -(autoload 'json-read-from-string "json") -(autoload 'kubernetes-utils-up-to-existing-dir "kubernetes-utils") - -(defun kubernetes-kubectl--default-error-handler (props status) - (unless (kubernetes-props-overview-buffer-selected-p props) - (let* ((last-error (kubernetes-props-get-last-error props)) - (last-error (concat - (or (when (listp last-error) - (alist-get 'command last-error)) - "undefined command") - ": " - (or (when (listp last-error) - (alist-get 'message last-error)) - "undefined error"))) - (process-killed-manually (string-match-p (rx bol (* space) "killed:" (* space) "9" (* space) eol) status))) - (unless process-killed-manually - (kubernetes-props-message props (string-trim-right last-error)))))) - -(defun kubernetes-kubectl--flags-from-state (state) - (append (when-let (ns (kubernetes-state-current-namespace state)) - (list (format "--namespace=%s" ns))) - (kubernetes-state-kubectl-flags state))) - -(defun kubernetes-kubectl (props state args on-success &optional on-error cleanup-cb) - "Run kubectl with ARGS. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the current application state, used to apply additional -global flags to kubectl. - -ON-SUCCESS is a function of one argument, called with the process' buffer. - -Optional ON-ERROR is a function of two arguments, called with the -process' stderr buffer. If omitted, it defaults to -`kubernetes-kubectl--default-error-handler', which logs an error -if the process exited unexpectedly. - -Optional CLEANUP-CB is a function of no arguments that is always -called after the other callbacks. It can be used for releasing -resources. - -After callbacks are executed, the process and its buffer will be killed. - -Returns the process object for this execution of kubectl." - (let* ((buf (generate-new-buffer " kubectl")) - (err-buf (generate-new-buffer " kubectl-err")) - (command (append (list kubernetes-kubectl-executable) args (kubernetes-kubectl--flags-from-state state))) - - ;; `default-directory' must exist, otherwise `make-process' raises an - ;; error. - (default-directory (kubernetes-utils-up-to-existing-dir default-directory)) - (proc (make-process - :name "kubectl" - :buffer buf - :stderr err-buf - :command command - :noquery t - :sentinel - (lambda (proc status) - (unwind-protect - (let ((exit-code (process-exit-status proc))) - (cond - ((zerop exit-code) - (funcall on-success buf)) - (t - (let ((err-message (with-current-buffer err-buf (buffer-string)))) - (unless (= 9 exit-code) - (kubernetes-props-update-last-error props err-message (string-join command " ") (current-time)))) - (cond (on-error - (funcall on-error err-buf)) - (t - (kubernetes-kubectl--default-error-handler props status)))))) - (when cleanup-cb - (funcall cleanup-cb)) - (kubernetes-process-kill-quietly proc)))))) - - ;; Clean up stderr buffer when stdout buffer is killed. - (with-current-buffer buf - (add-hook 'kill-buffer-hook (lambda () - (let ((kill-buffer-query-functions nil)) - (ignore-errors (kill-buffer err-buf)))) - nil t)) - - proc)) - -(defun kubernetes-kubectl-get-pods (props state cb &optional cleanup-cb) - "Get all pods and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "pods" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-nodes (props state cb &optional cleanup-cb) - "Get all nodes and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "nodes" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-configmaps (props state cb &optional cleanup-cb) - "Get all configmaps and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "configmaps" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-deployments (props state cb &optional cleanup-cb) - "Get all deployments and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "deployments" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-statefulsets (props state cb &optional cleanup-cb) - "Get all statefulsets and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "statefulsets" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-ingress (props state cb &optional cleanup-cb) - "Get all ingress and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "ingress" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-jobs (props state cb &optional cleanup-cb) - "Get all jobs and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "jobs" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-secrets (props state cb &optional cleanup-cb) - "Get all secrets and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "secrets" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-get-services (props state cb &optional cleanup-cb) - "Get all services and execute callback CB with the parsed JSON. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "services" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-config-view (props state cb &optional cleanup-cb) - "Get the current configuration and pass it to CB. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props - state - '("config" "view" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-config-use-context (props state context-name cb) - "Change the current kubernetes context to CONTEXT-NAME, a string. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CB is a function taking the name of the context that was switched to." - (kubernetes-kubectl props - state - (list "config" "use-context" context-name) - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "Switched to context \"" (group (+? nonl)) "\"." (* space) eol) - (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))))) - -(defun kubernetes-kubectl-get-namespaces (props state cb &optional cleanup-cb) - "Get namespaces for the current cluster and pass the parsed response to CB. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -CLEANUP-CB is a function taking no arguments used to release any resources." - (kubernetes-kubectl props state '("get" "namespaces" "-o" "json") - (lambda (buf) - (let ((json (with-current-buffer buf - (json-read-from-string (buffer-string))))) - (funcall cb json))) - nil - cleanup-cb)) - -(defun kubernetes-kubectl-delete-pod (props state pod-name cb &optional error-cb) - "Delete pod with POD-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "pod" pod-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "pod/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-delete-configmap (props state configmap-name cb &optional error-cb) - "Delete CONFIGMAP-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "configmap" configmap-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "configmap/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - - -(defun kubernetes-kubectl-delete-ingress (props state ingress-name cb &optional error-cb) - "Delete INGRESS-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "ingress" ingress-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "ingress/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-delete-secret (props state secret-name cb &optional error-cb) - "Delete SECRET-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "secret" secret-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "secret/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-describe-pod (props state pod-name cb) - "Describe pod with POD-NAME, then execute CB with the string response. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state." - (kubernetes-kubectl props state (list "describe" "pod" pod-name) - (lambda (buf) - (let ((s (with-current-buffer buf (buffer-string)))) - (funcall cb s))))) - -(defun kubernetes-kubectl-delete-service (props state service-name cb &optional error-cb) - "Delete SERVICE-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "service" service-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "service/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-delete-deployment (props state deployment-name cb &optional error-cb) - "Delete DEPLOYMENT-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "deployment" deployment-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "deployment/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - - -(defun kubernetes-kubectl-delete-statefulset (props state statefulset-name cb &optional error-cb) - "Delete STATEFULSET-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "statefulset" statefulset-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "statefulset/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-delete-job (props state job-name cb &optional error-cb) - "Delete JOB-NAME, then execute CB with the response buffer. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -ERROR-CB is called if an error occurred." - (kubernetes-kubectl props state (list "delete" "job" job-name "-o" "name") - (lambda (buf) - (with-current-buffer buf - (string-match (rx bol "job/" (group (+ nonl))) (buffer-string)) - (funcall cb (match-string 1 (buffer-string))))) - error-cb)) - -(defun kubernetes-kubectl-await (command &rest callbacks) - "Apply COMMAND to list of CALLBACKS where first callback is assumed on-success. -If no callbacks called within `kubernetes-kubectl-timeout-seconds', give up, -possibly orphaning a process. -Return result of first callback if success, nil otherwise." - (let* (result - complete - sentinelized - (sentinel (lambda (&rest _args) (setq complete t)))) - (mapc (lambda (f) - (when (functionp f) - (add-function :before (var f) sentinel)) - (push f sentinelized)) - callbacks) - (setf sentinelized (nreverse sentinelized)) - (when (functionp (car sentinelized)) - (add-function :around (car sentinelized) - (lambda (f &rest args) - (setq result (apply f args))))) - (cl-loop initially do (apply command sentinelized) - with ms = 500 - with count = (max 1 (truncate - (/ (* 1000 kubernetes-kubectl-timeout-seconds) - ms))) - repeat count - until complete - do (sleep-for 0 ms) - finally return result))) - -(defmacro kubernetes-kubectl-await-command (resource for-items) - (declare (indent defun)) - "Await kubectl updating state's RESOURCE and return result of calling -FOR-ITEMS on updated RESOURCEs." - `(kubernetes-kubectl-await - (apply-partially #'kubernetes-kubectl - kubernetes-props - (kubernetes-state) - (split-string ,(format "get %s -o json" (symbol-name resource)))) - (lambda (buf) - (with-current-buffer buf - (,(intern (concat "kubernetes-state-update-" (symbol-name resource))) - (json-read-from-string (buffer-string))) - (-let* (((&alist 'items) - (,(intern (concat "kubernetes-state-" (symbol-name resource))) - (kubernetes-state)))) - (seq-map ,for-items items)))) - nil - #'ignore)) - -(defun kubernetes-kubectl-await-on-async (props state fn) - "Turn an async function requiring a callback into a synchronous one. - -PROPS is an alist of functions to inject. It should normally be passed -`kubernetes-props'. - -STATE is the application state. - -Transforms a function of type: - - FN : (props, state, a -> b) -> process - -to a function of the type: - - FN' : () -> a" - (let* (complete result) - (funcall fn props state (lambda (response) - (setq complete t) - (setq result response))) - - (while (not complete) - (sleep-for 0.001)) - - result)) - -(provide 'kubernetes-kubectl) - -;;; kubernetes-kubectl.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-kubectl.elc b/elpa/kubernetes-20200114.436/kubernetes-kubectl.elc deleted file mode 100644 index 2422cc8e..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-kubectl.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-labels.el b/elpa/kubernetes-20200114.436/kubernetes-labels.el deleted file mode 100644 index d19ab42d..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-labels.el +++ /dev/null @@ -1,85 +0,0 @@ -;;; kubernetes-labels.el --- Utils for displaying resources with a particular label. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-commands) -(require 'kubernetes-loading-container) -(require 'kubernetes-pods) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-vars) - -;; Component - -(kubernetes-ast-define-component labelled-pods-list (state) - (-let* ((query (kubernetes-state-label-query state)) - ((&alist 'items pods) (kubernetes-state-pods state)) - (matches (nreverse (seq-reduce - (lambda (acc pod) - (if (equal query (kubernetes-state-resource-label pod)) - (cons `(pod ,state ,pod) acc) - acc)) - pods - nil))) - ([fmt labels] kubernetes-pods--column-heading)) - `(section (root nil) - (section (query-header nil) - (key-value 10 "Label" ,(propertize query 'face 'kubernetes-selector)) - (padding)) - (indent - (columnar-loading-container ,pods - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,matches))))) - -;; Commands - -(defun kubernetes-labels--redraw-buffer () - "Redraws the labels query buffer using the current state." - (when-let (buf (get-buffer kubernetes-label-query-buffer-name)) - (with-current-buffer buf - ;; Only redraw the buffer if it is in the selected window. - (when (equal (get-buffer-window buf) - (selected-window)) - (kubernetes-utils--save-window-state - (let ((inhibit-read-only t)) - (erase-buffer) - (kubernetes-ast-eval `(labelled-pods-list ,(kubernetes-state))))) - - ;; Force the section at point to highlight. - (magit-section-update-highlight))))) - -(defun kubernetes-labels--initialize-buffer () - "Called the first time the labels buffer is opened to set up the buffer." - (let ((buf (get-buffer-create kubernetes-label-query-buffer-name))) - (with-current-buffer buf - (kubernetes-mode) - (kubernetes-timers-initialize-timers) - (add-hook 'kubernetes-redraw-hook #'kubernetes-labels--redraw-buffer) - (add-hook 'kill-buffer-hook (kubernetes-utils-make-cleanup-fn buf) nil t)) - buf)) - -;;;###autoload -(defun kubernetes-show-pods-for-label (label-query) - "Display a buffer for pods matching a label. - -LABEL-QUERY is a string used to match pods." - (interactive - (-let* (((&alist 'items pods) (kubernetes-state-pods (kubernetes-state))) - (labels (-non-nil (-uniq (seq-map #'kubernetes-state-resource-label pods))))) - (list (completing-read "Label: " labels)))) - - (kubernetes-state-update-label-query label-query) - (with-current-buffer (kubernetes-labels--initialize-buffer) - (kubernetes-commands-display-buffer (current-buffer)) - (kubernetes-labels--redraw-buffer))) - - -(provide 'kubernetes-labels) - -;;; kubernetes-labels.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-labels.elc b/elpa/kubernetes-20200114.436/kubernetes-labels.elc deleted file mode 100644 index 7b0ae2a8..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-labels.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-loading-container.el b/elpa/kubernetes-20200114.436/kubernetes-loading-container.el deleted file mode 100644 index 0e33a361..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-loading-container.el +++ /dev/null @@ -1,78 +0,0 @@ -;;; kubernetes-loading-container.el --- Component for resources that are loaded asynchronously. -*- lexical-binding: t; -*- -;;; Commentary: - -;; A loading container displays placeholder text while a resource is loading in -;; the background. -;; -;; Other components build on this functionality to render differently depending -;; on the loaded state of some resource. - -;;; Code: - -(require 'kubernetes-ast) - -(kubernetes-ast-define-component membership-loading-discriminator (elem vector &key on-loading on-found on-not-found) - (cond - ((null vector) - on-loading) - ((and vector (seq-contains vector elem)) - on-found) - (t - on-not-found))) - -(kubernetes-ast-define-component membership-loading-container (elem vector &rest loaded-content) - `(membership-loading-discriminator - ,elem ,vector - - :on-loading - (line (propertize (face kubernetes-progress-indicator) (line "Fetching..."))) - - :on-found - ,loaded-content - - :on-not-found - (line (propertize (face kubernetes-progress-indicator) "Not found.")))) - - -(kubernetes-ast-define-component emptiness-loading-discriminator (vector &key on-loading on-empty on-populated) - (cond - ((and (vectorp vector) (equal 0 (length vector))) - on-empty) - (vector - on-populated) - (t - on-loading))) - -(kubernetes-ast-define-component columnar-loading-container (resource-vector column-header &rest loaded-content) - `(emptiness-loading-discriminator - ,resource-vector - - :on-loading - (,@(when column-header - (list (cons 'line (list column-header)))) - (propertize (face kubernetes-progress-indicator) - (line "Fetching..."))) - - :on-empty - (propertize (face magit-dimmed) (line "None.")) - - :on-populated - (,@(when column-header - (list (cons 'line (list column-header)))) - ,@loaded-content))) - -(kubernetes-ast-define-component header-with-count (header resource-vector) - (let ((header (propertize header 'face 'magit-header-line))) - `(heading - (emptiness-loading-discriminator - ,resource-vector - :on-loading - ,header - :on-empty - ,(concat header " (0)") - :on-populated - ,(concat header (format " (%s)" (length resource-vector))))))) - -(provide 'kubernetes-loading-container) - -;;; kubernetes-loading-container.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-loading-container.elc b/elpa/kubernetes-20200114.436/kubernetes-loading-container.elc deleted file mode 100644 index d637aee9..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-loading-container.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-logs.el b/elpa/kubernetes-20200114.436/kubernetes-logs.el deleted file mode 100644 index f8879ec9..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-logs.el +++ /dev/null @@ -1,132 +0,0 @@ -;;; kubernetes-logs.el --- Utilities for working with log buffers. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'subr-x) - -(require 'kubernetes-modes) -(require 'kubernetes-popups) -(require 'kubernetes-utils) - -(autoload 'json-pretty-print-buffer "json") - -(require 'kubernetes-vars) - -(defun kubernetes-logs--log-line-buffer-for-string (s) - (let ((propertized (with-temp-buffer - (insert s) - (goto-char (point-min)) - (when (equal (char-after) ?\{) - (json-pretty-print-buffer) - (funcall kubernetes-json-mode) - (font-lock-ensure)) - (buffer-string)))) - - (with-current-buffer (get-buffer-create kubernetes-log-line-buffer-name) - (kubernetes-log-line-mode) - (let ((inhibit-read-only t)) - (erase-buffer) - (insert propertized) - (goto-char (point-min))) - (current-buffer)))) - -;;;###autoload -(defun kubernetes-logs-inspect-line (pos) - "Show detail for the log line at POS." - (interactive "d") - (display-buffer (kubernetes-logs--log-line-buffer-for-string - (save-excursion - (goto-char pos) - (buffer-substring (line-beginning-position) (line-end-position)))))) - -;;;###autoload -(defun kubernetes-logs-previous-line () - "Move backward and inspect the line at point." - (interactive) - (with-current-buffer kubernetes-logs-buffer-name - (forward-line -1) - (when (get-buffer kubernetes-log-line-buffer-name) - (kubernetes-logs-inspect-line (point))))) - -;;;###autoload -(defun kubernetes-logs-forward-line () - "Move forward and inspect the line at point." - (interactive) - (with-current-buffer kubernetes-logs-buffer-name - (forward-line 1) - (when (get-buffer kubernetes-log-line-buffer-name) - (kubernetes-logs-inspect-line (point))))) - -;;;###autoload -(defun kubernetes-logs-follow (pod-name args state) - "Open a streaming logs buffer for a pod. - -POD-NAME is the name of the pod to log. - -ARGS are additional args to pass to kubectl. - -STATE is the current application state." - (interactive - (let ((state (kubernetes-state))) - (list (or (kubernetes-utils-maybe-pod-name-at-point) - (kubernetes-utils-read-pod-name state)) - (kubernetes-logs-arguments) - state))) - (kubernetes-logs-fetch-all pod-name (cons "-f" args) state)) - -;;;###autoload -(defun kubernetes-logs-fetch-all (pod-name args state) - "Open a streaming logs buffer for POD. - -POD-NAME is the name of the pod to log. - -ARGS are additional args to pass to kubectl. - -STATE is the current application state" - (interactive - (let ((state (kubernetes-state))) - (list (or (kubernetes-utils-maybe-pod-name-at-point) (kubernetes-utils-read-pod-name state)) - (kubernetes-logs-arguments) - state))) - (let ((args (append (list "logs") args (list pod-name) (kubernetes-kubectl--flags-from-state (kubernetes-state)) - (when-let (ns (kubernetes-state-current-namespace state)) - (list (format "--namespace=%s" ns)))))) - (with-current-buffer (kubernetes-utils-process-buffer-start kubernetes-logs-buffer-name #'kubernetes-logs-mode kubernetes-kubectl-executable args) - (select-window (display-buffer (current-buffer)))))) - - -;;;###autoload -(defvar kubernetes-logs-mode-map - (let ((keymap (make-sparse-keymap))) - (define-key keymap (kbd "n") #'kubernetes-logs-forward-line) - (define-key keymap (kbd "p") #'kubernetes-logs-previous-line) - (define-key keymap (kbd "RET") #'kubernetes-logs-inspect-line) - keymap) - "Keymap for `kubernetes-logs-mode'.") - -;;;###autoload -(define-derived-mode kubernetes-logs-mode kubernetes-mode "Kubernetes Logs" - "Mode for displaying and inspecting Kubernetes logs. - -\\\ -Type \\[kubernetes-logs-inspect-line] to open the line at point in a new buffer. - -\\{kubernetes-logs-mode-map}") - -;;;###autoload -(defvar kubernetes-log-line-mode-map - (let ((keymap (make-sparse-keymap))) - (define-key keymap (kbd "n") #'kubernetes-logs-forward-line) - (define-key keymap (kbd "p") #'kubernetes-logs-previous-line) - keymap) - "Keymap for `kubernetes-log-line-mode'.") - -;;;###autoload -(define-derived-mode kubernetes-log-line-mode kubernetes-mode "Log Line" - "Mode for inspecting Kubernetes log lines. - -\\{kubernetes-log-line-mode-map}") - -(provide 'kubernetes-logs) - -;;; kubernetes-logs.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-logs.elc b/elpa/kubernetes-20200114.436/kubernetes-logs.elc deleted file mode 100644 index f85cb8dd..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-logs.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-modes.el b/elpa/kubernetes-20200114.436/kubernetes-modes.el deleted file mode 100644 index d932c559..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-modes.el +++ /dev/null @@ -1,90 +0,0 @@ -;;; kubernetes-modes.el --- Base modes for Kubernetes. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'magit) -(require 'subr-x) - -(autoload 'kubernetes-config-popup "kubernetes-popups") -(autoload 'kubernetes-copy-thing-at-point "kubernetes-commands") -(autoload 'kubernetes-describe-popup "kubernetes-popups") -(autoload 'kubernetes-exec-popup "kubernetes-popups") -(autoload 'kubernetes-execute-marks "kubernetes-commands") -(autoload 'kubernetes-labels-popup "kubernetes-popups") -(autoload 'kubernetes-logs-popup "kubernetes-popups") -(autoload 'kubernetes-mark-for-delete "kubernetes-commands") -(autoload 'kubernetes-navigate "kubernetes-commands") -(autoload 'kubernetes-overview-popup "kubernetes-popups") -(autoload 'kubernetes-refresh "kubernetes-commands") -(autoload 'kubernetes-unmark "kubernetes-commands") -(autoload 'kubernetes-unmark-all "kubernetes-commands") - -;;;###autoload -(define-derived-mode kubernetes-display-thing-mode kubernetes-mode "Kubernetes Object" - "Mode for inspecting a Kubernetes object. - -\\{kubernetes-display-thing-mode-map}" - :group 'kubernetes) - -;;;###autoload -(defvar kubernetes-mode-map - (let ((keymap (make-sparse-keymap))) - ;; Section controls - (define-key keymap (kbd "p") #'magit-section-backward) - (define-key keymap (kbd "n") #'magit-section-forward) - (define-key keymap (kbd "M-p") #'magit-section-backward-sibling) - (define-key keymap (kbd "M-n") #'magit-section-forward-sibling) - (define-key keymap (kbd "C-i") #'magit-section-toggle) - (define-key keymap (kbd "^") #'magit-section-up) - (define-key keymap [tab] #'magit-section-toggle) - (define-key keymap [C-tab] #'magit-section-cycle) - (define-key keymap [M-tab] #'magit-section-cycle-diffs) - (define-key keymap [S-tab] #'magit-section-cycle-global) - ;; Misc - (define-key keymap (kbd "q") #'quit-window) - (define-key keymap (kbd "RET") #'kubernetes-navigate) - (define-key keymap (kbd "M-w") #'kubernetes-copy-thing-at-point) - (define-key keymap (kbd "h") #'describe-mode) - - (define-key keymap (kbd "?") #'kubernetes-overview-popup) - (define-key keymap (kbd "c") #'kubernetes-config-popup) - (define-key keymap (kbd "d") #'kubernetes-describe-popup) - (define-key keymap (kbd "D") #'kubernetes-mark-for-delete) - (define-key keymap (kbd "e") #'kubernetes-exec-popup) - (define-key keymap (kbd "g") #'kubernetes-refresh) - (define-key keymap (kbd "l") #'kubernetes-logs-popup) - (define-key keymap (kbd "L") #'kubernetes-labels-popup) - (define-key keymap (kbd "u") #'kubernetes-unmark) - (define-key keymap (kbd "U") #'kubernetes-unmark-all) - (define-key keymap (kbd "x") #'kubernetes-execute-marks) - - keymap) - "Keymap for `kubernetes-mode'. This is the base keymap for all derived modes.") - -;;;###autoload -(define-derived-mode kubernetes-mode special-mode "Kubernetes" - "Base mode for Kubernetes modes. - -\\{kubernetes-mode-map}" - :group 'kubernetes - (read-only-mode) - (buffer-disable-undo) - (setq truncate-lines t) - (setq-local line-move-visual t) - (setq show-trailing-whitespace nil) - (setq list-buffers-directory (abbreviate-file-name default-directory)) - (hack-dir-local-variables-non-file-buffer) - (make-local-variable 'text-property-default-nonsticky) - (push (cons 'keymap t) text-property-default-nonsticky) - (push (cons 'kubernetes-nav t) text-property-default-nonsticky) - (push (cons 'kubernetes-copy t) text-property-default-nonsticky) - (add-hook 'post-command-hook #'magit-section-update-highlight t t) - (when (bound-and-true-p global-linum-mode) - (linum-mode -1)) - (when (and (fboundp 'nlinum-mode) - (bound-and-true-p global-nlinum-mode)) - (nlinum-mode -1))) - -(provide 'kubernetes-modes) - -;;; kubernetes-modes.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-modes.elc b/elpa/kubernetes-20200114.436/kubernetes-modes.elc deleted file mode 100644 index 81a418f9..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-modes.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-namespaces.el b/elpa/kubernetes-20200114.436/kubernetes-namespaces.el deleted file mode 100644 index 9e9d93c8..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-namespaces.el +++ /dev/null @@ -1,53 +0,0 @@ -;;; kubernetes-namespaces.el --- Helpers for Kubernetes namespaces. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'kubernetes-kubectl) -(require 'kubernetes-process) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-yaml) - - -;; Requests and state management - -(kubernetes-state-define-refreshers namespaces) - -;; Displaying namespaces - -(defun kubernetes-namespaces--read-name (state) - "Read a namespace name from the user. - -STATE is the current application state. - -Update the namespace state if it not set yet." - (-let* (((&alist 'items namespaces) - (or (kubernetes-state-namespaces state) - (progn - (message "Getting namespaces...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-namespaces))) - (kubernetes-state-update-namespaces response) - response)))) - (namespaces (append namespaces nil)) - (names (-map #'kubernetes-state-resource-name namespaces))) - (completing-read "Namespace: " names nil t))) - -;;;###autoload -(defun kubernetes-display-namespace (namespace-name state) - "Display information for a namespace in a new window. - -STATE is the current application state. - -NAMESPACE-NAME is the name of the namespace to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-namespaces--read-name state) state))) - (if-let (namespace (kubernetes-state-lookup-namespace namespace-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-namespace-buffer-name namespace))) - (error "Unknown namespace: %s" namespace-name))) - - -(provide 'kubernetes-namespaces) - -;;; kubernetes-namespaces.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-namespaces.elc b/elpa/kubernetes-20200114.436/kubernetes-namespaces.elc deleted file mode 100644 index 8d7b1bb1..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-namespaces.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-nodes.el b/elpa/kubernetes-20200114.436/kubernetes-nodes.el deleted file mode 100644 index 9398d626..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-nodes.el +++ /dev/null @@ -1,155 +0,0 @@ -;;; kubernetes-nodes.el --- Rendering for Kubernetes nodes -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'seq) - -(require 'kubernetes-ast) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-nodes--column-heading - ["%-45s %-10s %-9s %-4s %8s" "Name Status Roles Age Version"]) - -(kubernetes-ast-define-component node-detail (node) - (-let (((&alist 'metadata (&alist 'name) - 'status (&alist 'addresses 'nodeInfo)) - node)) - `((key-value 12 "Name" ,name) - ,@(mapcar - (lambda (addr) - (-let [(&alist 'address 'type) addr] - `(key-value 12 ,type ,address))) - addresses) - ,@(mapcar - (lambda (pair) - (cl-destructuring-bind (key . val) pair - `(key-value 12 ,(symbol-name key) ,val))) - nodeInfo)))) - -(kubernetes-ast-define-component node-line (state node) - (-let* ((current-time (kubernetes-state-current-time state)) - ((&alist 'metadata (&alist 'name 'labels 'creationTimestamp) - 'status (&alist 'conditions - 'nodeInfo (&alist 'kubeProxyVersion))) - node) - ([fmt] kubernetes-nodes--column-heading) - (list-fmt (split-string fmt)) - (type (or (seq-some (lambda (x) (when (string= (alist-get 'status x) "True") - (alist-get 'type x))) - conditions) - "Unknown")) - (str - (concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Status - (let ((s (kubernetes-utils-ellipsize type 10))) - (format (pop list-fmt) - (if (string-match-p "running" type) - (propertize s 'face 'magit-dimmed) - s))) - " " - ;; Roles - (format (pop list-fmt) - (kubernetes-utils-ellipsize - (or - (seq-some (lambda (x) - (when (string-match - "node-role.kubernetes.io/\\(.+\\)$" - x) - (match-string 1 x))) - (mapcar (lambda (x) (symbol-name (car x))) labels)) - "") - 8)) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp creationTimestamp)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)) - " " - ;; Version - (format (pop list-fmt) - (propertize (kubernetes-utils-ellipsize kubeProxyVersion 8) - 'face 'magit-dimmed)))) - (str (cond - ((string-match-p "ready" type) str) - (t (propertize str 'face 'warning)))) - (line `(line ,str))) - `(nav-prop (:node-name ,name) - (copy-prop ,name ,line)))) - -(kubernetes-ast-define-component node (state node) - `(section (,(intern (kubernetes-state-resource-name node)) t) - (heading (node-line ,state ,node)) - (indent - (section (details nil) - (node-detail ,node) - (padding))))) - -(kubernetes-ast-define-component nodes-list (state &optional hidden) - (-let (((&alist 'items nodes) (kubernetes-state-nodes state)) - ([fmt labels] kubernetes-nodes--column-heading)) - `(section (nodes-container ,hidden) - (header-with-count "Nodes" ,nodes) - (indent - (columnar-loading-container ,nodes - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,@(--map `(node ,state ,it) nodes))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers nodes) - -;; Interactive commands - -(defun kubernetes-nodes--read-name (state) - "Read a node name from the user. - -STATE is the current application state. - -Update the node state if it not set yet." - (-let* (((&alist 'items nodes) - (or (kubernetes-state-nodes state) - (progn - (message "Getting nodes...") - (let ((response (kubernetes-kubectl-await-on-async - kubernetes-props state - #'kubernetes-kubectl-get-nodes))) - (kubernetes-state-update-nodes response) - response)))) - (nodes (append nodes nil)) - (names (-map #'kubernetes-state-resource-name nodes))) - (completing-read "Node: " names nil t))) - -;;;###autoload -(defun kubernetes-display-node (node-name state) - "Display information for a node in a new window. - -STATE is the current application state. - -NODE-NAME is the name of the node to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-nodes--read-name state) state))) - (if-let (node (kubernetes-state-lookup-node node-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-node-buffer-name node))) - (error "Unknown node: %s" node-name))) - -(provide 'kubernetes-nodes) - -;;; kubernetes-nodes.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-nodes.elc b/elpa/kubernetes-20200114.436/kubernetes-nodes.elc deleted file mode 100644 index cd4afaec..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-nodes.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-overview.el b/elpa/kubernetes-20200114.436/kubernetes-overview.el deleted file mode 100644 index 32bf9a59..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-overview.el +++ /dev/null @@ -1,455 +0,0 @@ -;;; kubernetes-overview.el --- Utilities for managing the overview buffer. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'subr-x) - -(require 'kubernetes-ast) -(require 'kubernetes-commands) -(require 'kubernetes-configmaps) -(require 'kubernetes-contexts) -(require 'kubernetes-deployments) -(require 'kubernetes-statefulsets) -(require 'kubernetes-nodes) -(require 'kubernetes-errors) -(require 'kubernetes-ingress) -(require 'kubernetes-jobs) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-namespaces) -(require 'kubernetes-pods) -(require 'kubernetes-pod-line) -(require 'kubernetes-popups) -(require 'kubernetes-secrets) -(require 'kubernetes-services) -(require 'kubernetes-timers) - -(autoload 'kubernetes-utils-up-to-existing-dir "kubernetes-utils") - - -;; Configmaps - -(defun kubernetes-overview--referenced-configmaps (state pod) - (-let* (((&alist 'items configmaps) (kubernetes-state-configmaps state)) - (configmaps (append configmaps nil)) - ((&alist 'spec (&alist 'volumes volumes 'containers containers)) pod) - - (names-in-volumes - (->> volumes - (seq-mapcat - (lambda (volume) - (-when-let ((&alist 'configMap (&alist 'name name)) volume) - (list name)))))) - - (names-in-env - (->> containers - (seq-mapcat (-lambda ((&alist 'env env)) env)) - (seq-mapcat - (lambda (env) - (-when-let ((&alist 'valueFrom (&alist 'configMapKeyRef (&alist 'name name))) env) - (list name)))))) - - (references (-uniq (-union names-in-volumes names-in-env)))) - - (seq-filter (-lambda ((&alist 'metadata (&alist 'name name))) - (member name references)) - configmaps))) - -(defun kubernetes-overview--configmaps-for-deployment (state pods) - (->> pods - (seq-mapcat (lambda (pod) (kubernetes-overview--referenced-configmaps state pod))) - -non-nil - -uniq - (seq-sort (lambda (s1 s2) - (string< (kubernetes-state-resource-name s1) - (kubernetes-state-resource-name s2)))))) - -(defun kubernetes-overview--configmaps-for-statefulset (state pods) - (->> pods - (seq-mapcat (lambda (pod) (kubernetes-overview--referenced-configmaps state pod))) - -non-nil - -uniq - (seq-sort (lambda (s1 s2) - (string< (kubernetes-state-resource-name s1) - (kubernetes-state-resource-name s2)))))) - -(kubernetes-ast-define-component aggregated-configmap-line (state configmap) - (-let* ((pending-deletion (kubernetes-state-configmaps-pending-deletion state)) - (marked-configmaps (kubernetes-state-marked-configmaps state)) - ((&alist 'metadata (&alist 'name name )) configmap) - (line (cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,name)) - ((member name marked-configmaps) - `(mark-for-delete ,name)) - (t - name)))) - `(section (,(intern (kubernetes-state-resource-name configmap)) t) - (nav-prop (:configmap-name ,name) - (copy-prop ,name (line ,line)))))) - -(kubernetes-ast-define-component aggregated-configmaps (state configmaps) - `(section (configmaps nil) - (heading "Configmaps") - (indent ,(--map `(aggregated-configmap-line ,state ,it) configmaps)) - (padding))) - - -;; Secrets - -(defun kubernetes-overview--referenced-secrets (secrets pod) - (-let* (((&alist 'spec (&alist 'volumes vols 'containers containers)) pod) - (combined-env (seq-mapcat (-lambda ((&alist 'env env)) - env) - containers)) - (names-in-volumes - (seq-mapcat - (lambda (volume) - (-when-let ((&alist 'secret (&alist 'secretName name)) volume) - (list name))) - vols)) - - (names-in-env - (seq-mapcat - (lambda (env) - (-when-let ((&alist 'valueFrom (&alist 'secretKeyRef (&alist 'name name))) env) - (list name))) - combined-env)) - - (references (-union names-in-volumes names-in-env)) - (matches (seq-filter (lambda (secret) - (member (kubernetes-state-resource-name secret) references)) - secrets))) - (seq-sort (lambda (s1 s2) - (string< (kubernetes-state-resource-name s1) - (kubernetes-state-resource-name s2))) - matches))) - -(defun kubernetes-overview--secrets-for-deployment (state pods) - (-let* (((&alist 'items secrets) (kubernetes-state-secrets state)) - (secrets (append secrets nil))) - (-non-nil (-uniq (seq-mapcat (lambda (pod) - (kubernetes-overview--referenced-secrets secrets pod)) - pods))))) - -(defun kubernetes-overview--secrets-for-statefulset (state pods) - (-let* (((&alist 'items secrets) (kubernetes-state-secrets state)) - (secrets (append secrets nil))) - (-non-nil (-uniq (seq-mapcat (lambda (pod) - (kubernetes-overview--referenced-secrets secrets pod)) - pods))))) - -(kubernetes-ast-define-component aggregated-secret-line (state secret) - (-let* ((pending-deletion (kubernetes-state-secrets-pending-deletion state)) - (marked-secrets (kubernetes-state-marked-secrets state)) - ((&alist 'metadata (&alist 'name name )) secret) - (line (cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,name)) - ((member name marked-secrets) - `(mark-for-delete ,name)) - (t - name)))) - `(section (,(intern (kubernetes-state-resource-name secret)) t) - (nav-prop (:secret-name ,name) - (copy-prop ,name (line ,line)))))) - -(kubernetes-ast-define-component aggregated-secrets (state secrets) - `(section (secrets nil) - (heading "Secrets") - (indent ,(--map `(aggregated-secret-line ,state ,it) secrets)) - (padding))) - - -;; Pods - -(defun kubernetes-overview--pods-for-deployment (state deployment) - (-let* (((&alist 'spec (&alist 'selector (&alist 'matchLabels selectors))) deployment) - ((&alist 'items pods) (kubernetes-state-pods state)) - (pods (append pods nil))) - (nreverse (seq-reduce - (lambda (acc pod) - (-let [(&alist 'metadata (&alist 'labels labels)) pod] - ;; The labels present on the pod must contain all selector labels - (if (-all? (lambda (label) (-contains? labels label)) selectors) - (cons pod acc) - acc))) - pods - nil)))) - -(defun kubernetes-overview--pods-for-statefulset (state statefulset) - (-let* (((&alist 'spec (&alist 'selector (&alist 'matchLabels (&alist 'name selector-name)))) statefulset) - ((&alist 'items pods) (kubernetes-state-pods state)) - (pods (append pods nil))) - (nreverse (seq-reduce - (lambda (acc pod) - (if (equal selector-name (kubernetes-state-resource-label pod)) - (cons pod acc) - acc)) - pods - nil)))) - -(kubernetes-ast-define-component aggregated-pods (state deployment pods) - (-let [(&alist 'spec (&alist - 'replicas replicas - 'selector (&alist 'matchLabels - (&alist 'name selector-name - 'component component-name) - 'matchExpressions match-expressions))) - deployment] - `(section (pods nil) - (heading "Pods") - (indent - ,(when selector-name - `(section (selector nil) - (nav-prop (:selector ,selector-name) - (key-value 12 "Selector" ,(propertize selector-name 'face 'kubernetes-selector))))) - ,(when component-name - `(section (component nil) - (nav-prop (:component ,component-name) - (key-value 12 "Component" ,(propertize component-name 'face 'kubernetes-component))))) - ,(when match-expressions - `(section (expressions nil) - (heading "Match Expressions") - (indent ,(kubernetes-yaml-render match-expressions)))) - (key-value 12 "Replicas" ,(format "%s" (or replicas 1))) - (columnar-loading-container ,(kubernetes-state-pods state) nil - ,@(seq-map (lambda (pod) `(pod-line ,state ,pod)) pods))) - (padding)))) - -;; Deployment - -(kubernetes-ast-define-component aggregated-deployment-detail (deployment) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time) - 'spec (&alist - 'paused paused - 'strategy (&alist - 'type strategy-type - 'rollingUpdate rolling-update))) - deployment] - `(,(when paused `(line (propertize (face warning) "Deployment Paused"))) - (section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - ,(-if-let ((&alist 'maxSurge surge 'maxUnavailable unavailable) rolling-update) - `(section (strategy t) - (heading (key-value 12 "Strategy" ,strategy-type)) - (indent - ((key-value 12 "Max Surge" ,(format "%s" surge)) - (key-value 12 "Max Unavailable" ,(format "%s" unavailable))))) - `(key-value 12 "Strategy" ,strategy-type)) - (key-value 12 "Created" ,time)))) - -;; Statefulset - -(kubernetes-ast-define-component aggregated-statefulset-detail (statefulset) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time) - 'spec (&alist - 'paused paused - 'strategy (&alist - 'type _strategy-type - 'rollingUpdate _rolling-update))) - statefulset] - `(,(when paused `(line (propertize (face warning) "Statefulset Paused"))) - (section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component aggregated-deployment (state deployment) - (let* ((pods (kubernetes-overview--pods-for-deployment state deployment)) - (configmaps (kubernetes-overview--configmaps-for-deployment state pods)) - (secrets (kubernetes-overview--secrets-for-deployment state pods))) - `(section (,(intern (kubernetes-state-resource-name deployment)) t) - (heading (deployment-line ,state ,deployment)) - (section (details nil) - (indent - (aggregated-deployment-detail ,deployment) - (padding) - (aggregated-pods ,state ,deployment ,pods) - ,(when configmaps - `(aggregated-configmaps ,state ,configmaps)) - ,(when secrets - `(aggregated-secrets ,state ,secrets))))))) - - -(kubernetes-ast-define-component aggregated-statefulset (state statefulset) - (let* ((pods (kubernetes-overview--pods-for-statefulset state statefulset)) - (configmaps (kubernetes-overview--configmaps-for-statefulset state pods)) - (secrets (kubernetes-overview--secrets-for-statefulset state pods))) - `(section (,(intern (kubernetes-state-resource-name statefulset)) t) - (heading (statefulset-line ,state ,statefulset)) - (section (details nil) - (indent - (aggregated-statefulset-detail ,statefulset) - (padding) - (aggregated-pods ,state ,statefulset ,pods) - ,(when configmaps - `(aggregated-configmaps ,state ,configmaps)) - ,(when secrets - `(aggregated-secrets ,state ,secrets))))))) - - -;; Main Components - -(kubernetes-ast-define-component aggregated-view (state &optional hidden) - (-let [(state-set-p &as &alist 'items deployments) (kubernetes-state-deployments state)] - (-let (((state-set-p &as &alist 'items statefulsets) - (kubernetes-state-statefulsets state)) - ([fmt0 labels0] kubernetes-statefulsets--column-heading) - ([fmt1 labels1] kubernetes-deployments--column-heading)) - `(section (ubercontainer, nil) - (section (overview-container ,hidden) - (header-with-count "Statefulsets" ,statefulsets) - (indent - (columnar-loading-container - ,statefulsets - ,(propertize - (apply #'format fmt0 (split-string labels0 "|")) - 'face - 'magit-section-heading) - ,@(--map `(aggregated-statefulset ,state ,it) statefulsets))) - (padding)) - (section (overview-container ,hidden) - (header-with-count "Deployments" ,deployments) - (indent - (columnar-loading-container - ,deployments - ,(propertize - (apply #'format fmt1 (split-string labels1)) - 'face - 'magit-section-heading) - ,@(--map `(aggregated-deployment ,state ,it) deployments))) - (padding)))))) - -(defun kubernetes-overview-render (state) - (let ((sections (kubernetes-state-overview-sections state))) - `(section (root nil) - ,(kubernetes-errors-render state) - ,(when (member 'context sections) - (kubernetes-contexts-render state)) - ,(when (member 'configmaps sections) - `(configmaps-list ,state)) - ,(when (member 'deployments sections) - `(deployments-list ,state)) - ,(when (member 'statefulsets sections) - `(statefulsets-list ,state)) - ,(when (member 'ingress sections) - `(ingress-list ,state)) - ,(when (member 'jobs sections) - `(jobs-list ,state)) - ,(when (member 'overview sections) - `(aggregated-view ,state)) - ,(when (member 'pods sections) - `(pods-list ,state)) - ,(when (member 'secrets sections) - `(secrets-list ,state)) - ,(when (member 'services sections) - `(services-list ,state)) - ,(when (member 'nodes sections) - `(nodes-list ,state))))) - - -;; Overview buffer. - -(defun kubernetes-overview--redraw-buffer () - "Redraws the main buffer using the current state." - (when-let (buf (get-buffer kubernetes-overview-buffer-name)) - (with-current-buffer buf - ;; If a region is active, a redraw would affect the region in - ;; unpredictable ways. - (unless (region-active-p) - ;; Suppress redrawing if the overview is not selected. This prevents - ;; point from jumping around when a magit popup is open. - (when (member (selected-window) (get-buffer-window-list buf)) - (kubernetes-utils--save-window-state - (let ((inhibit-read-only t)) - (erase-buffer) - (kubernetes-ast-eval (kubernetes-overview-render (kubernetes-state))))) - - ;; Force the section at point to highlight. - (magit-section-update-highlight)))))) - -(defun kubernetes-overview--poll (&optional verbose) - (kubernetes-configmaps-refresh verbose) - (kubernetes-contexts-refresh verbose) - (kubernetes-ingress-refresh verbose) - (kubernetes-jobs-refresh verbose) - (kubernetes-deployments-refresh verbose) - (kubernetes-statefulsets-refresh verbose) - (kubernetes-nodes-refresh verbose) - (kubernetes-namespaces-refresh verbose) - (kubernetes-pods-refresh verbose) - (kubernetes-secrets-refresh verbose) - (kubernetes-services-refresh verbose)) - -(defun kubernetes-overview--initialize-buffer () - "Called the first time the overview buffer is opened to set up the buffer." - (let ((buf (get-buffer-create kubernetes-overview-buffer-name))) - (with-current-buffer buf - (kubernetes-overview-mode) - (add-hook 'kubernetes-redraw-hook #'kubernetes-overview--redraw-buffer) - (add-hook 'kubernetes-poll-hook #'kubernetes-overview--poll) - (kubernetes-timers-initialize-timers) - (kubernetes-overview--redraw-buffer) - (add-hook 'kill-buffer-hook (kubernetes-utils-make-cleanup-fn buf) nil t)) - buf)) - -(defun kubernetes-overview-set-sections (sections) - "Set which sections are displayed in the overview. - -SECTIONS is a list of sections to display. See -`kubernetes-overview-custom-views-alist' and -`kubernetes-overview-views-alist' for possible values." - (interactive - (let* ((views (append kubernetes-overview-custom-views-alist kubernetes-overview-views-alist)) - (names (-uniq (--map (symbol-name (car it)) views))) - (choice (intern (completing-read "Overview view: " names nil t)))) - (list (alist-get choice views)))) - - (kubernetes-state-update-overview-sections sections) - (kubernetes-state-trigger-redraw)) - -(defvar kubernetes-overview-mode-map - (let ((keymap (make-sparse-keymap))) - (define-key keymap (kbd "v") #'kubernetes-overview-set-sections) - keymap) - "Keymap for `kubernetes-overview-mode'.") - -;;;###autoload -(define-derived-mode kubernetes-overview-mode kubernetes-mode "Kubernetes Overview" - "Mode for working with Kubernetes overview. - -\\\ -Type \\[kubernetes-overview-set-sections] to choose which resources to display. - -Type \\[kubernetes-mark-for-delete] to mark an object for deletion, and \\[kubernetes-execute-marks] to execute. -Type \\[kubernetes-unmark] to unmark the object at point, or \\[kubernetes-unmark-all] to unmark all objects. - -Type \\[kubernetes-navigate] to inspect the object on the current line. - -Type \\[kubernetes-copy-thing-at-point] to copy the thing at point. - -Type \\[kubernetes-refresh] to refresh the buffer. - -\\{kubernetes-overview-mode-map}" - :group 'kubernetes) - -;;;###autoload -(defun kubernetes-overview () - "Display an overview buffer for Kubernetes." - (interactive) - (let ((dir default-directory) - (buf (kubernetes-overview--initialize-buffer))) - (when kubernetes-default-overview-namespace - (kubernetes-set-namespace kubernetes-default-overview-namespace - (kubernetes-state))) - (kubernetes-commands-display-buffer buf) - (with-current-buffer buf - (cd (kubernetes-utils-up-to-existing-dir dir))) - (message (substitute-command-keys "\\Type \\[kubernetes-overview-set-sections] to switch between resources, and \\[kubernetes-overview-popup] for usage.")))) - - -(provide 'kubernetes-overview) - -;;; kubernetes-overview.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-overview.elc b/elpa/kubernetes-20200114.436/kubernetes-overview.elc deleted file mode 100644 index 6701a2f6..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-overview.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-pkg.el b/elpa/kubernetes-20200114.436/kubernetes-pkg.el deleted file mode 100644 index 91247954..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-pkg.el +++ /dev/null @@ -1,12 +0,0 @@ -(define-package "kubernetes" "20200114.436" "Magit-like porcelain for Kubernetes." - '((emacs "25.1") - (dash "2.12.0") - (magit "2.8.0") - (magit-popup "2.13.0")) - :authors - '(("Chris Barrett" . "chris+emacs@walrus.cool")) - :maintainer - '("Chris Barrett" . "chris+emacs@walrus.cool")) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/kubernetes-20200114.436/kubernetes-pod-line.el b/elpa/kubernetes-20200114.436/kubernetes-pod-line.el deleted file mode 100644 index 81ae412a..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-pod-line.el +++ /dev/null @@ -1,51 +0,0 @@ -;;; kubernetes-pod-line.el --- Component for individual pod lines. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'kubernetes-ast) -(require 'kubernetes-state) -(require 'kubernetes-utils) - -(defun kubernetes-pod-line-ok-p (pod) - (-let [(&alist 'status (&alist 'containerStatuses containers 'phase phase)) pod pod] - (unless (seq-empty-p containers) - (-let* (([(&alist 'state pod-state)] containers) - (pod-state (or (alist-get 'reason (alist-get 'waiting pod-state)) phase))) - (member (downcase pod-state) '("running" "containercreating" "terminated" - "succeeded")))))) - -(kubernetes-ast-define-component pod-line (state pod) - (-let* ((marked-pods (kubernetes-state-marked-pods state)) - (pending-deletion (kubernetes-state-pods-pending-deletion state)) - ((&alist 'metadata (&alist 'name name) 'status (&alist 'containerStatuses containers 'phase phase)) pod) - ([(&alist 'state pod-state)] containers) - (pod-state (or (alist-get 'reason (alist-get 'waiting pod-state)) phase)) - (state-face - (cond - ((member (downcase pod-state) '("running" "containercreating" "terminated")) - 'magit-dimmed) - ((member (downcase pod-state) '("runcontainererror" "crashloopbackoff")) - 'error) - ((equal (downcase pod-state) "succeeded") - 'success) - (t - 'warning))) - (line - (concat (propertize (format "%-11s " (kubernetes-utils-ellipsize pod-state 11)) 'face state-face) - name))) - - `(section (,(intern (kubernetes-state-resource-name pod)) t) - (nav-prop (:pod-name ,name) - (copy-prop ,name - (line ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-pods) - `(mark-for-delete ,line)) - (t - line)))))))) - - -(provide 'kubernetes-pod-line) - -;;; kubernetes-pod-line.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-pod-line.elc b/elpa/kubernetes-20200114.436/kubernetes-pod-line.elc deleted file mode 100644 index d3a04798..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-pod-line.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-pods.el b/elpa/kubernetes-20200114.436/kubernetes-pods.el deleted file mode 100644 index 7ae77eaa..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-pods.el +++ /dev/null @@ -1,200 +0,0 @@ -;;; kubernetes-pods.el --- Rendering for Kubernetes pods -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'seq) - -(require 'kubernetes-ast) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-pods--column-heading - ["%-45s %-10s %5s %10s %6s" "Name Status Ready Restarts Age"]) - -(kubernetes-ast-define-component pod-view-detail (pod) - (-let* ((detail (lambda (k v) - (when v - `(key-value 12 ,k ,v)))) - ((&alist 'metadata (&alist 'namespace ns 'labels (&alist 'name label-name)) - 'status (&alist 'hostIP host-ip - 'containerStatuses containers - 'podIP pod-ip - 'startTime start-time)) - pod) - ([(&alist 'image image 'name name)] - (or containers - (make-vector 1 (list '(name . "N/A") '(image . "N/A")))))) - `(,(funcall detail "Name" name) - ,(when label-name - `(section (selector nil) - (nav-prop (:selector ,label-name) - ,(funcall detail "Label" (propertize label-name 'face 'kubernetes-selector))))) - ,(when ns - `(section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace))))) - ,(funcall detail "Image" image) - ,(funcall detail "Host IP" host-ip) - ,(funcall detail "Pod IP" pod-ip) - ,(funcall detail "Started" start-time)))) - - -(kubernetes-ast-define-component pod-view-line (state pod) - (-let* ((current-time (kubernetes-state-current-time state)) - (marked-pods (kubernetes-state-marked-pods state)) - (pending-deletion (kubernetes-state-pods-pending-deletion state)) - ((&alist 'metadata (&alist 'name name) - 'status (&alist 'containerStatuses containers - 'startTime start-time - 'phase phase)) - pod) - ([(&alist 'restartCount restarts 'state pod-state)] - (or containers - (make-vector 1 (list '(restartCount . 0) '(state . '(failed . '(startedAt . nil))))))) - (start-time (or start-time (format-time-string "%Y-%m-%dT%TZ"))) - (pod-state (or (alist-get 'reason (alist-get 'waiting pod-state) phase) - phase)) - ([fmt] kubernetes-pods--column-heading) - (list-fmt (split-string fmt)) - (str - (concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Status - (let ((s (format (pop list-fmt) (kubernetes-utils-ellipsize pod-state 10)))) - (if (equal pod-state "Running") (propertize s 'face 'magit-dimmed) s)) - " " - ;; Ready - (format (pop list-fmt) - (let* ((n-ready (seq-count (-lambda ((it &as &alist 'ready r)) - (eq r t)) - containers)) - (count-str (format "%s/%s" n-ready (seq-length containers)))) - (if (zerop n-ready) - count-str - (propertize count-str 'face 'magit-dimmed)))) - " " - ;; Restarts - (let ((s (format (pop list-fmt) restarts))) - (cond - ((equal 0 restarts) - (propertize s 'face 'magit-dimmed)) - ((<= kubernetes-pod-restart-warning-threshold restarts) - (propertize s 'face 'warning)) - (t - s))) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp start-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))) - (str (cond - ((member (downcase pod-state) '("running" "containercreating" "terminated")) - str) - ((member (downcase pod-state) '("runcontainererror" "crashloopbackoff")) - (propertize str 'face 'error)) - (t - (propertize str 'face 'warning)))) - (line `(line ,str))) - `(nav-prop (:pod-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-pods) - `(mark-for-delete ,line)) - (t - line)))))) - -(kubernetes-ast-define-component pod (state pod) - `(section (,(intern (kubernetes-state-resource-name pod)) t) - (heading (pod-view-line ,state ,pod)) - (indent - (section (details nil) - (pod-view-detail ,pod) - (padding))))) - -(defun kubernetes-pods--succeeded-job-pod-p (pod) - (-let [(&alist 'status (&alist 'phase phase)) pod] - (equal phase "Succeeded"))) - -(kubernetes-ast-define-component pods-list (state &optional hidden) - (-let (((&alist 'items pods) (kubernetes-state-pods state)) - ([fmt labels] kubernetes-pods--column-heading)) - `(section (pods-container ,hidden) - (header-with-count "Pods" ,pods) - (indent - (columnar-loading-container ,pods - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,@(--map `(pod ,state ,it) - (-remove #'kubernetes-pods--succeeded-job-pod-p (append pods nil))))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers pods) - -;; Displaying pods - -(defun kubernetes-pods--read-name (state) - "Read a pod name from the user. - -STATE is the current application state. - -Update the pod state if it not set yet." - (-let* (((&alist 'items pods) - (or (kubernetes-state-pods state) - (progn - (message "Getting pods...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-pods))) - (kubernetes-state-update-pods response) - response)))) - (pods (append pods nil)) - (names (-map #'kubernetes-state-resource-name pods))) - (completing-read "Pod: " names nil t))) - -(defun kubernetes-pods-delete-marked (state) - (let ((names (kubernetes-state-marked-pods state))) - (dolist (name names) - (kubernetes-state-delete-pod name) - (kubernetes-kubectl-delete-pod kubernetes-props state name - (lambda (_) - (message "Deleting pod %s succeeded." name)) - (lambda (_) - (message "Deleting pod %s failed" name) - (kubernetes-state-mark-pod name)))) - (kubernetes-state-trigger-redraw))) - -;; Interactive commands - -;;;###autoload -(defun kubernetes-display-pod (pod-name state) - "Display information for a pod in a new window. - -STATE is the current application state. - -POD-NAME is the name of the pod to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-utils-read-pod-name state) state))) - (if-let (pod (kubernetes-state-lookup-pod pod-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-pod-buffer-name pod))) - (error "Unknown pod: %s" pod-name))) - - -(provide 'kubernetes-pods) - -;;; kubernetes-pods.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-pods.elc b/elpa/kubernetes-20200114.436/kubernetes-pods.elc deleted file mode 100644 index a7c80ccd..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-pods.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-popups.el b/elpa/kubernetes-20200114.436/kubernetes-popups.el deleted file mode 100644 index 15dd16fa..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-popups.el +++ /dev/null @@ -1,136 +0,0 @@ -;;; kubernetes-popups.el --- Magit popups for Kubernetes buffers. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'magit-popup) -(require 'kubernetes-state) - -(defgroup kubernetes nil - "Emacs porcelain for Kubernetes." - :group 'tools - :prefix "kubernetes-") - - -;; Utilities - -(defun kubernetes-popups--read-existing-file (prompt &optional default) - (read-file-name prompt nil default t nil #'file-regular-p)) - -(defun kubernetes-popups--read-server-and-port (&optional _option defaults) - (-let* (((server port) (split-string (or defaults "") ":" t)) - (port (or (ignore-errors (string-to-number port)) 8080))) - (format "%s:%s" (read-string "Server: " server) (read-number "Port: " port)))) - - -;; Popup definitions - -(magit-define-popup kubernetes-logs-popup - "Popup console for pod logging commands." - :group 'kubernetes - :switches - '((?p "Print logs for previous instances of the container in this pod" "-p")) - :options - '("Options for customizing logging behaviour" - (?t "Number of lines to display" "--tail=" read-number) - (?c "Container to read logs from" "--container=" kubernetes-utils-read-container-name) - "Time controls" - (?s "Since relative time" "--since=" kubernetes-utils-read-time-value) - (?d "Since absolute datetime" "--since-time=" kubernetes-utils-read-iso-datetime)) - :actions - '((?l "Logs" kubernetes-logs-fetch-all) - (?f "Logs (stream and follow)" kubernetes-logs-follow)) - :max-action-columns 2 - :default-action 'kubernetes-logs) - -(magit-define-popup kubernetes-overview-popup - "Popup console for showing an overview of available popup commands." - :group 'kubernetes - :actions - '("Environment" - (?c "Configuration" kubernetes-config-popup) - "Marks" - (?D "Delete" kubernetes-mark-for-delete) - (?u "Unmark" kubernetes-unmark) - (?U "Unmark all" kubernetes-unmark-all) - "Popup commands" - (?d "Describe" kubernetes-describe-popup) - (?e "Exec" kubernetes-exec-popup) - (?L "Labels" kubernetes-labels-popup) - (?l "Logs" kubernetes-logs-popup) - "Misc" - (?h "Describe mode and keybindings" describe-mode))) - -(magit-define-popup kubernetes-exec-popup - "Popup console for exec commands for POD." - :group 'kubernetes - :default-arguments '("-i" "-t") - :switches - '((?i "Pass stdin to container" "-i" t) - (?t "Stdin is a TTY" "-t" t)) - :options - '("Options for customizing exec behaviour" - (?c "Container to exec within" "--container=" kubernetes-utils-read-container-name)) - :actions - '((?e "Exec" kubernetes-exec-into)) - :default-action 'kubernetes-exec-into) - -(magit-define-popup kubernetes-describe-popup - "Popup console for describe commands." - :group 'kubernetes - :actions - '((?d "Dwim" kubernetes-describe-dwim) - (?p "Pod" kubernetes-describe-pod)) - :default-action 'kubernetes-logs) - -(magit-define-popup kubernetes-labels-popup - "Popup console for commands relating to labels." - :group 'kubernetes - :actions - '((?p "Pods" kubernetes-show-pods-for-label)) - :default-action 'kubernetes-show-pods-for-label) - - -;; Config popup -;; -;; The macro definition is expanded here and modified to support marshalling -;; state between the state manager and the magit popup's global state. - -(defconst kubernetes-config-popup - (list :group 'kubernetes - :variable 'kubernetes-kubectl-flags - :options - `("Configuration" - (?f "Kubeconfig file" "--kubeconfig=" kubernetes-popups--read-existing-file) - (?l "Cluster name in config" "--cluster=" read-string) - (?s "Server address and port" "--server=" kubernetes-popups--read-server-and-port) - (?u "User in kubeconfig" "--user=" read-string) - "Authentication" - (?a "CA cert file" "--certificate-authority=" kubernetes-popups--read-existing-file) - (?k "Client key file" "--client-key=" kubernetes-popups--read-existing-file) - (?r "Client cert file" "--client-certificate=" kubernetes-popups--read-existing-file) - (?t "API token" "--token=" read-string)) - :actions - '((?c "Change context" kubernetes-use-context) - (?n "Set namespace" kubernetes-set-namespace)))) - -(defun kubernetes-popups--update-kubectl-state () - ;; HACK: Need to use internal magit vars, since this is run inside the popup - ;; refresh hook. - (when (eq magit-this-popup 'kubernetes-config-popup) - (kubernetes-state-update-kubectl-flags (magit-popup-get-args)))) - -(defun kubernetes-config-popup (&optional arg) - "Popup console for showing an overview of available config commands. - -With ARG, execute default command." - (interactive "P") - (let ((flags (kubernetes-state-kubectl-flags (kubernetes-state)))) - (setq kubernetes-kubectl-flags flags)) - (add-hook 'magit-refresh-popup-buffer-hook #'kubernetes-popups--update-kubectl-state) - (magit-invoke-popup 'kubernetes-config-popup nil arg)) - -(magit-define-popup-keys-deferred 'kubernetes-config-popup) - -(provide 'kubernetes-popups) - -;;; kubernetes-popups.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-popups.elc b/elpa/kubernetes-20200114.436/kubernetes-popups.elc deleted file mode 100644 index e2e75ed0..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-popups.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-process.el b/elpa/kubernetes-20200114.436/kubernetes-process.el deleted file mode 100644 index 0f9bf101..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-process.el +++ /dev/null @@ -1,85 +0,0 @@ -;;; kubernetes-process.el --- Process management. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'subr-x) - -(defun kubernetes-process-kill-quietly (proc &optional _signal) - (when proc - (set-process-sentinel proc nil) - (set-process-query-on-exit-flag proc nil) - (let ((kill-buffer-query-functions nil) - (buf (process-buffer proc))) - (ignore-errors (kill-process proc)) - (ignore-errors (delete-process proc)) - (ignore-errors (kill-buffer buf))))) - - -;;; Background polling processes. - -(defmacro kubernetes-process--define-polling-process (resource) - "Create resource polling-related definitions. - -RESOURCE is the name of the resource as a symbol. - -Defines the following functions: - -- `kubernetes-process-set-poll-RESOURCE-process' -- `kubernetes-process-release-poll-RESOURCE-process' -- `kubernetes-process-poll-RESOURCE-process'." - (unless (symbolp resource) (error "RESOURCE must be a symbol")) - (let ((proc-var-name (intern (format "kubernetes--internal-poll-%s-process" resource))) - (proc-live-p (intern (format "kubernetes-process-poll-%s-process-live-p" resource))) - (releaser-name (intern (format "kubernetes-process-release-poll-%s-process" resource))) - (setter-name (intern (format "kubernetes-process-set-poll-%s-process" resource)))) - `(progn - (defvar ,proc-var-name nil - "Variable used to coordinate polling access to resources. - -Do not use this variable directly. Instead, use its corresponding accessors.") - - (defun ,proc-live-p () - "Get the polling process for this resource if it is running." - (when-let (proc ,proc-var-name) - (when (process-live-p proc) - proc))) - - (defun ,setter-name (proc) - "Set the polling process to PROC." - (,releaser-name) - (setq ,proc-var-name proc)) - - (defun ,releaser-name () - "Kill the existing polling process, if any." - (kubernetes-process-kill-quietly ,proc-var-name) - (setq ,proc-var-name nil))))) - -(kubernetes-process--define-polling-process config) -(kubernetes-process--define-polling-process configmaps) -(kubernetes-process--define-polling-process deployments) -(kubernetes-process--define-polling-process statefulsets) -(kubernetes-process--define-polling-process ingress) -(kubernetes-process--define-polling-process jobs) -(kubernetes-process--define-polling-process namespaces) -(kubernetes-process--define-polling-process pods) -(kubernetes-process--define-polling-process secrets) -(kubernetes-process--define-polling-process services) -(kubernetes-process--define-polling-process nodes) - -(defun kubernetes-process-kill-polling-processes () - (kubernetes-process-release-poll-config-process) - (kubernetes-process-release-poll-configmaps-process) - (kubernetes-process-release-poll-deployments-process) - (kubernetes-process-release-poll-statefulsets-process) - (kubernetes-process-release-poll-ingress-process) - (kubernetes-process-release-poll-nodes-process) - (kubernetes-process-release-poll-jobs-process) - (kubernetes-process-release-poll-namespaces-process) - (kubernetes-process-release-poll-pods-process) - (kubernetes-process-release-poll-secrets-process) - (kubernetes-process-release-poll-services-process)) - - -(provide 'kubernetes-process) - -;;; kubernetes-process.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-process.elc b/elpa/kubernetes-20200114.436/kubernetes-process.elc deleted file mode 100644 index ddcf9e71..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-process.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-props.el b/elpa/kubernetes-20200114.436/kubernetes-props.el deleted file mode 100644 index 320395da..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-props.el +++ /dev/null @@ -1,27 +0,0 @@ -;;; kubernetes-props.el --- Functions used to decouple modules for testability. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(defconst kubernetes-props - '((message . message) - (update-last-error . kubernetes-state-update-last-error) - (overview-buffer-selected-p . kubernetes-utils-overview-buffer-selected-p) - (get-last-error . (lambda () - (kubernetes-state-last-error (kubernetes-state))))) - "Variable used to inject functions across modules.") - -(defun kubernetes-props-update-last-error (props message command time) - (funcall (alist-get 'update-last-error props) message command time)) - -(defun kubernetes-props-get-last-error (props) - (funcall (alist-get 'get-last-error props))) - -(defun kubernetes-props-message (props fmt-string &rest args) - (apply (alist-get 'message props) fmt-string args)) - -(defun kubernetes-props-overview-buffer-selected-p (props) - (funcall (alist-get 'overview-buffer-selected-p props))) - -(provide 'kubernetes-props) - -;;; kubernetes-props.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-props.elc b/elpa/kubernetes-20200114.436/kubernetes-props.elc deleted file mode 100644 index 5965062e..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-props.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-secrets.el b/elpa/kubernetes-20200114.436/kubernetes-secrets.el deleted file mode 100644 index 5e8d46b3..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-secrets.el +++ /dev/null @@ -1,133 +0,0 @@ -;;; kubernetes-secrets.el --- Rendering routines for Kubernetes secrets. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-secrets--column-heading - ["%-45s %6s %6s" "Name Data Age"]) - -(kubernetes-ast-define-component secret-detail (secret) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time)) secret] - `((section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component secret-line (state secret) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-secrets-pending-deletion state)) - (marked-secrets (kubernetes-state-marked-secrets state)) - ((&alist 'data data 'metadata (&alist 'name name 'creationTimestamp created-time)) - secret) - ([fmt] kubernetes-secrets--column-heading) - (list-fmt (split-string fmt)) - (line `(line ,(concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Data - (propertize (format (pop list-fmt) (seq-length data)) 'face 'magit-dimmed) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - `(nav-prop (:secret-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-secrets) - `(mark-for-delete ,line)) - (t - line)))))) - -(kubernetes-ast-define-component secret (state secret) - `(section (,(intern (kubernetes-state-resource-name secret)) t) - (heading (secret-line ,state ,secret)) - (section (details nil) - (indent - (secret-detail ,secret) - (padding))))) - -(kubernetes-ast-define-component secrets-list (state &optional hidden) - (-let (((&alist 'items secrets) (kubernetes-state-secrets state)) - ([fmt labels] kubernetes-secrets--column-heading)) - `(section (secrets-container ,hidden) - (header-with-count "Secrets" ,secrets) - (indent - (columnar-loading-container ,secrets - ,(propertize - (apply #'format fmt (split-string labels)) - 'face - 'magit-section-heading) - ,(--map `(secret ,state ,it) secrets))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers secrets) - -(defun kubernetes-secrets-delete-marked (state) - (let ((names (kubernetes-state-marked-secrets state))) - (dolist (name names) - (kubernetes-state-delete-secret name) - (kubernetes-kubectl-delete-secret kubernetes-props state name - (lambda (_) - (message "Deleting secret %s succeeded." name)) - (lambda (_) - (message "Deleting secret %s failed" name) - (kubernetes-state-mark-secret name)))) - (kubernetes-state-trigger-redraw))) - - -;; Displaying secrets. - -(defun kubernetes-secrets--read-name (state) - "Read a secret name from the user. - -STATE is the current application state. - -Update the secret state if it not set yet." - (-let* (((&alist 'items secrets) - (or (kubernetes-state-secrets state) - (progn - (message "Getting secrets...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-secrets))) - (kubernetes-state-update-secrets response) - response)))) - (secrets (append secrets nil)) - (names (-map #'kubernetes-state-resource-name secrets))) - (completing-read "Secret: " names nil t))) - -;;;###autoload -(defun kubernetes-display-secret (secret-name state) - "Display information for a secret in a new window. - -STATE is the current application state. - -SECRET-NAME is the name of the secret to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-secrets--read-name state) state))) - (if-let (secret (kubernetes-state-lookup-secret secret-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-secret-buffer-name secret))) - (error "Unknown secret: %s" secret-name))) - - -(provide 'kubernetes-secrets) - -;;; kubernetes-secrets.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-secrets.elc b/elpa/kubernetes-20200114.436/kubernetes-secrets.elc deleted file mode 100644 index bc12f682..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-secrets.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-services.el b/elpa/kubernetes-20200114.436/kubernetes-services.el deleted file mode 100644 index 4e8ef26a..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-services.el +++ /dev/null @@ -1,168 +0,0 @@ -;;; kubernetes-services.el --- Rendering for Kubernetes services. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-ast) -(require 'kubernetes-kubectl) -(require 'kubernetes-loading-container) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-vars) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-services--column-heading - ["%-30s %15s %15s %6s" "Name|Internal IP|External IP|Age"]) - -(kubernetes-ast-define-component service-details (service) - (-let ((detail - (lambda (key value) - (when value - `(key-value 15 ,key ,value)))) - - (format-ports - (-lambda ((&alist 'name name 'port port 'protocol prot)) - (concat (when name (format "%s:" name)) - (number-to-string port) "/" prot))) - - ((&alist 'metadata (&alist 'namespace ns - 'creationTimestamp created-time - 'labels (&alist 'name label)) - 'spec (&alist 'clusterIP internal-ip - 'externalIPs ips - 'ports ports - 'selector (&alist 'name selector))) - service)) - (list - (when selector - `(section (selector nil) - (nav-prop (:selector ,selector) ,(funcall detail "Selector" (propertize selector 'face 'kubernetes-selector))))) - (funcall detail "Label" label) - (when ns - `(section (namespace nil) - (nav-prop (:namespace-name ,ns) - ,(funcall detail "Namespace" (propertize ns 'face 'kubernetes-namespace))))) - (funcall detail "Created" created-time) - (funcall detail "Internal IP" internal-ip) - (when-let (ips (append ips nil)) - (funcall detail "External IPs" (string-join ips ", "))) - (funcall detail "Ports" (string-join (seq-map format-ports ports) ", "))))) - -(kubernetes-ast-define-component service-line (state service) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-services-pending-deletion state)) - (marked-services (kubernetes-state-marked-services state)) - ((&alist 'metadata (&alist 'name name 'creationTimestamp created-time) - 'spec (&alist 'clusterIP internal-ip - 'externalIPs external-ips)) - service) - ([fmt] kubernetes-services--column-heading) - (list-fmt (split-string fmt)) - (line `(line ,(concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 30)) - " " - ;; Internal IP - (propertize (format (pop list-fmt) internal-ip) 'face 'magit-dimmed) - " " - ;; External IP - (let ((ips (append external-ips nil))) - (propertize (format (pop list-fmt) (or (car ips) "")) 'face 'magit-dimmed)) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - `(nav-prop (:service-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-services) - `(mark-for-delete ,line)) - (t - line)))))) - -(kubernetes-ast-define-component service (state service) - `(section (,(intern (kubernetes-state-resource-name service)) t) - (heading (service-line ,state ,service)) - (indent - (section (details nil) - (service-details ,service) - (padding))))) - -(kubernetes-ast-define-component services-list (state &optional hidden) - (-let (((services-response &as &alist 'items services) (kubernetes-state-services state)) - ([fmt labels] kubernetes-services--column-heading)) - `(section (services-container ,hidden) - (header-with-count "Services" ,services) - (indent - (columnar-loading-container ,services - ,(propertize - (apply #'format fmt (split-string labels "|")) - 'face - 'magit-section-heading) - ,(--map `(service ,state ,it) services))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers services) - -(defun kubernetes-services-delete-marked (state) - (let ((names (kubernetes-state-marked-services state))) - (dolist (name names) - (kubernetes-state-delete-service name) - (kubernetes-kubectl-delete-service kubernetes-props state name - (lambda (_) - (message "Deleting service %s succeeded." name)) - (lambda (_) - (message "Deleting service %s failed" name) - (kubernetes-state-mark-service name)))) - (kubernetes-state-trigger-redraw))) - - -;; Displaying services - -(defun kubernetes-services--read-name (state) - "Read a service name from the user. - -STATE is the current application state. - -Update the service state if it not set yet." - (-let* (((&alist 'items services) - (or (kubernetes-state-services state) - (progn - (message "Getting services...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-services))) - (kubernetes-state-update-services response) - response)))) - (services (append services nil)) - (names (-map #'kubernetes-state-resource-name services))) - (completing-read "Service: " names nil t))) - -;;;###autoload -(defun kubernetes-display-service (service-name state) - "Display information for a service in a new window. - -STATE is the current application state. - -SERVICE-NAME is the name of the service to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-services--read-name state) state))) - (if-let (service (kubernetes-state-lookup-service service-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-service-buffer-name service))) - (error "Unknown service: %s" service-name))) - - -(provide 'kubernetes-services) - -;;; kubernetes-services.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-services.elc b/elpa/kubernetes-20200114.436/kubernetes-services.elc deleted file mode 100644 index 08e5d55d..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-services.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-state.el b/elpa/kubernetes-20200114.436/kubernetes-state.el deleted file mode 100644 index 8a2e6acf..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-state.el +++ /dev/null @@ -1,646 +0,0 @@ -;;; kubernetes-state.el --- Main state for Kubernetes -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'cl-lib) -(require 'seq) -(require 'subr-x) - -(require 'kubernetes-vars) - - -;;; Main state - -(defvar kubernetes-state--current-state nil) - -(defun kubernetes-state () - kubernetes-state--current-state) - -(defun kubernetes-state-update (action &optional args) - (let ((updated (kubernetes-state-next kubernetes-state--current-state action args))) - (setq kubernetes-state--current-state updated))) - -(defun kubernetes-state-next (state action &optional args) - (let ((next (copy-alist state))) - (pcase action - - (:update-current-time - (setf (alist-get 'current-time next) args)) - (:update-last-error - (setf (alist-get 'last-error next) args)) - (:update-label-query - (setf (alist-get 'label-query next) args)) - (:update-namespaces - (setf (alist-get 'namespaces next) args)) - (:update-current-namespace - (setf (alist-get 'current-namespace next) args)) - (:update-kubectl-flags - (setf (alist-get 'kubectl-flags next) args)) - (:update-overview-sections - (setf (alist-get 'overview-sections next) args)) - - (:update-config - (setf (alist-get 'config next) args) - (unless (alist-get 'current-namespace next) - (-when-let ((&alist 'context (&alist 'namespace ns)) - (kubernetes-state--lookup-current-context args)) - (setf (alist-get 'current-namespace next) ns)))) - - (:unmark-all - (setf (alist-get 'marked-configmaps next nil t) nil) - (setf (alist-get 'marked-deployments next nil t) nil) - (setf (alist-get 'marked-statefulsets next nil t) nil) - (setf (alist-get 'marked-jobs next nil t) nil) - (setf (alist-get 'marked-pods next nil t) nil) - (setf (alist-get 'marked-secrets next nil t) nil) - (setf (alist-get 'marked-services next nil t) nil)) - - ;; Pods - - (:mark-pod - (let ((cur (alist-get 'marked-pods state))) - (setf (alist-get 'marked-pods next) - (delete-dups (cons args cur))))) - (:unmark-pod - (setf (alist-get 'marked-pods next) - (remove args (alist-get 'marked-pods next)))) - (:delete-pod - (let ((updated (cons args (alist-get 'pods-pending-deletion state)))) - (setf (alist-get 'pods-pending-deletion next) - (delete-dups updated)))) - (:update-pods - (setf (alist-get 'pods next) args) - ;; Prune deleted pods from state. - (-let* (((&alist 'items pods) args) - (pod-names (seq-map #'kubernetes-state-resource-name (append pods nil)))) - (setf (alist-get 'marked-pods next) - (seq-intersection (alist-get 'marked-pods next) - pod-names)) - (setf (alist-get 'pods-pending-deletion next) - (seq-intersection (alist-get 'pods-pending-deletion next) - pod-names)))) - - ;; Configmaps - - (:mark-configmap - (let ((cur (alist-get 'marked-configmaps state))) - (setf (alist-get 'marked-configmaps next) - (delete-dups (cons args cur))))) - (:unmark-configmap - (setf (alist-get 'marked-configmaps next) - (remove args (alist-get 'marked-configmaps next)))) - (:delete-configmap - (let ((updated (cons args (alist-get 'configmaps-pending-deletion state)))) - (setf (alist-get 'configmaps-pending-deletion next) - (delete-dups updated)))) - (:update-configmaps - (setf (alist-get 'configmaps next) args) - - ;; Prune deleted configmaps from state. - (-let* (((&alist 'items configmaps) args) - (configmap-names (seq-map #'kubernetes-state-resource-name (append configmaps nil)))) - (setf (alist-get 'marked-configmaps next) - (seq-intersection (alist-get 'marked-configmaps next) - configmap-names)) - (setf (alist-get 'configmaps-pending-deletion next) - (seq-intersection (alist-get 'configmaps-pending-deletion next) - configmap-names)))) - - ;; Secrets - - (:mark-secret - (let ((cur (alist-get 'marked-secrets state))) - (setf (alist-get 'marked-secrets next) - (delete-dups (cons args cur))))) - (:unmark-secret - (setf (alist-get 'marked-secrets next) - (remove args (alist-get 'marked-secrets next)))) - (:delete-secret - (let ((updated (cons args (alist-get 'secrets-pending-deletion state)))) - (setf (alist-get 'secrets-pending-deletion next) - (delete-dups updated)))) - (:update-secrets - (setf (alist-get 'secrets next) args) - - ;; Prune deleted secrets from state. - (-let* (((&alist 'items secrets) args) - (secret-names (seq-map #'kubernetes-state-resource-name (append secrets nil)))) - (setf (alist-get 'marked-secrets next) - (seq-intersection (alist-get 'marked-secrets next) - secret-names)) - (setf (alist-get 'secrets-pending-deletion next) - (seq-intersection (alist-get 'secrets-pending-deletion next) - secret-names)))) - - - ;; Services - - (:mark-service - (let ((cur (alist-get 'marked-services state))) - (setf (alist-get 'marked-services next) - (delete-dups (cons args cur))))) - (:unmark-service - (setf (alist-get 'marked-services next) - (remove args (alist-get 'marked-services next)))) - (:delete-service - (let ((updated (cons args (alist-get 'services-pending-deletion state)))) - (setf (alist-get 'services-pending-deletion next) - (delete-dups updated)))) - (:update-services - (setf (alist-get 'services next) args) - - ;; Prune deleted services from state. - (-let* (((&alist 'items services) args) - (service-names (seq-map #'kubernetes-state-resource-name (append services nil)))) - (setf (alist-get 'marked-services next) - (seq-intersection (alist-get 'marked-services next) - service-names)) - (setf (alist-get 'services-pending-deletion next) - (seq-intersection (alist-get 'services-pending-deletion next) - service-names)))) - - ;; Ingress - (:mark-ingress - (let ((cur (alist-get 'marked-ingress state))) - (setf (alist-get 'marked-ingress next) - (delete-dups (cons args cur))))) - (:unmark-ingress - (setf (alist-get 'marked-ingress next) - (remove args (alist-get 'marked-ingress next)))) - (:delete-ingress - (let ((updated (cons args (alist-get 'ingress-pending-deletion state)))) - (setf (alist-get 'ingress-pending-deletion next) - (delete-dups updated)))) - (:update-ingress - (setf (alist-get 'ingress next) args) - - ;; Prune deleted ingress from state. - (-let* (((&alist 'items ingress) args) - (ingress-names (seq-map #'kubernetes-state-resource-name (append ingress nil)))) - (setf (alist-get 'marked-ingress next) - (seq-intersection (alist-get 'marked-ingress next) - ingress-names)) - (setf (alist-get 'ingress-pending-deletion next) - (seq-intersection (alist-get 'ingress-pending-deletion next) - ingress-names)))) - ;; Jobs - - (:mark-job - (let ((cur (alist-get 'marked-jobs state))) - (setf (alist-get 'marked-jobs next) - (delete-dups (cons args cur))))) - (:unmark-job - (setf (alist-get 'marked-jobs next) - (remove args (alist-get 'marked-jobs next)))) - (:delete-job - (let ((updated (cons args (alist-get 'jobs-pending-deletion state)))) - (setf (alist-get 'jobs-pending-deletion next) - (delete-dups updated)))) - (:update-jobs - (setf (alist-get 'jobs next) args) - - (-let* (((&alist 'items jobs) args) - (job-names (seq-map #'kubernetes-state-resource-name (append jobs nil)))) - (setf (alist-get 'marked-jobs next) - (seq-intersection (alist-get 'marked-jobs next) - job-names)) - (setf (alist-get 'jobs-pending-deletion next) - (seq-intersection (alist-get 'jobs-pending-deletion next) - job-names)))) - - ;; Deployments - - (:mark-deployment - (let ((cur (alist-get 'marked-deployments state))) - (setf (alist-get 'marked-deployments next) - (delete-dups (cons args cur))))) - (:unmark-deployment - (setf (alist-get 'marked-deployments next) - (remove args (alist-get 'marked-deployments next)))) - (:delete-deployment - (let ((updated (cons args (alist-get 'deployments-pending-deletion state)))) - (setf (alist-get 'deployments-pending-deletion next) - (delete-dups updated)))) - (:update-deployments - (setf (alist-get 'deployments next) args) - - ;; Prune deleted deployments from state. - (-let* (((&alist 'items deployments) args) - (deployment-names (seq-map #'kubernetes-state-resource-name (append deployments nil)))) - (setf (alist-get 'marked-deployments next) - (seq-intersection (alist-get 'marked-deployments next) - deployment-names)) - (setf (alist-get 'deployments-pending-deletion next) - (seq-intersection (alist-get 'deployments-pending-deletion next) - deployment-names)))) - - ;; Statefulsets - - (:mark-statefulset - (let ((cur (alist-get 'marked-statefulsets state))) - (setf (alist-get 'marked-statefulsets next) - (delete-dups (cons args cur))))) - (:unmark-statefulset - (setf (alist-get 'marked-statefulsets next) - (remove args (alist-get 'marked-statefulsets next)))) - (:delete-statefulset - (let ((updated (cons args (alist-get 'statefulsets-pending-deletion state)))) - (setf (alist-get 'statefulsets-pending-deletion next) - (delete-dups updated)))) - (:update-statefulsets - (setf (alist-get 'statefulsets next) args) - - ;; Prune deleted statefulsets from state. - (-let* (((&alist 'items statefulsets) args) - (statefulset-names (seq-map #'kubernetes-state-resource-name (append statefulsets nil)))) - (setf (alist-get 'marked-statefulsets next) - (seq-intersection (alist-get 'marked-statefulsets next) - statefulset-names)) - (setf (alist-get 'statefulsets-pending-deletion next) - (seq-intersection (alist-get 'statefulsets-pending-deletion next) - statefulset-names)))) - - ;; Nodes - - (:update-nodes - (setf (alist-get 'nodes next) args)) - - (_ - (error "Unknown action: %s" action))) - - next)) - -(defun kubernetes-state--lookup-current-context (config) - (-let [(&alist 'contexts contexts 'current-context current) config] - (--find (equal current (alist-get 'name it)) (append contexts nil)))) - -(defun kubernetes-state-clear () - (setq kubernetes-state--current-state nil)) - - -;; Actions - -(defun kubernetes-state-mark-pod (pod-name) - (cl-assert (stringp pod-name)) - (kubernetes-state-update :mark-pod pod-name)) - -(defun kubernetes-state-unmark-pod (pod-name) - (cl-assert (stringp pod-name)) - (kubernetes-state-update :unmark-pod pod-name)) - -(defun kubernetes-state-delete-pod (pod-name) - (cl-assert (stringp pod-name)) - (kubernetes-state-update :delete-pod pod-name) - (kubernetes-state-update :unmark-pod pod-name)) - -(defun kubernetes-state-mark-job (job-name) - (cl-assert (stringp job-name)) - (kubernetes-state-update :mark-job job-name)) - -(defun kubernetes-state-unmark-job (job-name) - (cl-assert (stringp job-name)) - (kubernetes-state-update :unmark-job job-name)) - -(defun kubernetes-state-delete-job (job-name) - (cl-assert (stringp job-name)) - (kubernetes-state-update :delete-job job-name) - (kubernetes-state-update :unmark-job job-name)) - -(defun kubernetes-state-mark-configmap (configmap-name) - (cl-assert (stringp configmap-name)) - (kubernetes-state-update :mark-configmap configmap-name)) - -(defun kubernetes-state-unmark-configmap (configmap-name) - (cl-assert (stringp configmap-name)) - (kubernetes-state-update :unmark-configmap configmap-name)) - -(defun kubernetes-state-delete-configmap (configmap-name) - (cl-assert (stringp configmap-name)) - (kubernetes-state-update :delete-configmap configmap-name) - (kubernetes-state-update :unmark-configmap configmap-name)) - -(defun kubernetes-state-mark-ingress (ingress-name) - (cl-assert (stringp ingress-name)) - (kubernetes-state-update :mark-ingress ingress-name)) - -(defun kubernetes-state-unmark-ingress (ingress-name) - (cl-assert (stringp ingress-name)) - (kubernetes-state-update :unmark-ingress ingress-name)) - -(defun kubernetes-state-delete-ingress (ingress-name) - (cl-assert (stringp ingress-name)) - (kubernetes-state-update :delete-ingress ingress-name) - (kubernetes-state-update :unmark-ingress ingress-name)) - -(defun kubernetes-state-mark-secret (secret-name) - (cl-assert (stringp secret-name)) - (kubernetes-state-update :mark-secret secret-name)) - -(defun kubernetes-state-unmark-secret (secret-name) - (cl-assert (stringp secret-name)) - (kubernetes-state-update :unmark-secret secret-name)) - -(defun kubernetes-state-delete-secret (secret-name) - (cl-assert (stringp secret-name)) - (kubernetes-state-update :delete-secret secret-name) - (kubernetes-state-update :unmark-secret secret-name)) - -(defun kubernetes-state-mark-service (service-name) - (cl-assert (stringp service-name)) - (kubernetes-state-update :mark-service service-name)) - -(defun kubernetes-state-unmark-service (service-name) - (cl-assert (stringp service-name)) - (kubernetes-state-update :unmark-service service-name)) - -(defun kubernetes-state-delete-service (service-name) - (cl-assert (stringp service-name)) - (kubernetes-state-update :delete-service service-name) - (kubernetes-state-update :unmark-service service-name)) - -(defun kubernetes-state-mark-deployment (deployment-name) - (cl-assert (stringp deployment-name)) - (kubernetes-state-update :mark-deployment deployment-name)) - -(defun kubernetes-state-unmark-deployment (deployment-name) - (cl-assert (stringp deployment-name)) - (kubernetes-state-update :unmark-deployment deployment-name)) - -(defun kubernetes-state-delete-deployment (deployment-name) - (cl-assert (stringp deployment-name)) - (kubernetes-state-update :delete-deployment deployment-name) - (kubernetes-state-update :unmark-deployment deployment-name)) - -(defun kubernetes-state-mark-statefulset (statefulset-name) - (cl-assert (stringp statefulset-name)) - (kubernetes-state-update :mark-statefulset statefulset-name)) - -(defun kubernetes-state-unmark-statefulset (statefulset-name) - (cl-assert (stringp statefulset-name)) - (kubernetes-state-update :unmark-statefulset statefulset-name)) - -(defun kubernetes-state-delete-statefulset (statefulset-name) - (cl-assert (stringp statefulset-name)) - (kubernetes-state-update :delete-statefulset statefulset-name) - (kubernetes-state-update :unmark-statefulset statefulset-name)) - -(defun kubernetes-state-unmark-all () - (kubernetes-state-update :unmark-all)) - - -;; State accessors - -(defmacro kubernetes-state-define-refreshers (attr &optional canned raw) - (declare (indent 2)) - (let* ((s-attr (symbol-name attr)) - (canned (or canned (intern (format "kubernetes-kubectl-get-%s" s-attr))))) - `(progn - (defun ,(intern (format "kubernetes-%s-refresh" s-attr)) (&optional interactive) - (unless (,(intern (format "kubernetes-process-poll-%s-process-live-p" s-attr))) - (,(intern (format "kubernetes-process-set-poll-%s-process" s-attr)) - (,canned - kubernetes-props - (kubernetes-state) - (lambda (response) - (,(intern (format "kubernetes-state-update-%s" s-attr)) response) - (when interactive - (message (concat "Updated " ,s-attr ".")))) - (function - ,(intern (format "kubernetes-process-release-poll-%s-process" s-attr))))))) - (defun ,(intern (format "kubernetes-%s-refresh-now" s-attr)) (&optional interactive) - (interactive "p") - (kubernetes-kubectl-await - (apply-partially #'kubernetes-kubectl - kubernetes-props - (kubernetes-state) - ',(if raw (split-string raw) (list "get" s-attr "-o" "json"))) - (lambda (buf) - (with-current-buffer buf - (when interactive - (message (concat "Updated " ,s-attr "."))) - (,(intern (format "kubernetes-state-update-%s" s-attr)) - (json-read-from-string (buffer-string))) - (-let* (((&alist 'items) - (,(intern (format "kubernetes-state-%s" s-attr)) - (kubernetes-state)))) - (seq-map (lambda (item) - (-let* (((&alist 'metadata (&alist 'name)) item)) name)) - items)))) - nil - #'ignore))))) - -(defmacro kubernetes-state--define-getter (attr) - `(defun ,(intern (format "kubernetes-state-%s" attr)) (state) - (alist-get (quote ,attr) state))) - -(defmacro kubernetes-state--define-setter (attr arglist &rest forms-before-update) - (declare (indent 2)) - (let ((getter (intern (format "kubernetes-state-%s" attr))) - (arg - (pcase arglist - (`(,x) x) - (xs `(list ,@xs))))) - `(defun ,(intern (format "kubernetes-state-update-%s" attr)) ,arglist - ,@forms-before-update - (let ((prev (,getter (kubernetes-state))) - (arg ,arg)) - (kubernetes-state-update ,(intern (format ":update-%s" attr)) ,arg) - - ;; Redraw immediately if this value was previously unset. - (unless prev - (kubernetes-state-trigger-redraw)) - - arg)))) - -(defmacro kubernetes-state--define-accessors (attr arglist &rest forms-before-update) - (declare (indent 2)) - `(progn - (kubernetes-state--define-getter ,attr) - (kubernetes-state--define-setter ,attr ,arglist ,@forms-before-update))) - -(kubernetes-state--define-accessors current-namespace (namespace) - (cl-assert (stringp namespace))) - -(kubernetes-state--define-accessors pods (pods) - (cl-assert (listp pods))) - -(kubernetes-state--define-accessors ingress (ingress) - (cl-assert (listp ingress))) - -(kubernetes-state--define-accessors jobs (jobs) - (cl-assert (listp jobs))) - -(kubernetes-state--define-accessors configmaps (configmaps) - (cl-assert (listp configmaps))) - -(kubernetes-state--define-accessors secrets (secrets) - (cl-assert (listp secrets))) - -(kubernetes-state--define-accessors services (services) - (cl-assert (listp services))) - -(kubernetes-state--define-accessors deployments (deployments) - (cl-assert (listp deployments))) - -(kubernetes-state--define-accessors nodes (nodes) - (cl-assert (listp nodes))) - -(kubernetes-state--define-accessors statefulsets (statefulsets) - (cl-assert (listp statefulsets))) - -(kubernetes-state--define-accessors namespaces (namespaces) - (cl-assert (listp namespaces))) - -(kubernetes-state--define-accessors config (config) - (cl-assert (listp config))) - -(kubernetes-state--define-accessors label-query (label-name) - (cl-assert (stringp label-name))) - -(defun kubernetes-state-overview-sections (state) - (or (alist-get 'overview-sections state) - (let* ((configurations (append kubernetes-overview-custom-views-alist kubernetes-overview-views-alist)) - (sections (alist-get kubernetes-default-overview-view configurations)) - (updated (kubernetes-state-update :update-overview-sections sections))) - (alist-get 'overview-sections updated)))) - -(kubernetes-state--define-setter overview-sections (resources) - (cl-assert (--all? (member it '(context - configmaps - overview - deployments - statefulsets - ingress - jobs - pods - secrets - services - nodes)) - resources))) - -(defun kubernetes-state-kubectl-flags (state) - (or (alist-get 'kubectl-flags state) - (let ((updated (kubernetes-state-update :update-kubectl-flags kubernetes-kubectl-flags))) - (alist-get 'kubectl-flags updated)))) - -(kubernetes-state--define-setter kubectl-flags (flags) - (cl-assert (listp flags)) - (cl-assert (-all? #'stringp flags)) - (setq kubernetes-kubectl-flags flags)) - -(kubernetes-state--define-getter marked-configmaps) -(kubernetes-state--define-getter configmaps-pending-deletion) - -(kubernetes-state--define-getter marked-ingress) -(kubernetes-state--define-getter ingress-pending-deletion) - -(kubernetes-state--define-getter marked-jobs) -(kubernetes-state--define-getter jobs-pending-deletion) - -(kubernetes-state--define-getter marked-pods) -(kubernetes-state--define-getter pods-pending-deletion) - -(kubernetes-state--define-getter marked-secrets) -(kubernetes-state--define-getter secrets-pending-deletion) - -(kubernetes-state--define-getter marked-services) -(kubernetes-state--define-getter services-pending-deletion) - -(kubernetes-state--define-getter marked-deployments) -(kubernetes-state--define-getter deployments-pending-deletion) - -(kubernetes-state--define-getter marked-statefulsets) -(kubernetes-state--define-getter statefulsets-pending-deletion) - -(kubernetes-state--define-getter last-error) - -(defun kubernetes-state-update-last-error (message command time) - (cl-assert (stringp message)) - (cl-assert (stringp command)) - (cl-assert time) - (cl-assert (listp time)) - (cl-assert (-all? #'integerp time)) - (let ((arg `((message . ,message) - (command . ,command) - (time ., time)))) - (kubernetes-state-update :update-last-error arg) - arg)) - -;; No update function is provided. The time is updated internally before the -;; redrawing hook is run. -(kubernetes-state--define-getter current-time) - - -;; Convenience functions. - -(defmacro kubernetes-state-define-named-lookup (resource state-key) - "Define `kubernetes-state-lookup-RESOURCE' for looking up an item by name. - -RESOURCE is the name of the resource. - -STATE-KEY is the key to look up an item in the state." - (let* ((ident (symbol-name resource)) - (docstring - (format "Look up a %s by name in the current state. - -%s-NAME is the name of the %s to search for. - -STATE is the current application state. - -If lookup succeeds, return the alist representation of the resource. -If lookup fails, return nil." - ident (upcase ident) ident))) - - `(defun ,(intern (format "kubernetes-state-lookup-%s" resource)) (name state) - ,docstring - (-let [(&alist ',state-key (&alist 'items items)) state] - (seq-find (lambda (it) (equal (kubernetes-state-resource-name it) name)) - items))))) - -(kubernetes-state-define-named-lookup configmap configmaps) -(kubernetes-state-define-named-lookup deployment deployments) -(kubernetes-state-define-named-lookup statefulset statefulsets) -(kubernetes-state-define-named-lookup ingress ingress) -(kubernetes-state-define-named-lookup job jobs) -(kubernetes-state-define-named-lookup namespace namespaces) -(kubernetes-state-define-named-lookup pod pods) -(kubernetes-state-define-named-lookup secret secrets) -(kubernetes-state-define-named-lookup service services) -(kubernetes-state-define-named-lookup node nodes) - -(defun kubernetes-state-resource-name (resource) - "Get the name of RESOURCE from its metadata. - -RESOURCE is the parsed representation an API resource, such a -pod, secret, configmap, etc." - (-let [(&alist 'metadata (&alist 'name name)) resource] - name)) - -(defun kubernetes-state-resource-label (resource) - "Get the label of RESOURCE from its metadata. - -RESOURCE is the parsed representation an API resource, such a -pod, secret, configmap, etc." - (-let [(&alist 'metadata (&alist 'labels (&alist 'name label))) resource] - label)) - -(defun kubernetes-state-current-context (state) - (when-let (config (kubernetes-state-config state)) - (kubernetes-state--lookup-current-context config))) - -(defun kubernetes-state-clear-error-if-stale (error-display-time) - (-when-let ((&alist 'time err-time) (kubernetes-state-last-error (kubernetes-state))) - (when (< error-display-time - (- (time-to-seconds) (time-to-seconds err-time))) - (kubernetes-state-update :update-last-error nil)))) - -(defun kubernetes-state-trigger-redraw () - (kubernetes-state-update :update-current-time (current-time)) - (kubernetes-state-clear-error-if-stale kubernetes-minimum-error-display-time) - (run-hooks 'kubernetes-redraw-hook)) - - -(provide 'kubernetes-state) - -;;; kubernetes-state.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-state.elc b/elpa/kubernetes-20200114.436/kubernetes-state.elc deleted file mode 100644 index 38fabda4..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-state.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-statefulsets.el b/elpa/kubernetes-20200114.436/kubernetes-statefulsets.el deleted file mode 100644 index 869e15f1..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-statefulsets.el +++ /dev/null @@ -1,182 +0,0 @@ -;;; kubernetes-statefulsets.el --- Rendering for Kubernetes statefulsets. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) - -(require 'kubernetes-kubectl) -(require 'kubernetes-modes) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-utils) -(require 'kubernetes-vars) -(require 'kubernetes-yaml) - - -;; Components - -(defconst kubernetes-statefulsets--column-heading - ["%-45s %10s %10s %10s %6s" "Name|Replicas|||Age"] - "The two empty headers are used to align statefulsets with deployments.") - -(kubernetes-ast-define-component statefulset-detail (statefulset) - (-let [(&alist 'metadata (&alist 'namespace ns 'creationTimestamp time) - 'spec (&alist 'selector (&alist 'matchLabels - (&alist 'name selector-name - 'component component-name) - 'matchExpressions match-expressions))) - statefulset] - `(,(when selector-name - `(section (selector nil) - (nav-prop (:selector ,selector-name) - (key-value 12 "Selector" ,(propertize selector-name 'face 'kubernetes-selector))))) - ,(when component-name - `(section (component nil) - (nav-prop (:component ,component-name) - (key-value 12 "Component" ,(propertize component-name 'face 'kubernetes-component))))) - - ,(when match-expressions - `(section (expressions nil) - (heading "Match Expressions") - (indent ,(kubernetes-yaml-render match-expressions)))) - - (section (namespace nil) - (nav-prop (:namespace-name ,ns) - (key-value 12 "Namespace" ,(propertize ns 'face 'kubernetes-namespace)))) - (key-value 12 "Created" ,time)))) - -(kubernetes-ast-define-component statefulset-line (state statefulset) - (-let* ((current-time (kubernetes-state-current-time state)) - (pending-deletion (kubernetes-state-statefulsets-pending-deletion state)) - (marked-statefulsets (kubernetes-state-marked-statefulsets state)) - ((&alist 'metadata (&alist 'name name 'creationTimestamp created-time) - - 'spec (&alist 'replicas desired) - - 'status (&alist 'replicas current - 'availableReplicas available - 'updatedReplicas up-to-date)) - statefulset) - (current (or current 0)) - (desired (or desired 0)) - (_available (or available 0)) - (_up-to-date (or up-to-date 0)) - ([fmt] kubernetes-statefulsets--column-heading) - (list-fmt (split-string fmt)) - (line `(line ,(concat - ;; Name - (format (pop list-fmt) (kubernetes-utils-ellipsize name 45)) - " " - ;; Replicas (current/desired) - (let ((str (format "%s/%s" current desired)) - (next (pop list-fmt))) - (cond - ((zerop desired) - (format next str)) - ((zerop current) - (propertize (format next str) 'face 'warning)) - ((/= current desired) - (format next str)) - (t - (propertize (format next str) 'face 'magit-dimmed)))) - " " - ;; Up-to-date - (propertize (format (pop list-fmt) "") 'face 'warning) - " " - ;; Available - (propertize (format (pop list-fmt) "") 'face 'magit-dimmed) - " " - ;; Age - (let ((start (apply #'encode-time (kubernetes-utils-parse-utc-timestamp created-time)))) - (propertize (format (pop list-fmt) (kubernetes-utils-time-diff-string start current-time)) - 'face 'magit-dimmed)))))) - `(nav-prop (:statefulset-name ,name) - (copy-prop ,name - ,(cond - ((member name pending-deletion) - `(propertize (face kubernetes-pending-deletion) ,line)) - ((member name marked-statefulsets) - `(mark-for-delete ,line)) - ((zerop desired) - `(propertize (face magit-dimmed) ,line)) - (t - line)))))) - -(kubernetes-ast-define-component statefulset (state statefulset) - `(section (,(intern (kubernetes-state-resource-name statefulset)) t) - (heading (statefulset-line ,state ,statefulset)) - (section (details nil) - (indent - (statefulset-detail ,statefulset) - (padding))))) - -(kubernetes-ast-define-component statefulsets-list (state &optional hidden) - (-let (((state-set-p &as &alist 'items statefulsets) - (kubernetes-state-statefulsets state)) - ([fmt labels] kubernetes-statefulsets--column-heading)) - `(section (statefulsets-container ,hidden) - (header-with-count "Statefulsets" ,statefulsets) - (indent - (columnar-loading-container ,statefulsets - ,(propertize - (apply #'format fmt (split-string labels "|")) - 'face - 'magit-section-heading) - ,(--map `(statefulset ,state ,it) statefulsets))) - (padding)))) - -;; Requests and state management - -(kubernetes-state-define-refreshers statefulsets) - -(defun kubernetes-statefulsets-delete-marked (state) - (let ((names (kubernetes-state-marked-statefulsets state))) - (dolist (name names) - (kubernetes-state-delete-statefulset name) - (kubernetes-kubectl-delete-statefulset kubernetes-props state name - (lambda (_) - (message "Deleting statefulset %s succeeded." name)) - (lambda (_) - (message "Deleting statefulset %s failed" name) - (kubernetes-state-mark-statefulset name)))) - (kubernetes-state-trigger-redraw))) - - -;; Displaying statefulsets - -(defun kubernetes-statefulsets--read-name (state) - "Read a statefulset name from the user. - -STATE is the current application state. - -Update the statefulset state if it not set yet." - (-let* (((&alist 'items statefulsets) - (or (kubernetes-state-statefulsets state) - (progn - (message "Getting statefulsets...") - (let ((response (kubernetes-kubectl-await-on-async kubernetes-props state #'kubernetes-kubectl-get-statefulsets))) - (kubernetes-state-update-statefulsets response) - response)))) - (statefulsets (append statefulsets nil)) - (names (-map #'kubernetes-state-resource-name statefulsets))) - (completing-read "Statefulset: " names nil t))) - -;;;###autoload -(defun kubernetes-display-statefulset (statefulset-name state) - "Display information for a statefulset in a new window. - -STATE is the current application state. - -STATEFULSET-NAME is the name of the statefulset to display." - (interactive (let ((state (kubernetes-state))) - (list (kubernetes-statefulsets--read-name state) state))) - (if-let (statefulset (kubernetes-state-lookup-statefulset statefulset-name state)) - (select-window - (display-buffer - (kubernetes-yaml-make-buffer kubernetes-display-statefulset-buffer-name statefulset))) - (error "Unknown statefulset: %s" statefulset-name))) - - -(provide 'kubernetes-statefulsets) - -;;; kubernetes-statefulsets.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-statefulsets.elc b/elpa/kubernetes-20200114.436/kubernetes-statefulsets.elc deleted file mode 100644 index e57e926b..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-statefulsets.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-timers.el b/elpa/kubernetes-20200114.436/kubernetes-timers.el deleted file mode 100644 index ecc0940c..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-timers.el +++ /dev/null @@ -1,43 +0,0 @@ -;;; kubernetes-timers.el --- Internal timers. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'subr-x) -(require 'kubernetes-state) -(require 'kubernetes-vars) - -;; Timer vars - -(defvar kubernetes-timers--poll-timer nil - "Background timer used to poll for updates. - -This is used to regularly synchronise local state with Kubernetes.") - -(defvar kubernetes-timers--redraw-timer nil - "Background timer used to trigger buffer redrawing. - -This is used to display the current state.") - - -;; Timer management - -(defun kubernetes-timers-initialize-timers () - (unless kubernetes-timers--redraw-timer - (setq kubernetes-timers--redraw-timer (run-with-timer 0 kubernetes-redraw-frequency #'kubernetes-state-trigger-redraw))) - (unless kubernetes-timers--poll-timer - (setq kubernetes-timers--poll-timer (run-with-timer 0 kubernetes-poll-frequency - (lambda () - (run-hooks 'kubernetes-poll-hook)))))) - -(defun kubernetes-timers-kill-timers () - (when-let (timer kubernetes-timers--redraw-timer) - (cancel-timer timer)) - (when-let (timer kubernetes-timers--poll-timer) - (cancel-timer timer)) - (setq kubernetes-timers--redraw-timer nil) - (setq kubernetes-timers--poll-timer nil)) - - -(provide 'kubernetes-timers) - -;;; kubernetes-timers.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-timers.elc b/elpa/kubernetes-20200114.436/kubernetes-timers.elc deleted file mode 100644 index d7cff3a3..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-timers.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-utils.el b/elpa/kubernetes-20200114.436/kubernetes-utils.el deleted file mode 100644 index bcfe1f44..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-utils.el +++ /dev/null @@ -1,183 +0,0 @@ -;; kubernetes-utils.el --- Common utilities. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'subr-x) -(require 'term) - -(require 'kubernetes-ast) -(require 'kubernetes-kubectl) -(require 'kubernetes-props) -(require 'kubernetes-state) -(require 'kubernetes-timers) -(require 'kubernetes-vars) - -(autoload 'org-read-date "org") - -(defalias 'kubernetes-utils-read-pod-name 'kubernetes-pods--read-name - "Exporting `kubernetes-pods--read-name'") - -(defun kubernetes-utils-read-iso-datetime (&rest _) - (let* ((date (org-read-date nil t)) - (tz (format-time-string "%z" date))) - (concat - (format-time-string "%Y-%m-%dT%H:%M:%S" date) - (replace-regexp-in-string (rx (group (? (any "+-")) digit digit) - (group digit digit)) - "\\1:\\2" - tz)))) - -(defun kubernetes-get-pod-container-names (pod) - "Return the names of all containers available in the specified pod." - (-let [(&alist 'spec (&alist 'containers containers)) pod] - (-map (-lambda ((&alist 'name name)) name) containers))) - -(defun kubernetes-utils-read-container-name (&rest _) - "Read a container name from the pod at POINT or a user-supplied pod." - (letrec ((state (kubernetes-state)) - (pod-name (or (kubernetes-utils-maybe-pod-name-at-point) - (kubernetes-utils-read-pod-name state))) - (pod (kubernetes-state-lookup-pod pod-name state)) - (pod-containers (kubernetes-get-pod-container-names pod))) - (completing-read "Container name: " pod-containers nil t))) - -(defun kubernetes-utils-read-time-value (&rest _) - "Read a relative time value in the style accepted by kubectl. E.g. 20s, 3h, 5m." - (let (result) - (while (null result) - (let ((input (read-string "Time value (e.g. 20s): "))) - (if (string-match-p (rx bol (* space) (+ digit) (* space) (any "smh") (* space) eol) - input) - (setq result input) - (message "Invalid time value") - (sit-for 1)))) - result)) - -(defun kubernetes-utils-maybe-pod-name-at-point () - (let ((nav-buffer (get-buffer kubernetes-overview-buffer-name))) - (with-current-buffer nav-buffer - (pcase (get-text-property (point) 'kubernetes-nav nav-buffer) - (`(:pod-name ,value) - value))))) - -(defun kubernetes-utils-ellipsize (s threshold) - (if (> (length s) threshold) - (concat (substring s 0 (1- threshold)) "…") - s)) - -(defun kubernetes-utils-parse-utc-timestamp (timestamp) - "Parse TIMESTAMP string from the API into the representation used by Emacs." - (let ((parsed (parse-time-string (replace-regexp-in-string "Z" "" (replace-regexp-in-string "T" " " timestamp))))) - (setf (nth 8 parsed) 0) - parsed)) - -(defun kubernetes-utils-time-diff-string (start now) - "Find the interval between START and NOW, and return a string of the coarsest unit." - (let ((diff (time-to-seconds (time-subtract now start)))) - (car (split-string (format-seconds "%yy,%dd,%hh,%mm,%ss%z" diff) ",")))) - -(defun kubernetes-utils-kill-buffer (proc-buf &rest _) - (if-let (win (get-buffer-window proc-buf)) - (quit-window t win) - (kill-buffer proc-buf))) - -(defun kubernetes-utils-make-cleanup-fn (buf) - "Make a function to add to `kill-buffer-hook' for a Kubernetes buffer. - -BUF is the buffer used to display a Kubernetes feature. A -reference to it is needed to determine which buffers remain. - -The function will terminate polling when the last Kubernetes -buffer is killed." - (lambda () - (let* ((bufs (-keep #'get-buffer (list kubernetes-label-query-buffer-name - kubernetes-overview-buffer-name))) - (more-buffers (remove buf bufs))) - (unless more-buffers - (dolist (b bufs) - (with-current-buffer b - (kubernetes-state-clear))) - (kubernetes-process-kill-polling-processes) - (kubernetes-timers-kill-timers))))) - -(defun kubernetes-utils-term-buffer-start (bufname command args) - ;; Kill existing process. - (when-let ((existing (get-buffer bufname)) - (proc (get-buffer-process existing))) - (kubernetes-process-kill-quietly proc)) - - (let ((buf (get-buffer-create bufname))) - (with-current-buffer buf - (erase-buffer) - (buffer-disable-undo) - (term-mode) - (goto-char (point-min)) - (let ((time-str (format "Session started at %s" (substring (current-time-string) 0 19))) - (command-str (format "%s %s" command (string-join args " ")))) - (kubernetes-ast-eval - `((line ,(propertize time-str 'face 'magit-dimmed)) - (padding) - (line ,(propertize command-str 'face 'magit-dimmed)) - (padding)))) - - (term-exec (current-buffer) "kuberenetes-term" command nil args) - (let ((proc (get-buffer-process (current-buffer)))) - (set-process-query-on-exit-flag proc nil) - (term-char-mode) - (add-hook 'kill-buffer-hook (lambda () - (when-let (win (get-buffer-window buf)) - (quit-window nil win))) - nil t))) - - buf)) - -(defun kubernetes-utils-process-buffer-start (bufname setup-fn command args &optional process-filter) - (let ((buf (get-buffer-create bufname))) - (buffer-disable-undo buf) - - (with-current-buffer buf - (let ((inhibit-read-only t)) - (erase-buffer) - (funcall setup-fn) - (let ((time-str (format "Process started at %s" (substring (current-time-string) 0 19))) - (command-str (format "%s %s" command (string-join args " ")))) - (kubernetes-ast-eval - `((line ,(propertize time-str 'face 'magit-dimmed)) - (padding) - (line ,(propertize command-str 'face 'magit-dimmed)) - (padding)))))) - - (let ((proc (apply #'start-process "kubernetes-exec" buf command args))) - (when process-filter - (set-process-filter proc process-filter)) - (set-process-query-on-exit-flag proc nil)) - buf)) - -(defun kubernetes-utils-overview-buffer-selected-p () - (equal (current-buffer) (get-buffer kubernetes-overview-buffer-name))) - -(defmacro kubernetes-utils--save-window-state (&rest body) - "Restore window state after executing BODY. - -This is useful if the buffer is erased and repopulated in BODY, -in which case `save-excursion' is insufficient to restore the -window state." - `(let ((pos (point)) - (col (current-column)) - (window-start-line (window-start)) - (inhibit-redisplay t)) - (save-excursion - ,@body) - (goto-char pos) - (move-to-column col) - (set-window-start (selected-window) window-start-line))) - -(defun kubernetes-utils-up-to-existing-dir (dir) - (while (not (file-directory-p dir)) - (setq dir (file-name-directory (directory-file-name dir)))) - dir) - -(provide 'kubernetes-utils) - -;;; kubernetes-utils.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-utils.elc b/elpa/kubernetes-20200114.436/kubernetes-utils.elc deleted file mode 100644 index 7a4ff59d..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-utils.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-vars.el b/elpa/kubernetes-20200114.436/kubernetes-vars.el deleted file mode 100644 index 137cbc76..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-vars.el +++ /dev/null @@ -1,220 +0,0 @@ -;;; kubernetes-vars.el --- Customizable interface for Kubernetes package. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(defgroup kubernetes nil - "Emacs porcelain for Kubernetes." - :group 'tools - :prefix "kubernetes-") - -(defcustom kubernetes-kubectl-timeout-seconds 25 - "How long to wait for kubectl before giving up." - :group 'kubernetes - :type 'integer) - -(defcustom kubernetes-kubectl-executable "kubectl" - "The kubectl command used for Kubernetes commands." - :group 'kubernetes - :type 'string) - -(defconst kubernetes-overview-views-alist - '((overview . (context overview)) - (configmaps . (context configmaps)) - (deployments . (context deployments)) - (statefulsets . (context statefulsets)) - (ingress . (context ingress)) - (jobs . (context jobs)) - (pods . (context pods)) - (secrets . (context secrets)) - (services . (context services)) - (nodes . (context nodes))) - "Enumerates the different views that can be displayed in the overview. - -Each element is a cons-cell of the form (SYMBOL . LIST), where -SYMBOL is a name for the view, and LIST is a list of resource -types that should be displayed.") - -(defcustom kubernetes-overview-custom-views-alist nil - "Enumerates the different views that can be displayed in the overview. - -Each element is a cons-cell of the form (SYMBOL . LIST), where -SYMBOL is a name for the view, and LIST is a list of resource -types that should be displayed." - :group 'kubernetes - :type '(alist :key-type symbol - :value-type (set (const context) - (const configmaps) - (const deployments) - (const statefulsets) - (const ingress) - (const overview) - (const pods) - (const secrets) - (const services) - (const nodes)))) - -(defcustom kubernetes-default-overview-view 'overview - "The view to use when first opening the overview. - -It should be one of the keys defined in -`kubernetes-overview-views-alist' or -`kubernetes-overview-custom-views-alist'." - :group 'kubernetes - :type 'symbol) - -(defcustom kubernetes-default-overview-namespace nil - "The Kubernetes namespace to select on `kubernetes-overview'. -Uses the default namespace if nil." - :group 'kubernetes - :type 'string) - -(defcustom kubernetes-commands-display-buffer-select t - "Whether to select Kubernetes buffers automatically." - :group 'kubernetes - :type 'boolean) - -(defcustom kubernetes-commands-display-buffer-function 'kubernetes-commands-display-buffer-fullframe - "The function used display a Kubernetes buffer. - -The function must take a single argument, which is the buffer to display." - :group 'kubernetes - :type '(radio (function-item kubernetes-commands-display-buffer-fullframe) - (function-item display-buffer) - (function :tag "Function"))) - -(defcustom kubernetes-pod-restart-warning-threshold 5 - "The threshold for pod restarts above which a pod is highlighted." - :group 'kubernetes - :type 'number) - -(defcustom kubernetes-poll-frequency 5 - "The frequency at which to poll Kubernetes for changes." - :group 'kubernetes - :type 'integer) - -(defcustom kubernetes-redraw-frequency 5 - "The buffer redraw frequency in seconds. - -This is the frequency at which Kubernetes buffers will be redrawn -to match the current state. This variable should be tuned to -balance interface stuttering with update frequency." - :group 'kubernetes - :type 'integer) - -(defcustom kubernetes-json-mode 'javascript-mode - "The mode to use when rendering pretty-printed JSON." - :group 'kubernetes - :type 'function) - -(defcustom kubernetes-default-exec-command "bash" - "The default command to use when exec'ing into a pod's container." - :group 'kubernetes - :type 'string) - -(defcustom kubernetes-clean-up-interactive-exec-buffers t - "If non-nil, automatically kill interactive exec buffers on process exit." - :group 'kubernetes - :type 'boolean) - -(defcustom kubernetes-minimum-error-display-time 10 - "Minimum time in seconds for which errors will be displayed in overview buffer." - :group 'kubernetes - :type 'integer) - -(defcustom kubernetes-kubectl-flags nil - "A list of extra commandline flags to pass to kubectl. - -It is a list, where each element is assumed to be a flag of the -form \"--flag=value\" or \"-flag\"." - :type '(repeat (string :tag "Argument")) - :group 'kubernetes) - - -(defface kubernetes-context-name - '((((class color) (background light)) :foreground "SkyBlue4") - (((class color) (background dark)) :foreground "LightSkyBlue1")) - "Face for context names in report buffers." - :group 'kubernetes) - -(defface kubernetes-json-key - '((((class color) (background light)) :foreground "grey30" :weight bold) - (((class color) (background dark)) :foreground "grey80" :weight bold)) - "Face for keys in pretty-printed parsed JSON." - :group 'kubernetes) - -(defface kubernetes-progress-indicator - '((t :inherit shadow)) - "Face for progress indicators." - :group 'kubernetes) - -(defface kubernetes-pending-deletion - '((t :inherit shadow :strike-through t)) - "Face for pods awaiting deletion." - :group 'kubernetes) - -(defface kubernetes-delete-mark - '((t :inherit error)) - "Face for deletion mark indicators." - :group 'kubernetes) - -(defface kubernetes-selector - '((t :inherit magit-branch-remote)) - "Face for labels used as selectors." - :group 'kubernetes) - -(defface kubernetes-namespace - '((t :inherit magit-tag)) - "Face for namespace references." - :group 'kubernetes) - - -(defconst kubernetes-display-pods-buffer-name "*kubernetes pods*") - -(defconst kubernetes-display-config-buffer-name "*kubernetes config*") - -(defconst kubernetes-display-deployment-buffer-name "*kubernetes deployment*") - -(defconst kubernetes-display-node-buffer-name "*kubernetes node*") - -(defconst kubernetes-display-statefulset-buffer-name "*kubernetes statefulset*") - -(defconst kubernetes-display-ingress-buffer-name "*kubernetes ingress*") - -(defconst kubernetes-display-job-buffer-name "*kubernetes job*") - -(defconst kubernetes-display-configmap-buffer-name "*kubernetes configmap*") - -(defconst kubernetes-display-service-buffer-name "*kubernetes service*") - -(defconst kubernetes-display-configmaps-buffer-name "*kubernetes configmaps*") - -(defconst kubernetes-display-namespace-buffer-name "*kubernetes namespace*") - -(defconst kubernetes-display-secret-buffer-name "*kubernetes secret*") - -(defconst kubernetes-display-secrets-buffer-name "*kubernetes secrets*") - -(defconst kubernetes-overview-buffer-name "*kubernetes overview*") - -(defconst kubernetes-log-line-buffer-name "*log line*") - -(defconst kubernetes-logs-buffer-name "*kubernetes logs*") - -(defconst kubernetes-pod-buffer-name "*kubernetes pod*") - -(defconst kubernetes-exec-buffer-name "*kubernetes exec*") - -(defconst kubernetes-label-query-buffer-name "*kubernetes-label-query*") - - -(defvar kubernetes-poll-hook nil - "Hook run every time polling should occur.") - -(defvar kubernetes-redraw-hook nil - "Hook run every time redrawing should occur.") - - - -(provide 'kubernetes-vars) - -;;; kubernetes-vars.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-vars.elc b/elpa/kubernetes-20200114.436/kubernetes-vars.elc deleted file mode 100644 index 9c5196c8..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-vars.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes-yaml.el b/elpa/kubernetes-20200114.436/kubernetes-yaml.el deleted file mode 100644 index f0fb7775..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes-yaml.el +++ /dev/null @@ -1,79 +0,0 @@ -;;; kubernetes-yaml.el --- YAML pretty-printing. -*- lexical-binding: t; -*- -;;; Commentary: -;;; Code: - -(require 'dash) -(require 'subr-x) - -(require 'kubernetes-ast) -(require 'kubernetes-modes) - - -;; Compile parsed JSON into an AST representation for rendering. - -(defun kubernetes-yaml--render-helper (json) - (pcase json - ;; Literals - - ('nil "null") - ('t "true") - (:json-false "false") - ((pred stringp) json) - ((pred numberp) (number-to-string json)) - ((pred symbolp) (symbol-name json)) - - ;; Lists - - ((pred vectorp) - `(list ,@(seq-map (lambda (it) - `(section (item nil) ,(kubernetes-yaml--render-helper it))) - json))) - - ;; Objects - - ((pred listp) - (seq-map (-lambda ((k . v)) - (let ((k (kubernetes-yaml--render-helper k)) - (v (kubernetes-yaml--render-helper v))) - `(section (object-kvp nil) - ,(cond - ;; Indent multiline strings. - ((and (stringp v) (string-match-p "\n" (string-trim-right v))) - `(copy-prop ,v - (heading ,(concat (propertize (format "%s:" k) 'face 'magit-section-heading) " |-")) - (indent ,@(--map `(line ,it) (split-string (string-trim-right v) "\n"))))) - - ((stringp v) - `(key-value 0 ,k ,v)) - - (t - `((heading ,(concat (propertize (format "%s:" k) 'face 'magit-section-heading) " ")) - (indent ,v))))))) - json)) - - (_ - (error "Don't know how to render %s" json)))) - -(defun kubernetes-yaml-render (json) - "Process some parsed JSON into a YAML AST for rendering." - `(section (json-root nil) - ,(kubernetes-yaml--render-helper json) - (padding))) - - -;; Drawing utilites - -(defun kubernetes-yaml-make-buffer (bufname parsed-json) - (let ((buf (get-buffer-create bufname))) - (with-current-buffer buf - (kubernetes-display-thing-mode) - (let ((inhibit-read-only t)) - (erase-buffer) - (kubernetes-ast-eval (kubernetes-yaml-render parsed-json)) - (goto-char (point-min)))) - buf)) - - -(provide 'kubernetes-yaml) - -;;; kubernetes-yaml.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes-yaml.elc b/elpa/kubernetes-20200114.436/kubernetes-yaml.elc deleted file mode 100644 index 2781a222..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes-yaml.elc and /dev/null differ diff --git a/elpa/kubernetes-20200114.436/kubernetes.el b/elpa/kubernetes-20200114.436/kubernetes.el deleted file mode 100644 index e49e97a4..00000000 --- a/elpa/kubernetes-20200114.436/kubernetes.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; kubernetes.el --- Magit-like porcelain for Kubernetes. -*- lexical-binding: t; -*- - -;; Copyright (C) 2017 Chris Barrett - -;; Author: Chris Barrett - -;; Version: 0.13.0 - -;; Package-Requires: ((emacs "25.1") (dash "2.12.0") (magit "2.8.0") (magit-popup "2.13.0")) - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . - -;;; Commentary: - -;;; Code: - -(require 'kubernetes-commands) -(require 'kubernetes-labels) -(require 'kubernetes-logs) -(require 'kubernetes-overview) - -(provide 'kubernetes) - -;;; kubernetes.el ends here diff --git a/elpa/kubernetes-20200114.436/kubernetes.elc b/elpa/kubernetes-20200114.436/kubernetes.elc deleted file mode 100644 index 63b01345..00000000 Binary files a/elpa/kubernetes-20200114.436/kubernetes.elc and /dev/null differ diff --git a/elpa/magit-20200217.135/AUTHORS.md b/elpa/magit-20200220.308/AUTHORS.md similarity index 100% rename from elpa/magit-20200217.135/AUTHORS.md rename to elpa/magit-20200220.308/AUTHORS.md diff --git a/elpa/magit-20200217.135/LICENSE b/elpa/magit-20200220.308/LICENSE similarity index 100% rename from elpa/magit-20200217.135/LICENSE rename to elpa/magit-20200220.308/LICENSE diff --git a/elpa/magit-20200217.135/dir b/elpa/magit-20200220.308/dir similarity index 100% rename from elpa/magit-20200217.135/dir rename to elpa/magit-20200220.308/dir diff --git a/elpa/magit-20200217.135/git-rebase.el b/elpa/magit-20200220.308/git-rebase.el similarity index 100% rename from elpa/magit-20200217.135/git-rebase.el rename to elpa/magit-20200220.308/git-rebase.el diff --git a/elpa/magit-20200217.135/git-rebase.elc b/elpa/magit-20200220.308/git-rebase.elc similarity index 97% rename from elpa/magit-20200217.135/git-rebase.elc rename to elpa/magit-20200220.308/git-rebase.elc index de6f1586..8bfdc078 100644 Binary files a/elpa/magit-20200217.135/git-rebase.elc and b/elpa/magit-20200220.308/git-rebase.elc differ diff --git a/elpa/magit-20200217.135/magit-apply.el b/elpa/magit-20200220.308/magit-apply.el similarity index 100% rename from elpa/magit-20200217.135/magit-apply.el rename to elpa/magit-20200220.308/magit-apply.el diff --git a/elpa/magit-20200217.135/magit-apply.elc b/elpa/magit-20200220.308/magit-apply.elc similarity index 55% rename from elpa/magit-20200217.135/magit-apply.elc rename to elpa/magit-20200220.308/magit-apply.elc index 8b68625c..40e1d2c2 100644 Binary files a/elpa/magit-20200217.135/magit-apply.elc and b/elpa/magit-20200220.308/magit-apply.elc differ diff --git a/elpa/magit-20200217.135/magit-autoloads.el b/elpa/magit-20200220.308/magit-autoloads.el similarity index 100% rename from elpa/magit-20200217.135/magit-autoloads.el rename to elpa/magit-20200220.308/magit-autoloads.el diff --git a/elpa/magit-20200217.135/magit-autorevert.el b/elpa/magit-20200220.308/magit-autorevert.el similarity index 100% rename from elpa/magit-20200217.135/magit-autorevert.el rename to elpa/magit-20200220.308/magit-autorevert.el diff --git a/elpa/magit-20200217.135/magit-autorevert.elc b/elpa/magit-20200220.308/magit-autorevert.elc similarity index 99% rename from elpa/magit-20200217.135/magit-autorevert.elc rename to elpa/magit-20200220.308/magit-autorevert.elc index d7c467fd..3b33e160 100644 Binary files a/elpa/magit-20200217.135/magit-autorevert.elc and b/elpa/magit-20200220.308/magit-autorevert.elc differ diff --git a/elpa/magit-20200217.135/magit-bisect.el b/elpa/magit-20200220.308/magit-bisect.el similarity index 100% rename from elpa/magit-20200217.135/magit-bisect.el rename to elpa/magit-20200220.308/magit-bisect.el diff --git a/elpa/magit-20200217.135/magit-bisect.elc b/elpa/magit-20200220.308/magit-bisect.elc similarity index 99% rename from elpa/magit-20200217.135/magit-bisect.elc rename to elpa/magit-20200220.308/magit-bisect.elc index cd55c53a..f8283177 100644 Binary files a/elpa/magit-20200217.135/magit-bisect.elc and b/elpa/magit-20200220.308/magit-bisect.elc differ diff --git a/elpa/magit-20200217.135/magit-blame.el b/elpa/magit-20200220.308/magit-blame.el similarity index 100% rename from elpa/magit-20200217.135/magit-blame.el rename to elpa/magit-20200220.308/magit-blame.el diff --git a/elpa/magit-20200217.135/magit-blame.elc b/elpa/magit-20200220.308/magit-blame.elc similarity index 99% rename from elpa/magit-20200217.135/magit-blame.elc rename to elpa/magit-20200220.308/magit-blame.elc index 78b00d59..c677e80b 100644 Binary files a/elpa/magit-20200217.135/magit-blame.elc and b/elpa/magit-20200220.308/magit-blame.elc differ diff --git a/elpa/magit-20200217.135/magit-bookmark.el b/elpa/magit-20200220.308/magit-bookmark.el similarity index 100% rename from elpa/magit-20200217.135/magit-bookmark.el rename to elpa/magit-20200220.308/magit-bookmark.el diff --git a/elpa/magit-20200217.135/magit-bookmark.elc b/elpa/magit-20200220.308/magit-bookmark.elc similarity index 63% rename from elpa/magit-20200217.135/magit-bookmark.elc rename to elpa/magit-20200220.308/magit-bookmark.elc index da2deb49..ab012386 100644 Binary files a/elpa/magit-20200217.135/magit-bookmark.elc and b/elpa/magit-20200220.308/magit-bookmark.elc differ diff --git a/elpa/magit-20200217.135/magit-branch.el b/elpa/magit-20200220.308/magit-branch.el similarity index 100% rename from elpa/magit-20200217.135/magit-branch.el rename to elpa/magit-20200220.308/magit-branch.el diff --git a/elpa/magit-20200217.135/magit-branch.elc b/elpa/magit-20200220.308/magit-branch.elc similarity index 91% rename from elpa/magit-20200217.135/magit-branch.elc rename to elpa/magit-20200220.308/magit-branch.elc index 2fb16cce..d589df55 100644 Binary files a/elpa/magit-20200217.135/magit-branch.elc and b/elpa/magit-20200220.308/magit-branch.elc differ diff --git a/elpa/magit-20200217.135/magit-clone.el b/elpa/magit-20200220.308/magit-clone.el similarity index 100% rename from elpa/magit-20200217.135/magit-clone.el rename to elpa/magit-20200220.308/magit-clone.el diff --git a/elpa/magit-20200217.135/magit-clone.elc b/elpa/magit-20200220.308/magit-clone.elc similarity index 94% rename from elpa/magit-20200217.135/magit-clone.elc rename to elpa/magit-20200220.308/magit-clone.elc index 565fd7e8..33da926a 100644 Binary files a/elpa/magit-20200217.135/magit-clone.elc and b/elpa/magit-20200220.308/magit-clone.elc differ diff --git a/elpa/magit-20200217.135/magit-commit.el b/elpa/magit-20200220.308/magit-commit.el similarity index 100% rename from elpa/magit-20200217.135/magit-commit.el rename to elpa/magit-20200220.308/magit-commit.el diff --git a/elpa/magit-20200217.135/magit-commit.elc b/elpa/magit-20200220.308/magit-commit.elc similarity index 90% rename from elpa/magit-20200217.135/magit-commit.elc rename to elpa/magit-20200220.308/magit-commit.elc index 2b75604e..eedf01db 100644 Binary files a/elpa/magit-20200217.135/magit-commit.elc and b/elpa/magit-20200220.308/magit-commit.elc differ diff --git a/elpa/magit-20200217.135/magit-core.el b/elpa/magit-20200220.308/magit-core.el similarity index 100% rename from elpa/magit-20200217.135/magit-core.el rename to elpa/magit-20200220.308/magit-core.el diff --git a/elpa/magit-20200217.135/magit-core.elc b/elpa/magit-20200220.308/magit-core.elc similarity index 99% rename from elpa/magit-20200217.135/magit-core.elc rename to elpa/magit-20200220.308/magit-core.elc index 53d77f1d..a61d8b14 100644 Binary files a/elpa/magit-20200217.135/magit-core.elc and b/elpa/magit-20200220.308/magit-core.elc differ diff --git a/elpa/magit-20200217.135/magit-diff.el b/elpa/magit-20200220.308/magit-diff.el similarity index 100% rename from elpa/magit-20200217.135/magit-diff.el rename to elpa/magit-20200220.308/magit-diff.el diff --git a/elpa/magit-20200217.135/magit-diff.elc b/elpa/magit-20200220.308/magit-diff.elc similarity index 83% rename from elpa/magit-20200217.135/magit-diff.elc rename to elpa/magit-20200220.308/magit-diff.elc index 72106405..e1a50ad2 100644 Binary files a/elpa/magit-20200217.135/magit-diff.elc and b/elpa/magit-20200220.308/magit-diff.elc differ diff --git a/elpa/magit-20200217.135/magit-ediff.el b/elpa/magit-20200220.308/magit-ediff.el similarity index 100% rename from elpa/magit-20200217.135/magit-ediff.el rename to elpa/magit-20200220.308/magit-ediff.el diff --git a/elpa/magit-20200217.135/magit-ediff.elc b/elpa/magit-20200220.308/magit-ediff.elc similarity index 80% rename from elpa/magit-20200217.135/magit-ediff.elc rename to elpa/magit-20200220.308/magit-ediff.elc index 11d7108f..6226afe9 100644 Binary files a/elpa/magit-20200217.135/magit-ediff.elc and b/elpa/magit-20200220.308/magit-ediff.elc differ diff --git a/elpa/magit-20200217.135/magit-extras.el b/elpa/magit-20200220.308/magit-extras.el similarity index 100% rename from elpa/magit-20200217.135/magit-extras.el rename to elpa/magit-20200220.308/magit-extras.el diff --git a/elpa/magit-20200217.135/magit-extras.elc b/elpa/magit-20200220.308/magit-extras.elc similarity index 92% rename from elpa/magit-20200217.135/magit-extras.elc rename to elpa/magit-20200220.308/magit-extras.elc index c2e142b6..44278c36 100644 Binary files a/elpa/magit-20200217.135/magit-extras.elc and b/elpa/magit-20200220.308/magit-extras.elc differ diff --git a/elpa/magit-20200217.135/magit-fetch.el b/elpa/magit-20200220.308/magit-fetch.el similarity index 100% rename from elpa/magit-20200217.135/magit-fetch.el rename to elpa/magit-20200220.308/magit-fetch.el diff --git a/elpa/magit-20200217.135/magit-fetch.elc b/elpa/magit-20200220.308/magit-fetch.elc similarity index 99% rename from elpa/magit-20200217.135/magit-fetch.elc rename to elpa/magit-20200220.308/magit-fetch.elc index 78416596..959e2b8e 100644 Binary files a/elpa/magit-20200217.135/magit-fetch.elc and b/elpa/magit-20200220.308/magit-fetch.elc differ diff --git a/elpa/magit-20200217.135/magit-files.el b/elpa/magit-20200220.308/magit-files.el similarity index 100% rename from elpa/magit-20200217.135/magit-files.el rename to elpa/magit-20200220.308/magit-files.el diff --git a/elpa/magit-20200217.135/magit-files.elc b/elpa/magit-20200220.308/magit-files.elc similarity index 98% rename from elpa/magit-20200217.135/magit-files.elc rename to elpa/magit-20200220.308/magit-files.elc index 0717d0ed..8e418d2d 100644 Binary files a/elpa/magit-20200217.135/magit-files.elc and b/elpa/magit-20200220.308/magit-files.elc differ diff --git a/elpa/magit-20200217.135/magit-git.el b/elpa/magit-20200220.308/magit-git.el similarity index 100% rename from elpa/magit-20200217.135/magit-git.el rename to elpa/magit-20200220.308/magit-git.el diff --git a/elpa/magit-20200217.135/magit-git.elc b/elpa/magit-20200220.308/magit-git.elc similarity index 99% rename from elpa/magit-20200217.135/magit-git.elc rename to elpa/magit-20200220.308/magit-git.elc index 5dbe6e1a..4b8c4a87 100644 Binary files a/elpa/magit-20200217.135/magit-git.elc and b/elpa/magit-20200220.308/magit-git.elc differ diff --git a/elpa/magit-20200217.135/magit-gitignore.el b/elpa/magit-20200220.308/magit-gitignore.el similarity index 100% rename from elpa/magit-20200217.135/magit-gitignore.el rename to elpa/magit-20200220.308/magit-gitignore.el diff --git a/elpa/magit-20200217.135/magit-gitignore.elc b/elpa/magit-20200220.308/magit-gitignore.elc similarity index 99% rename from elpa/magit-20200217.135/magit-gitignore.elc rename to elpa/magit-20200220.308/magit-gitignore.elc index 75e57b3f..56c7e850 100644 Binary files a/elpa/magit-20200217.135/magit-gitignore.elc and b/elpa/magit-20200220.308/magit-gitignore.elc differ diff --git a/elpa/magit-20200217.135/magit-imenu.el b/elpa/magit-20200220.308/magit-imenu.el similarity index 100% rename from elpa/magit-20200217.135/magit-imenu.el rename to elpa/magit-20200220.308/magit-imenu.el diff --git a/elpa/magit-20200217.135/magit-imenu.elc b/elpa/magit-20200220.308/magit-imenu.elc similarity index 99% rename from elpa/magit-20200217.135/magit-imenu.elc rename to elpa/magit-20200220.308/magit-imenu.elc index 3b6d7f02..424915fd 100644 Binary files a/elpa/magit-20200217.135/magit-imenu.elc and b/elpa/magit-20200220.308/magit-imenu.elc differ diff --git a/elpa/magit-20200217.135/magit-log.el b/elpa/magit-20200220.308/magit-log.el similarity index 100% rename from elpa/magit-20200217.135/magit-log.el rename to elpa/magit-20200220.308/magit-log.el diff --git a/elpa/magit-20200217.135/magit-log.elc b/elpa/magit-20200220.308/magit-log.elc similarity index 89% rename from elpa/magit-20200217.135/magit-log.elc rename to elpa/magit-20200220.308/magit-log.elc index 204a52b4..50d399bf 100644 Binary files a/elpa/magit-20200217.135/magit-log.elc and b/elpa/magit-20200220.308/magit-log.elc differ diff --git a/elpa/magit-20200217.135/magit-margin.el b/elpa/magit-20200220.308/magit-margin.el similarity index 100% rename from elpa/magit-20200217.135/magit-margin.el rename to elpa/magit-20200220.308/magit-margin.el diff --git a/elpa/magit-20200217.135/magit-margin.elc b/elpa/magit-20200220.308/magit-margin.elc similarity index 91% rename from elpa/magit-20200217.135/magit-margin.elc rename to elpa/magit-20200220.308/magit-margin.elc index f6ed55f6..540eee21 100644 Binary files a/elpa/magit-20200217.135/magit-margin.elc and b/elpa/magit-20200220.308/magit-margin.elc differ diff --git a/elpa/magit-20200217.135/magit-merge.el b/elpa/magit-20200220.308/magit-merge.el similarity index 100% rename from elpa/magit-20200217.135/magit-merge.el rename to elpa/magit-20200220.308/magit-merge.el diff --git a/elpa/magit-20200217.135/magit-merge.elc b/elpa/magit-20200220.308/magit-merge.elc similarity index 88% rename from elpa/magit-20200217.135/magit-merge.elc rename to elpa/magit-20200220.308/magit-merge.elc index b2dcb3d4..723a8abf 100644 Binary files a/elpa/magit-20200217.135/magit-merge.elc and b/elpa/magit-20200220.308/magit-merge.elc differ diff --git a/elpa/magit-20200217.135/magit-mode.el b/elpa/magit-20200220.308/magit-mode.el similarity index 100% rename from elpa/magit-20200217.135/magit-mode.el rename to elpa/magit-20200220.308/magit-mode.el diff --git a/elpa/magit-20200217.135/magit-mode.elc b/elpa/magit-20200220.308/magit-mode.elc similarity index 99% rename from elpa/magit-20200217.135/magit-mode.elc rename to elpa/magit-20200220.308/magit-mode.elc index 56014afb..a5644a88 100644 Binary files a/elpa/magit-20200217.135/magit-mode.elc and b/elpa/magit-20200220.308/magit-mode.elc differ diff --git a/elpa/magit-20200217.135/magit-notes.el b/elpa/magit-20200220.308/magit-notes.el similarity index 100% rename from elpa/magit-20200217.135/magit-notes.el rename to elpa/magit-20200220.308/magit-notes.el diff --git a/elpa/magit-20200217.135/magit-notes.elc b/elpa/magit-20200220.308/magit-notes.elc similarity index 99% rename from elpa/magit-20200217.135/magit-notes.elc rename to elpa/magit-20200220.308/magit-notes.elc index bbbefeef..c0648b52 100644 Binary files a/elpa/magit-20200217.135/magit-notes.elc and b/elpa/magit-20200220.308/magit-notes.elc differ diff --git a/elpa/magit-20200217.135/magit-obsolete.el b/elpa/magit-20200220.308/magit-obsolete.el similarity index 100% rename from elpa/magit-20200217.135/magit-obsolete.el rename to elpa/magit-20200220.308/magit-obsolete.el diff --git a/elpa/magit-20200217.135/magit-obsolete.elc b/elpa/magit-20200220.308/magit-obsolete.elc similarity index 99% rename from elpa/magit-20200217.135/magit-obsolete.elc rename to elpa/magit-20200220.308/magit-obsolete.elc index ca174f6c..bea6f585 100644 Binary files a/elpa/magit-20200217.135/magit-obsolete.elc and b/elpa/magit-20200220.308/magit-obsolete.elc differ diff --git a/elpa/magit-20200217.135/magit-patch.el b/elpa/magit-20200220.308/magit-patch.el similarity index 100% rename from elpa/magit-20200217.135/magit-patch.el rename to elpa/magit-20200220.308/magit-patch.el diff --git a/elpa/magit-20200217.135/magit-patch.elc b/elpa/magit-20200220.308/magit-patch.elc similarity index 99% rename from elpa/magit-20200217.135/magit-patch.elc rename to elpa/magit-20200220.308/magit-patch.elc index 8f9d0a76..27a1b687 100644 Binary files a/elpa/magit-20200217.135/magit-patch.elc and b/elpa/magit-20200220.308/magit-patch.elc differ diff --git a/elpa/magit-20200217.135/magit-pkg.el b/elpa/magit-20200220.308/magit-pkg.el similarity index 79% rename from elpa/magit-20200217.135/magit-pkg.el rename to elpa/magit-20200220.308/magit-pkg.el index 4359b3a0..23e1b6ad 100644 --- a/elpa/magit-20200217.135/magit-pkg.el +++ b/elpa/magit-20200220.308/magit-pkg.el @@ -1,4 +1,4 @@ -(define-package "magit" "20200217.135" "A Git porcelain inside Emacs." +(define-package "magit" "20200220.308" "A Git porcelain inside Emacs." '((emacs "25.1") (async "20180527") (dash "20180910") diff --git a/elpa/magit-20200217.135/magit-process.el b/elpa/magit-20200220.308/magit-process.el similarity index 100% rename from elpa/magit-20200217.135/magit-process.el rename to elpa/magit-20200220.308/magit-process.el diff --git a/elpa/magit-20200217.135/magit-process.elc b/elpa/magit-20200220.308/magit-process.elc similarity index 99% rename from elpa/magit-20200217.135/magit-process.elc rename to elpa/magit-20200220.308/magit-process.elc index 18c4d6b0..e6606383 100644 Binary files a/elpa/magit-20200217.135/magit-process.elc and b/elpa/magit-20200220.308/magit-process.elc differ diff --git a/elpa/magit-20200217.135/magit-pull.el b/elpa/magit-20200220.308/magit-pull.el similarity index 100% rename from elpa/magit-20200217.135/magit-pull.el rename to elpa/magit-20200220.308/magit-pull.el diff --git a/elpa/magit-20200217.135/magit-pull.elc b/elpa/magit-20200220.308/magit-pull.elc similarity index 99% rename from elpa/magit-20200217.135/magit-pull.elc rename to elpa/magit-20200220.308/magit-pull.elc index 42663d63..d34d92c1 100644 Binary files a/elpa/magit-20200217.135/magit-pull.elc and b/elpa/magit-20200220.308/magit-pull.elc differ diff --git a/elpa/magit-20200217.135/magit-push.el b/elpa/magit-20200220.308/magit-push.el similarity index 100% rename from elpa/magit-20200217.135/magit-push.el rename to elpa/magit-20200220.308/magit-push.el diff --git a/elpa/magit-20200217.135/magit-push.elc b/elpa/magit-20200220.308/magit-push.elc similarity index 99% rename from elpa/magit-20200217.135/magit-push.elc rename to elpa/magit-20200220.308/magit-push.elc index a1b60bae..e7baadbf 100644 Binary files a/elpa/magit-20200217.135/magit-push.elc and b/elpa/magit-20200220.308/magit-push.elc differ diff --git a/elpa/magit-20200217.135/magit-reflog.el b/elpa/magit-20200220.308/magit-reflog.el similarity index 100% rename from elpa/magit-20200217.135/magit-reflog.el rename to elpa/magit-20200220.308/magit-reflog.el diff --git a/elpa/magit-20200217.135/magit-reflog.elc b/elpa/magit-20200220.308/magit-reflog.elc similarity index 99% rename from elpa/magit-20200217.135/magit-reflog.elc rename to elpa/magit-20200220.308/magit-reflog.elc index e65752fb..4e9db48c 100644 Binary files a/elpa/magit-20200217.135/magit-reflog.elc and b/elpa/magit-20200220.308/magit-reflog.elc differ diff --git a/elpa/magit-20200217.135/magit-refs.el b/elpa/magit-20200220.308/magit-refs.el similarity index 100% rename from elpa/magit-20200217.135/magit-refs.el rename to elpa/magit-20200220.308/magit-refs.el diff --git a/elpa/magit-20200217.135/magit-refs.elc b/elpa/magit-20200220.308/magit-refs.elc similarity index 94% rename from elpa/magit-20200217.135/magit-refs.elc rename to elpa/magit-20200220.308/magit-refs.elc index 63ddf833..cc3e515e 100644 Binary files a/elpa/magit-20200217.135/magit-refs.elc and b/elpa/magit-20200220.308/magit-refs.elc differ diff --git a/elpa/magit-20200217.135/magit-remote.el b/elpa/magit-20200220.308/magit-remote.el similarity index 100% rename from elpa/magit-20200217.135/magit-remote.el rename to elpa/magit-20200220.308/magit-remote.el diff --git a/elpa/magit-20200217.135/magit-remote.elc b/elpa/magit-20200220.308/magit-remote.elc similarity index 85% rename from elpa/magit-20200217.135/magit-remote.elc rename to elpa/magit-20200220.308/magit-remote.elc index dad6c58a..53726078 100644 Binary files a/elpa/magit-20200217.135/magit-remote.elc and b/elpa/magit-20200220.308/magit-remote.elc differ diff --git a/elpa/magit-20200217.135/magit-repos.el b/elpa/magit-20200220.308/magit-repos.el similarity index 100% rename from elpa/magit-20200217.135/magit-repos.el rename to elpa/magit-20200220.308/magit-repos.el diff --git a/elpa/magit-20200217.135/magit-repos.elc b/elpa/magit-20200220.308/magit-repos.elc similarity index 99% rename from elpa/magit-20200217.135/magit-repos.elc rename to elpa/magit-20200220.308/magit-repos.elc index d699fec9..e8f45905 100644 Binary files a/elpa/magit-20200217.135/magit-repos.elc and b/elpa/magit-20200220.308/magit-repos.elc differ diff --git a/elpa/magit-20200217.135/magit-reset.el b/elpa/magit-20200220.308/magit-reset.el similarity index 100% rename from elpa/magit-20200217.135/magit-reset.el rename to elpa/magit-20200220.308/magit-reset.el diff --git a/elpa/magit-20200217.135/magit-reset.elc b/elpa/magit-20200220.308/magit-reset.elc similarity index 99% rename from elpa/magit-20200217.135/magit-reset.elc rename to elpa/magit-20200220.308/magit-reset.elc index bcf61ab8..cfde1a9f 100644 Binary files a/elpa/magit-20200217.135/magit-reset.elc and b/elpa/magit-20200220.308/magit-reset.elc differ diff --git a/elpa/magit-20200217.135/magit-section.el b/elpa/magit-20200220.308/magit-section.el similarity index 99% rename from elpa/magit-20200217.135/magit-section.el rename to elpa/magit-20200220.308/magit-section.el index 2216a120..19efd96f 100644 --- a/elpa/magit-20200217.135/magit-section.el +++ b/elpa/magit-20200220.308/magit-section.el @@ -369,7 +369,8 @@ Magit-Section is documented in info node `(magit-section)'." (when (and (fboundp 'display-line-numbers-mode) (bound-and-true-p global-display-line-numbers-mode)) (display-line-numbers-mode -1))) - (add-hook 'kill-buffer-hook 'magit-preserve-section-visibility-cache)) + (when (fboundp 'magit-preserve-section-visibility-cache) + (add-hook 'kill-buffer-hook #'magit-preserve-section-visibility-cache))) ;;; Core diff --git a/elpa/magit-20200217.135/magit-section.elc b/elpa/magit-20200220.308/magit-section.elc similarity index 91% rename from elpa/magit-20200217.135/magit-section.elc rename to elpa/magit-20200220.308/magit-section.elc index 2cb6e33a..f9f4a4fc 100644 Binary files a/elpa/magit-20200217.135/magit-section.elc and b/elpa/magit-20200220.308/magit-section.elc differ diff --git a/elpa/magit-20200217.135/magit-sequence.el b/elpa/magit-20200220.308/magit-sequence.el similarity index 100% rename from elpa/magit-20200217.135/magit-sequence.el rename to elpa/magit-20200220.308/magit-sequence.el diff --git a/elpa/magit-20200217.135/magit-sequence.elc b/elpa/magit-20200220.308/magit-sequence.elc similarity index 94% rename from elpa/magit-20200217.135/magit-sequence.elc rename to elpa/magit-20200220.308/magit-sequence.elc index c667482c..ab692e5a 100644 Binary files a/elpa/magit-20200217.135/magit-sequence.elc and b/elpa/magit-20200220.308/magit-sequence.elc differ diff --git a/elpa/magit-20200217.135/magit-stash.el b/elpa/magit-20200220.308/magit-stash.el similarity index 100% rename from elpa/magit-20200217.135/magit-stash.el rename to elpa/magit-20200220.308/magit-stash.el diff --git a/elpa/magit-20200217.135/magit-stash.elc b/elpa/magit-20200220.308/magit-stash.elc similarity index 99% rename from elpa/magit-20200217.135/magit-stash.elc rename to elpa/magit-20200220.308/magit-stash.elc index 38c33acd..4b430e04 100644 Binary files a/elpa/magit-20200217.135/magit-stash.elc and b/elpa/magit-20200220.308/magit-stash.elc differ diff --git a/elpa/magit-20200217.135/magit-status.el b/elpa/magit-20200220.308/magit-status.el similarity index 100% rename from elpa/magit-20200217.135/magit-status.el rename to elpa/magit-20200220.308/magit-status.el diff --git a/elpa/magit-20200217.135/magit-status.elc b/elpa/magit-20200220.308/magit-status.elc similarity index 97% rename from elpa/magit-20200217.135/magit-status.elc rename to elpa/magit-20200220.308/magit-status.elc index 1c2ebae4..c6464b0b 100644 Binary files a/elpa/magit-20200217.135/magit-status.elc and b/elpa/magit-20200220.308/magit-status.elc differ diff --git a/elpa/magit-20200217.135/magit-submodule.el b/elpa/magit-20200220.308/magit-submodule.el similarity index 100% rename from elpa/magit-20200217.135/magit-submodule.el rename to elpa/magit-20200220.308/magit-submodule.el diff --git a/elpa/magit-20200217.135/magit-submodule.elc b/elpa/magit-20200220.308/magit-submodule.elc similarity index 97% rename from elpa/magit-20200217.135/magit-submodule.elc rename to elpa/magit-20200220.308/magit-submodule.elc index e8561810..80edc0ed 100644 Binary files a/elpa/magit-20200217.135/magit-submodule.elc and b/elpa/magit-20200220.308/magit-submodule.elc differ diff --git a/elpa/magit-20200217.135/magit-subtree.el b/elpa/magit-20200220.308/magit-subtree.el similarity index 100% rename from elpa/magit-20200217.135/magit-subtree.el rename to elpa/magit-20200220.308/magit-subtree.el diff --git a/elpa/magit-20200217.135/magit-subtree.elc b/elpa/magit-20200220.308/magit-subtree.elc similarity index 99% rename from elpa/magit-20200217.135/magit-subtree.elc rename to elpa/magit-20200220.308/magit-subtree.elc index f9555aff..206a17e7 100644 Binary files a/elpa/magit-20200217.135/magit-subtree.elc and b/elpa/magit-20200220.308/magit-subtree.elc differ diff --git a/elpa/magit-20200217.135/magit-tag.el b/elpa/magit-20200220.308/magit-tag.el similarity index 100% rename from elpa/magit-20200217.135/magit-tag.el rename to elpa/magit-20200220.308/magit-tag.el diff --git a/elpa/magit-20200217.135/magit-tag.elc b/elpa/magit-20200220.308/magit-tag.elc similarity index 99% rename from elpa/magit-20200217.135/magit-tag.elc rename to elpa/magit-20200220.308/magit-tag.elc index 430ef41a..2c797822 100644 Binary files a/elpa/magit-20200217.135/magit-tag.elc and b/elpa/magit-20200220.308/magit-tag.elc differ diff --git a/elpa/magit-20200217.135/magit-transient.el b/elpa/magit-20200220.308/magit-transient.el similarity index 100% rename from elpa/magit-20200217.135/magit-transient.el rename to elpa/magit-20200220.308/magit-transient.el diff --git a/elpa/magit-20200217.135/magit-transient.elc b/elpa/magit-20200220.308/magit-transient.elc similarity index 99% rename from elpa/magit-20200217.135/magit-transient.elc rename to elpa/magit-20200220.308/magit-transient.elc index 29254b5f..422e4522 100644 Binary files a/elpa/magit-20200217.135/magit-transient.elc and b/elpa/magit-20200220.308/magit-transient.elc differ diff --git a/elpa/magit-20200217.135/magit-utils.el b/elpa/magit-20200220.308/magit-utils.el similarity index 100% rename from elpa/magit-20200217.135/magit-utils.el rename to elpa/magit-20200220.308/magit-utils.el diff --git a/elpa/magit-20200217.135/magit-utils.elc b/elpa/magit-20200220.308/magit-utils.elc similarity index 98% rename from elpa/magit-20200217.135/magit-utils.elc rename to elpa/magit-20200220.308/magit-utils.elc index 547ec65d..f9981748 100644 Binary files a/elpa/magit-20200217.135/magit-utils.elc and b/elpa/magit-20200220.308/magit-utils.elc differ diff --git a/elpa/magit-20200217.135/magit-wip.el b/elpa/magit-20200220.308/magit-wip.el similarity index 94% rename from elpa/magit-20200217.135/magit-wip.el rename to elpa/magit-20200220.308/magit-wip.el index 3ba54881..d9fb2ebc 100644 --- a/elpa/magit-20200217.135/magit-wip.el +++ b/elpa/magit-20200220.308/magit-wip.el @@ -281,13 +281,24 @@ commit message." (defun magit-wip-commit-worktree (ref files msg) (let* ((wipref (magit--wip-wtree-ref ref)) (parent (magit-wip-get-parent ref wipref)) - (tree (magit-with-temp-index parent "--reset" + (tree (magit-with-temp-index parent (list "--reset" "-i") (if files ;; Note: `update-index' is used instead of `add' ;; because `add' will fail if a file is already ;; deleted in the temporary index. - (magit-call-git "update-index" "--add" "--remove" - "--" files) + (magit-call-git + "update-index" "--add" "--remove" + (and (pcase (magit-repository-local-get + 'update-index-has-ignore-sw-p 'unset) + (`unset + (let ((val (version<= "2.25.0" + (magit-git-version)))) + (magit-repository-local-set + 'update-index-has-ignore-sw-p val) + val)) + (val val)) + "--ignore-skip-worktree-entries") + "--" files) (magit-with-toplevel (magit-call-git "add" "-u" "."))) (magit-git-string "write-tree")))) @@ -353,7 +364,8 @@ commit message." (defun magit--wip-ref (namespace &optional ref) (concat magit-wip-namespace namespace (or (and ref (string-prefix-p "refs/" ref) ref) - (when-let ((branch (or ref (magit-get-current-branch)))) + (when-let ((branch (and (not (equal ref "HEAD")) + (or ref (magit-get-current-branch))))) (concat "refs/heads/" branch)) "HEAD"))) diff --git a/elpa/magit-20200217.135/magit-wip.elc b/elpa/magit-20200220.308/magit-wip.elc similarity index 92% rename from elpa/magit-20200217.135/magit-wip.elc rename to elpa/magit-20200220.308/magit-wip.elc index 58e2b5e0..e5790932 100644 Binary files a/elpa/magit-20200217.135/magit-wip.elc and b/elpa/magit-20200220.308/magit-wip.elc differ diff --git a/elpa/magit-20200217.135/magit-worktree.el b/elpa/magit-20200220.308/magit-worktree.el similarity index 100% rename from elpa/magit-20200217.135/magit-worktree.el rename to elpa/magit-20200220.308/magit-worktree.el diff --git a/elpa/magit-20200217.135/magit-worktree.elc b/elpa/magit-20200220.308/magit-worktree.elc similarity index 99% rename from elpa/magit-20200217.135/magit-worktree.elc rename to elpa/magit-20200220.308/magit-worktree.elc index 3ec7d5b0..21c4fae4 100644 Binary files a/elpa/magit-20200217.135/magit-worktree.elc and b/elpa/magit-20200220.308/magit-worktree.elc differ diff --git a/elpa/magit-20200217.135/magit.el b/elpa/magit-20200220.308/magit.el similarity index 100% rename from elpa/magit-20200217.135/magit.el rename to elpa/magit-20200220.308/magit.el diff --git a/elpa/magit-20200217.135/magit.elc b/elpa/magit-20200220.308/magit.elc similarity index 99% rename from elpa/magit-20200217.135/magit.elc rename to elpa/magit-20200220.308/magit.elc index 8096f689..6ed985a0 100644 Binary files a/elpa/magit-20200217.135/magit.elc and b/elpa/magit-20200220.308/magit.elc differ diff --git a/elpa/magit-20200217.135/magit.info b/elpa/magit-20200220.308/magit.info similarity index 100% rename from elpa/magit-20200217.135/magit.info rename to elpa/magit-20200220.308/magit.info diff --git a/elpa/magit-20200217.135/magit.info-1 b/elpa/magit-20200220.308/magit.info-1 similarity index 100% rename from elpa/magit-20200217.135/magit.info-1 rename to elpa/magit-20200220.308/magit.info-1 diff --git a/elpa/magit-20200217.135/magit.info-2 b/elpa/magit-20200220.308/magit.info-2 similarity index 100% rename from elpa/magit-20200217.135/magit.info-2 rename to elpa/magit-20200220.308/magit.info-2 diff --git a/elpa/magit-popup-20200102.1811/dir b/elpa/magit-popup-20200102.1811/dir deleted file mode 100644 index ecec7cb7..00000000 --- a/elpa/magit-popup-20200102.1811/dir +++ /dev/null @@ -1,18 +0,0 @@ -This is the file .../info/dir, which contains the -topmost node of the Info hierarchy, called (dir)Top. -The first time you invoke Info you start off looking at this node. - -File: dir, Node: Top This is the top of the INFO tree - - This (the Directory node) gives a menu of major topics. - Typing "q" exits, "H" lists all Info commands, "d" returns here, - "h" gives a primer for first-timers, - "mEmacs" visits the Emacs manual, etc. - - In Emacs, you can click mouse button 2 on a menu item or cross reference - to select it. - -* Menu: - -Emacs -* Magit-Popup: (magit-popup). Infix arguments with feedback. diff --git a/elpa/magit-popup-20200102.1811/magit-popup-autoloads.el b/elpa/magit-popup-20200102.1811/magit-popup-autoloads.el deleted file mode 100644 index e6e027b2..00000000 --- a/elpa/magit-popup-20200102.1811/magit-popup-autoloads.el +++ /dev/null @@ -1,26 +0,0 @@ -;;; magit-popup-autoloads.el --- automatically extracted autoloads -;; -;;; Code: - -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) - - -;;;### (autoloads nil "magit-popup" "magit-popup.el" (0 0 0 0)) -;;; Generated autoloads from magit-popup.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-popup" '("magit-"))) - -;;;*** - -;;;### (autoloads nil nil ("magit-popup-pkg.el") (0 0 0 0)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; coding: utf-8 -;; End: -;;; magit-popup-autoloads.el ends here diff --git a/elpa/magit-popup-20200102.1811/magit-popup-pkg.el b/elpa/magit-popup-20200102.1811/magit-popup-pkg.el deleted file mode 100644 index 8c90b1aa..00000000 --- a/elpa/magit-popup-20200102.1811/magit-popup-pkg.el +++ /dev/null @@ -1,13 +0,0 @@ -(define-package "magit-popup" "20200102.1811" "Define prefix-infix-suffix command combos" - '((emacs "24.4") - (dash "2.13.0")) - :keywords - '("bindings") - :authors - '(("Jonas Bernoulli" . "jonas@bernoul.li")) - :maintainer - '("Jonas Bernoulli" . "jonas@bernoul.li") - :url "https://github.com/magit/magit-popup") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/magit-popup-20200102.1811/magit-popup.el b/elpa/magit-popup-20200102.1811/magit-popup.el deleted file mode 100644 index 40b818a9..00000000 --- a/elpa/magit-popup-20200102.1811/magit-popup.el +++ /dev/null @@ -1,1360 +0,0 @@ -;;; magit-popup.el --- Define prefix-infix-suffix command combos -*- lexical-binding: t -*- - -;; Copyright (C) 2010-2020 The Magit Project Contributors -;; -;; You should have received a copy of the AUTHORS.md file which -;; lists all contributors. If not, see http://magit.vc/authors. - -;; This library was inspired by and replaces library `magit-key-mode', -;; which was written by Phil Jackson and is -;; distributed under the GNU General Public License version 3 or later. - -;; Author: Jonas Bernoulli -;; Maintainer: Jonas Bernoulli - -;; Package-Requires: ((emacs "24.4") (dash "2.13.0")) -;; Keywords: bindings -;; Homepage: https://github.com/magit/magit-popup - -;; Magit-Popup is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; Magit-Popup is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with Magit-Popup. If not, see http://www.gnu.org/licenses. - -;;; Commentary: - -;; This package implements a generic interface for toggling switches -;; and setting options and then invoking an Emacs command that does -;; something with these arguments. Usually the command calls an -;; external process with the specified arguments. - -;; This package has been superseded by Transient. No new features -;; will be added but bugs will be fixes. - -;;; Code: - -(require 'button) -(require 'cl-lib) -(require 'dash) -(require 'format-spec) -(eval-when-compile (require 'subr-x)) - -(declare-function info 'info) -(declare-function Man-find-section 'man) -(declare-function Man-next-section 'man) - -;; For branch actions. -(declare-function magit-branch-set-face 'magit-git) - -;;; Settings -;;;; Custom Groups - -(defgroup magit-popup nil - "Infix arguments with a popup as feedback." - :link '(info-link "(magit-popup)") - :group 'bindings) - -(defgroup magit-popup-faces nil - "Faces used by Magit-Popup." - :group 'magit-popup) - -;;;; Custom Options - -(defcustom magit-popup-display-buffer-action '((display-buffer-below-selected)) - "The action used to display a popup buffer. - -Popup buffers are displayed using `display-buffer' with the value -of this option as ACTION argument. You can also set this to nil -and instead add an entry to `display-buffer-alist'." - :package-version '(magit-popup . "2.4.0") - :group 'magit-popup - :type 'sexp) - -(defcustom magit-popup-manpage-package - (if (memq system-type '(windows-nt ms-dos)) 'woman 'man) - "The package used to display manpages. -One of `man' or `woman'." - :group 'magit-popup - :type '(choice (const man) (const woman))) - -(defcustom magit-popup-show-help-echo t - "Show usage information in the echo area." - :group 'magit-popup - :type 'boolean) - -(defcustom magit-popup-show-common-commands nil - "Whether to initially show section with commands common to all popups. -This section can also be toggled temporarily using \ -\\\\[magit-popup-toggle-show-common-commands]." - :package-version '(magit-popup . "2.9.0") - :group 'magit-popup - :type 'boolean) - -(defcustom magit-popup-use-prefix-argument 'default - "Control how prefix arguments affect infix argument popups. - -This option controls the effect that the use of a prefix argument -before entering a popup has. - -`default' With a prefix argument directly invoke the popup's - default action (an Emacs command), instead of bringing - up the popup. - -`popup' With a prefix argument bring up the popup, otherwise - directly invoke the popup's default action. - -`nil' Ignore prefix arguments." - :group 'magit-popup - :type '(choice - (const :tag "Call default action instead of showing popup" default) - (const :tag "Show popup instead of calling default action" popup) - (const :tag "Ignore prefix argument" nil))) - -;;;; Custom Faces - -(defface magit-popup-heading - '((t :inherit font-lock-keyword-face)) - "Face for key mode header lines." - :group 'magit-popup-faces) - -(defface magit-popup-key - '((t :inherit font-lock-builtin-face)) - "Face for key mode buttons." - :group 'magit-popup-faces) - -(defface magit-popup-argument - '((t :inherit font-lock-warning-face)) - "Face used to display enabled arguments in popups." - :group 'magit-popup-faces) - -(defface magit-popup-disabled-argument - '((t :inherit shadow)) - "Face used to display disabled arguments in popups." - :group 'magit-popup-faces) - -(defface magit-popup-option-value - '((t :inherit font-lock-string-face)) - "Face used to display option values in popups." - :group 'magit-popup-faces) - -;;;; Keymap - -(defvar magit-popup-mode-map - (let ((map (make-sparse-keymap))) - (define-key map [remap self-insert-command] 'magit-invoke-popup-action) - (define-key map (kbd "- ") 'magit-invoke-popup-switch) - (define-key map (kbd "= ") 'magit-invoke-popup-option) - (define-key map (kbd "C-g") 'magit-popup-quit) - (define-key map (kbd "?") 'magit-popup-help) - (define-key map (kbd "C-h k") 'magit-popup-help) - (define-key map (kbd "C-h i") 'magit-popup-info) - (define-key map (kbd "C-t") 'magit-popup-toggle-show-common-commands) - (define-key map (kbd "C-c C-c") 'magit-popup-set-default-arguments) - (define-key map (kbd "C-x C-s") 'magit-popup-save-default-arguments) - (cond ((featurep 'jkl) - (define-key map (kbd "C-p") 'universal-argument) - (define-key map [return] 'push-button) - (define-key map (kbd "C-i") 'backward-button) - (define-key map (kbd "C-k") 'forward-button)) - (t - (define-key map (kbd "C-m") 'push-button) - (define-key map (kbd "DEL") 'backward-button) - (define-key map (kbd "C-p") 'backward-button) - (define-key map (kbd "C-i") 'forward-button) - (define-key map (kbd "C-n") 'forward-button))) - map) - "Keymap for `magit-popup-mode'. - -\\\ -This keymap contains bindings common to all popups. A section -listing these commands can be shown or hidden using \ -\\[magit-popup-toggle-show-common-commands]. - -The prefix used to toggle any switch can be changed by binding -another key to `magit-invoke-popup-switch'. Likewise binding -another key to `magit-invoke-popup-option' changes the prefixed -used to set any option. The two prefixes have to be different. -If you change these bindings, you should also change the `prefix' -property of the button types `magit-popup-switch-button' and -`magit-popup-option-button'. - -If you change any other binding, then you might have to also edit -`magit-popup-common-commands' for things to align correctly in -the section listing these commands. - -Never bind an alphabetic character in this keymap or you might -make it impossible to invoke certain actions.") - -(defvar magit-popup-common-commands - '(("Set defaults" magit-popup-set-default-arguments) - ("View popup manual" magit-popup-info) - ("Toggle this section" magit-popup-toggle-show-common-commands) - ("Save defaults" magit-popup-save-default-arguments) - (" Popup help prefix" magit-popup-help) - ("Abort" magit-popup-quit))) - -;;;; Buttons - -(define-button-type 'magit-popup-button - 'face nil - 'action (lambda (button) - (funcall (button-get button 'function) - (button-get button 'event)))) - -(define-button-type 'magit-popup-switch-button - 'supertype 'magit-popup-button - 'function 'magit-invoke-popup-switch - 'property :switches - 'heading "Switches\n" - 'formatter 'magit-popup-format-argument-button - 'format " %k %d (%a)" - 'prefix ?- - 'maxcols 1) - -(define-button-type 'magit-popup-option-button - 'supertype 'magit-popup-button - 'function 'magit-invoke-popup-option - 'property :options - 'heading "Options\n" - 'formatter 'magit-popup-format-argument-button - 'format " %k %d (%a%v)" - 'prefix ?= - 'maxcols 1) - -(define-button-type 'magit-popup-variable-button - 'supertype 'magit-popup-button - 'function 'magit-invoke-popup-action - 'property :variables - 'heading "Variables\n" - 'formatter 'magit-popup-format-variable-button - 'format " %k %d" - 'prefix nil - 'maxcols 1) - -(define-button-type 'magit-popup-action-button - 'supertype 'magit-popup-button - 'function 'magit-invoke-popup-action - 'property :actions - 'heading "Actions\n" - 'formatter 'magit-popup-format-action-button - 'format " %k %d" - 'prefix nil - 'maxcols :max-action-columns) - -(define-button-type 'magit-popup-command-button - 'supertype 'magit-popup-action-button - 'formatter 'magit-popup-format-command-button - 'action (lambda (button) - (let ((command (button-get button 'function))) - (unless (eq command 'push-button) - (call-interactively command))))) - -(define-button-type 'magit-popup-internal-command-button - 'supertype 'magit-popup-command-button - 'heading "Common Commands\n" - 'maxcols 3) - -;;; Events - -(defvar-local magit-this-popup nil - "The popup which is currently active. -This is intended for internal use only. -Don't confuse this with `magit-current-popup'.") - -(defvar-local magit-this-popup-events nil - "The events known to the active popup. -This is intended for internal use only. -Don't confuse this with `magit-current-popup-args'.") - -(defvar-local magit-previous-popup nil) - -(defvar-local magit-pre-popup-buffer nil - "The buffer that was current before invoking the active popup.") - -(defun magit-popup-get (prop) - "While a popup is active, get the value of PROP." - (if (memq prop '(:switches :options :variables :actions)) - (plist-get magit-this-popup-events prop) - (plist-get (symbol-value magit-this-popup) prop))) - -(defun magit-popup-put (prop val) - "While a popup is active, set the value of PROP to VAL." - (if (memq prop '(:switches :options :variables :actions)) - (setq magit-this-popup-events - (plist-put magit-this-popup-events prop val)) - (error "Property %s isn't supported" prop))) - -(defvar magit-current-popup nil - "The popup from which this editing command was invoked. - -Use this inside the `interactive' form of a popup aware command -to determine whether it was invoked from a popup and if so from -which popup. If the current command was invoked without the use -of a popup, then this is nil.") - -(defvar magit-current-popup-action nil - "The popup action now being executed.") - -(defvar magit-current-popup-args nil - "The value of the popup arguments for this editing command. - -If the current command was invoked from a popup, then this is -a list of strings of all the set switches and options. This -includes arguments which are set by default not only those -explicitly set during this invocation. - -When the value is nil, then that can be because no argument is -set, or because the current command wasn't invoked from a popup; -consult `magit-current-popup' to tell the difference. - -Generally it is better to use `NAME-arguments', which is created -by `magit-define-popup', instead of this variable or the function -by the same name, because `NAME-argument' uses the default value -for the arguments when the editing command is invoked directly -instead of from a popup. When the command is bound in several -popups that might not be feasible though.") - -(defun magit-current-popup-args (&rest filter) - "Return the value of the popup arguments for this editing command. - -The value is the same as that of the variable by the same name -\(which see), except that FILTER is applied. FILTER is a list -of regexps; only arguments that match one of them are returned. -The first element of FILTER may also be `:not' in which case -only arguments that don't match any of the regexps are returned, -or `:only' which doesn't change the behaviour." - (let ((-compare-fn (lambda (a b) (magit-popup-arg-match b a)))) - (-filter (if (eq (car filter) :not) - (lambda (arg) (not (-contains-p (cdr filter) arg))) - (when (eq (car filter) :only) - (pop filter)) - (lambda (arg) (-contains-p filter arg))) - magit-current-popup-args))) - -(defvar magit-current-pre-popup-buffer nil - "The buffer that was current before invoking the active popup. -This is bound when invoking an action or variable.") - -(defmacro magit-with-pre-popup-buffer (&rest body) - "Execute the forms in BODY in the buffer that current before the popup. -If `magit-current-pre-popup-buffer' is non-nil use that, else if -`magit-pre-popup-buffer' is non-nil use that, otherwise (when no -popup is involved) execute the forms in the current buffer." - (declare (indent 0)) - `(--if-let (or magit-current-pre-popup-buffer magit-pre-popup-buffer) - (with-current-buffer it ,@body) - ,@body)) - -(defun magit-popup-arg-match (pattern string) - (if (or (string-match-p "=$" pattern) - (string-match-p "^-[A-Z]$" pattern)) - (string-match (format "^%s\\(.*\\)$" pattern) string) - (string-equal string pattern))) - -(cl-defstruct magit-popup-event key dsc arg fun use val) - -(defun magit-popup-event-keydsc (ev) - (let ((key (magit-popup-event-key ev))) - (key-description (if (vectorp key) key (vector key))))) - -(defun magit-popup-lookup (event type) - (--first (equal (magit-popup-event-key it) event) - (-filter 'magit-popup-event-p (magit-popup-get type)))) - -(defun magit-popup-get-args () - (--mapcat (when (and (magit-popup-event-p it) - (magit-popup-event-use it)) - (list (format "%s%s" - (magit-popup-event-arg it) - (or (magit-popup-event-val it) "")))) - (append (magit-popup-get :switches) - (magit-popup-get :options)))) - -(defmacro magit-popup-convert-events (def form) - (declare (indent 1) (debug (form form))) - `(--map (if (or (null it) (stringp it) (functionp it)) it ,form) ,def)) - -(defun magit-popup-convert-switches (val def) - (magit-popup-convert-events def - (let ((a (nth 2 it))) - (make-magit-popup-event - :key (car it) :dsc (cadr it) :arg a - :use (and (member a val) t) - ;; For arguments implemented in lisp, this function's - ;; doc-string is used by `magit-popup-help'. That is - ;; the only thing it is used for. - :fun (and (string-prefix-p "\+\+" a) (nth 3 it)))))) - -(defun magit-popup-convert-options (val def) - (magit-popup-convert-events def - (let* ((a (nth 2 it)) - (r (format "^%s\\(.*\\)" a)) - (v (--first (string-match r it) val))) - (make-magit-popup-event - :key (car it) :dsc (cadr it) :arg a - :use (and v t) :val (and v (match-string 1 v)) - :fun (or (nth 3 it) 'read-from-minibuffer))))) - -(defun magit-popup-convert-variables (_val def) - (magit-popup-convert-events def - (make-magit-popup-event - :key (car it) :dsc (cadr it) :fun (nth 2 it) :arg (nth 3 it)))) - -(defun magit-popup-convert-actions (_val def) - (magit-popup-convert-events def - (make-magit-popup-event - :key (car it) :dsc (cadr it) :fun (nth 2 it)))) - -;;; Define - -(defmacro magit-define-popup (name doc &rest args) - "Define a popup command named NAME. - -NAME should begin with the package prefix and by convention end -with `-popup'. That name is used for the actual command as well -as for a variable used internally. DOC is used as the doc-string -of that command. - -Also define an option and a function named `SHORTNAME-arguments', -where SHORTNAME is NAME with the trailing `-popup' removed. The -name of this option and this function can be overwritten using -the optional argument OPTION, but that is rarely advisable. As a -special case if OPTION is specified but nil, do not define this -option and this function at all. - -The option `SHORTNAME-arguments' holds the default value for the -popup arguments. It can be customized from within the popup or -using the Custom interface. - -The function `SHORTNAME-arguments' is a wrapper around the -variable `magit-current-popup-args', both of which are intended -to be used inside the `interactive' form of commands commonly -invoked from the popup `NAME'. When such a command is invoked -from that popup, then the function `SHORTNAME-arguments' returns -the value of the variable `magit-current-popup-args'; however -when the command is invoked directly, then it returns the default -value of the variable `SHORTNAME-arguments'. - -Optional argument GROUP specifies the Custom group into which the -option is placed. If omitted, then the option is placed into some -group the same way it is done when directly using `defcustom' and -omitting the group, except when NAME begins with \"magit-\", in -which case the group `magit-git-arguments' is used. - -Optional argument MODE is deprecated, instead use the keyword -arguments `:setup-function' and/or `:refresh-function'. If MODE -is non-nil, then it specifies the mode used by the popup buffer, -instead of the default, which is `magit-popup-mode'. - -The remaining arguments should have the form - - [KEYWORD VALUE]... - -The following keywords are meaningful (and by convention are -usually specified in that order): - -`:actions' - The actions which can be invoked from the popup. VALUE is a - list whose members have the form (KEY DESC COMMAND), see - `magit-define-popup-action' for details. - - Actions are regular Emacs commands, which usually have an - `interactive' form setup to consume the values of the popup - `:switches' and `:options' when invoked from the corresponding - popup, else when invoked as the default action or directly - without using the popup, the default value of the variable - `SHORTNAME-arguments'. This is usually done by calling the - function `SHORTNAME-arguments'. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, which - is used as the heading, or nil, in which case the section is - not inserted. - - Members of VALUE may also be nil. This should only be used - together with `:max-action-columns' and allows having gaps in - the action grid, which can help arranging actions sensibly. - -`:default-action' - The default action of the popup which is used directly instead - of displaying the popup buffer, when the popup is invoked with - a prefix argument. Also see `magit-popup-use-prefix-argument' - and `:use-prefix', which can be used to inverse the meaning of - the prefix argument. - -`:use-prefix' - Controls when to display the popup buffer and when to invoke - the default action (if any) directly. This overrides the - global default set using `magit-popup-use-prefix-argument'. - The value, if specified, should be one of `default' or `popup', - or a function that is called with no arguments and returns one - of these symbols. - -`:max-action-columns' - The maximum number of actions to display on a single line, a - number or a function that returns a number and takes the name - of the section currently being inserted as argument. If there - isn't enough room to display as many columns as specified here, - then fewer are used. - -`:switches' - The popup arguments which can be toggled on and off. VALUE - is a list whose members have the form (KEY DESC SWITCH), see - `magit-define-popup-switch' for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, which - is used as the heading, or nil, in which case the section is - not inserted. - -`:options' - The popup arguments which take a value, as in \"--opt=OPTVAL\". - VALUE is a list whose members have the form (KEY DESC OPTION - READER), see `magit-define-popup-option' for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, which - is used as the heading, or nil, in which case the section is - not inserted. - -`:default-arguments' - The default arguments, a list of switches (which are then - enabled by default) and options with there default values, as - in \"--OPT=OPTVAL\". - -`:variables' - - Variables which can be set from the popup. VALUE is a list - whose members have the form (KEY DESC COMMAND FORMATTER), see - `magit-define-popup-variable' for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, which - is used as the heading, or nil, in which case the section is - not inserted. - - Members of VALUE may also be actions as described above for - `:actions'. - - VALUE may also be a function that returns a list as describe - above. - -`:sequence-predicate' - When this function returns non-nil, then the popup uses - `:sequence-actions' instead of `:actions', and does not show - the `:switches' and `:options'. - -`:sequence-actions' - The actions which can be invoked from the popup, when - `:sequence-predicate' returns non-nil. - -`:setup-function' - When this function is specified, then it is used instead of - `magit-popup-default-setup'. - -`:refresh-function' - When this function is specified, then it is used instead of - calling `magit-popup-insert-section' three times with symbols - `magit-popup-switch-button', `magit-popup-option-button', and - finally `magit-popup-action-button' as argument. - -`:man-page' - The name of the manpage to be displayed when the user requests - help for a switch or argument. - -\(fn NAME DOC [GROUP [MODE [OPTION]]] :KEYWORD VALUE...)" - (declare (indent defun) (doc-string 2)) - (let* ((str (symbol-name name)) - (grp (if (keywordp (car args)) - (and (string-prefix-p "magit-" str) ''magit-git-arguments) - (pop args))) - (mode (and (not (keywordp (car args))) (pop args))) - (opt (if (keywordp (car args)) - (intern (concat (if (string-suffix-p "-popup" str) - (substring str 0 -6) - str) - "-arguments")) - (eval (pop args))))) - `(progn - (defun ,name (&optional arg) ,doc - (interactive "P") - (magit-invoke-popup ',name ,mode arg)) - (defvar ,name - (list :variable ',opt ,@args)) - (magit-define-popup-keys-deferred ',name) - ,@(when opt - `((defcustom ,opt (plist-get ,name :default-arguments) - "" - ,@(and grp (list :group grp)) - :type '(repeat (string :tag "Argument"))) - (defun ,opt () - (if (eq magit-current-popup ',name) - magit-current-popup-args - ,opt)) - (put ',opt 'definition-name ',name)))))) - -(defun magit-define-popup-switch (popup key desc switch - &optional enable at prepend) - "In POPUP, define KEY as SWITCH. - -POPUP is a popup command defined using `magit-define-popup'. -SWITCH is a string representing an argument that takes no value. -KEY is a character representing the second event in the sequence -of keystrokes used to toggle the argument. (The first event, the -prefix, is shared among all switches, defaults to -, and can be -changed in `magit-popup-mode-keymap'). - -DESC is a string describing the purpose of the argument, it is -displayed in the popup. - -If optional ENABLE is non-nil, then the switch is on by default. - -SWITCH is inserted after all other switches already defined for -POPUP, unless optional PREPEND is non-nil, in which case it is -placed first. If optional AT is non-nil, then it should be the -KEY of another switch already defined for POPUP, the argument -is then placed before or after AT, depending on PREPEND." - (declare (indent defun)) - (magit-define-popup-key popup :switches key - (list desc switch enable) at prepend)) - -(defun magit-define-popup-option (popup key desc option - &optional reader value at prepend) - "In POPUP, define KEY as OPTION. - -POPUP is a popup command defined using `magit-define-popup'. -OPTION is a string representing an argument that takes a value. -KEY is a character representing the second event in the sequence -of keystrokes used to set the argument's value. (The first -event, the prefix, is shared among all options, defaults to =, -and can be changed in `magit-popup-mode-keymap'). - -DESC is a string describing the purpose of the argument, it is -displayed in the popup. - -If optional VALUE is non-nil then the option is on by default, -and VALUE is its default value. - -READER is used to read a value from the user when the option is -invoked and does not currently have a value. (When the option -has a value, then invoking the option causes it to be unset.) -This function must take two arguments but may choose to ignore -them. The first argument is the name of the option (with \": \" -appended, unless it ends with \"=\") and can be used as the -prompt. The second argument is nil or the value that was in -effect before the option was unset, which may be suitable as -initial completion input. If no reader is specified, then -`read-from-minibuffer' is used. - -OPTION is inserted after all other options already defined for -POPUP, unless optional PREPEND is non-nil, in which case it is -placed first. If optional AT is non-nil, then it should be the -KEY of another option already defined for POPUP, the argument -is then placed before or after AT, depending on PREPEND." - (declare (indent defun)) - (magit-define-popup-key popup :options key - (list desc option reader value) at prepend)) - -(defun magit-define-popup-variable (popup key desc command formatter - &optional at prepend) - "In POPUP, define KEY as COMMAND. - -POPUP is a popup command defined using `magit-define-popup'. -COMMAND is a command which calls `magit-popup-set-variable'. -FORMATTER is a function which calls `magit-popup-format-variable'. -These two functions have to be called with the same arguments. - -KEY is a character representing the event used interactively call -the COMMAND. - -DESC is the variable or a representation thereof. It's not -actually used for anything. - -COMMAND is inserted after all other commands already defined for -POPUP, unless optional PREPEND is non-nil, in which case it is -placed first. If optional AT is non-nil, then it should be the -KEY of another command already defined for POPUP, the command -is then placed before or after AT, depending on PREPEND." - (declare (indent defun)) - (magit-define-popup-key popup :variables key - (list desc command formatter) at prepend)) - -(defun magit-define-popup-action (popup key desc command - &optional at prepend) - "In POPUP, define KEY as COMMAND. - -POPUP is a popup command defined using `magit-define-popup'. -COMMAND can be any command but should usually consume the popup -arguments in its `interactive' form. -KEY is a character representing the event used invoke the action, -i.e. to interactively call the COMMAND. - -DESC is a string describing the purpose of the action, it is -displayed in the popup. - -COMMAND is inserted after all other commands already defined for -POPUP, unless optional PREPEND is non-nil, in which case it is -placed first. If optional AT is non-nil, then it should be the -KEY of another command already defined for POPUP, the command -is then placed before or after AT, depending on PREPEND." - (declare (indent defun)) - (magit-define-popup-key popup :actions key - (list desc command) at prepend)) - -(defun magit-define-popup-sequence-action - (popup key desc command &optional at prepend) - "Like `magit-define-popup-action' but for `:sequence-action'." - (declare (indent defun)) - (magit-define-popup-key popup :sequence-actions key - (list desc command) at prepend)) - -(defconst magit-popup-type-plural-alist - '((:switch . :switches) - (:option . :options) - (:variable . :variables) - (:action . :actions) - (:sequence-action . :sequence-actions))) - -(defun magit-popup-pluralize-type (type) - (or (cdr (assq type magit-popup-type-plural-alist)) - type)) - -(defun magit-define-popup-key - (popup type key def &optional at prepend) - "In POPUP, define KEY as an action, switch, or option. -It's better to use one of the specialized functions - `magit-define-popup-action', - `magit-define-popup-sequence-action', - `magit-define-popup-switch', - `magit-define-popup-option', or - `magit-define-popup-variable'." - (declare (indent defun)) - (setq type (magit-popup-pluralize-type type)) - (if (memq type '(:switches :options :variables :actions :sequence-actions)) - (if (boundp popup) - (let* ((plist (symbol-value popup)) - (value (plist-get plist type)) - (elt (assoc key value))) - (if elt - (setcdr elt def) - (setq elt (cons key def))) - (if at - (when (setq at (cl-member at value :key 'car-safe :test 'equal)) - (setq value (cl-delete key value :key 'car-safe :test 'equal)) - (if prepend - (progn (push (car at) (cdr at)) - (setcar at elt)) - (push elt (cdr at)))) - (setq value (cl-delete key value :key 'car-safe :test 'equal))) - (unless (assoc key value) - (setq value (if prepend - (cons elt value) - (append value (list elt))))) - (set popup (plist-put plist type value))) - (push (list type key def at prepend) - (get popup 'magit-popup-deferred))) - (error "Unknown popup event type: %s" type))) - -(defun magit-define-popup-keys-deferred (popup) - (dolist (args (get popup 'magit-popup-deferred)) - (condition-case err - (apply #'magit-define-popup-key popup args) - ((debug error) - (display-warning 'magit (error-message-string err) :error)))) - (put popup 'magit-popup-deferred nil)) - -(defun magit-change-popup-key (popup type from to) - "In POPUP, bind TO to what FROM was bound to. -TYPE is one of `:action', `:sequence-action', `:switch', or -`:option'. Bind TO and unbind FROM, both are characters." - (--if-let (assoc from (plist-get (symbol-value popup) - (magit-popup-pluralize-type type))) - (setcar it to) - (message "magit-change-popup-key: FROM key %c is unbound" from))) - -(defun magit-remove-popup-key (popup type key) - "In POPUP, remove KEY's binding of TYPE. -POPUP is a popup command defined using `magit-define-popup'. -TYPE is one of `:action', `:sequence-action', `:switch', or -`:option'. KEY is the character which is to be unbound." - (setq type (magit-popup-pluralize-type type)) - (let* ((plist (symbol-value popup)) - (alist (plist-get plist type)) - (value (assoc key alist))) - (set popup (plist-put plist type (delete value alist))))) - -;;; Invoke - -(defvar-local magit-popup-previous-winconf nil) - -(defun magit-invoke-popup (popup mode arg) - (let* ((def (symbol-value popup)) - (val (symbol-value (plist-get def :variable))) - (default (plist-get def :default-action)) - (local (plist-get def :use-prefix)) - (local (if (functionp local) - (funcall local) - local)) - (use-prefix (or local magit-popup-use-prefix-argument))) - (cond - ((or (and (eq use-prefix 'default) arg) - (and (eq use-prefix 'popup) (not arg))) - (if default - (let ((magit-current-popup (list popup 'default)) - (magit-current-popup-args - (let ((magit-this-popup popup) - (magit-this-popup-events nil)) - (magit-popup-default-setup val def) - (magit-popup-get-args)))) - (when (and arg (listp arg)) - (setq current-prefix-arg (and (not (= (car arg) 4)) - (list (/ (car arg) 4))))) - (call-interactively default)) - (message "%s has no default action; showing popup instead." popup) - (magit-popup-mode-setup popup mode))) - ((memq use-prefix '(default popup nil)) - (magit-popup-mode-setup popup mode) - (when magit-popup-show-help-echo - (let ((message-log-max nil)) - (message - (format - "[%s] show common commands, [%s] describe events, [%s] show manual" - (propertize "C-t" 'face 'magit-popup-key) - (propertize "?" 'face 'magit-popup-key) - (propertize "C-h i" 'face 'magit-popup-key)))))) - (local - (error "Invalid :use-prefix popup property value: %s" use-prefix)) - (t - (error "Invalid magit-popup-use-prefix-argument value: %s" use-prefix))))) - -(defun magit-invoke-popup-switch (event) - (interactive (list last-command-event)) - (--if-let (magit-popup-lookup event :switches) - (progn - (setf (magit-popup-event-use it) - (not (magit-popup-event-use it))) - (magit-refresh-popup-buffer)) - (user-error "%c isn't bound to any switch" event))) - -(defun magit-invoke-popup-option (event) - (interactive (list last-command-event)) - (--if-let (magit-popup-lookup event :options) - (progn - (if (magit-popup-event-use it) - (setf (magit-popup-event-use it) nil) - (let* ((arg (magit-popup-event-arg it)) - (val (funcall - (magit-popup-event-fun it) - (concat arg (unless (string-match-p "=$" arg) ": ")) - (magit-popup-event-val it)))) - (setf (magit-popup-event-use it) t) - (setf (magit-popup-event-val it) val))) - (magit-refresh-popup-buffer)) - (user-error "%c isn't bound to any option" event))) - -(defun magit-invoke-popup-action (event) - (interactive (list last-command-event)) - (let ((action (magit-popup-lookup event :actions)) - (variable (magit-popup-lookup event :variables))) - (when (and variable (not (magit-popup-event-arg variable))) - (setq action variable) - (setq variable nil)) - (cond ((or action variable) - (let* ((magit-current-popup magit-this-popup) - (magit-current-popup-args (magit-popup-get-args)) - (magit-current-pre-popup-buffer magit-pre-popup-buffer) - (command (magit-popup-event-fun (or action variable))) - (magit-current-popup-action command)) - (when action - (magit-popup-quit)) - (setq this-command command) - (call-interactively command) - (unless action - (magit-refresh-popup-buffer)))) - ((eq event ?q) - (magit-popup-quit) - (when magit-previous-popup - (magit-popup-mode-setup magit-previous-popup nil))) - (t - (user-error "%c isn't bound to any action" event))))) - -(defun magit-popup-quit () - "Quit the current popup command without invoking an action." - (interactive) - (let ((winconf magit-popup-previous-winconf)) - (if (derived-mode-p 'magit-popup-mode) - (kill-buffer) - (magit-popup-help-mode -1) - (kill-local-variable 'magit-popup-previous-winconf)) - (when winconf - (set-window-configuration winconf)))) - -(defun magit-popup-read-number (prompt &optional default) - "Like `read-number' but DEFAULT may be a numeric string." - (read-number prompt (if (stringp default) - (string-to-number default) - default))) - -;;; Save - -(defun magit-popup-set-default-arguments (arg) - "Set default value for the arguments for the current popup. -Then close the popup without invoking an action; unless a prefix -argument is used in which case the popup remains open. - -For a popup named `NAME-popup' that usually means setting the -value of the custom option `NAME-arguments'." - (interactive "P") - (-if-let (var (magit-popup-get :variable)) - (progn (customize-set-variable var (magit-popup-get-args)) - (unless arg (magit-popup-quit))) - (user-error "Nothing to set"))) - -(defun magit-popup-save-default-arguments (arg) - "Save default value for the arguments for the current popup. -Then close the popup without invoking an action; unless a prefix -argument is used in which case the popup remains open. - -For a popup named `NAME-popup' that usually means saving the -value of the custom option `NAME-arguments'." - (interactive "P") - (-if-let (var (magit-popup-get :variable)) - (progn (customize-save-variable var (magit-popup-get-args)) - (unless arg (magit-popup-quit))) - (user-error "Nothing to save"))) - -;;; Help - -(defun magit-popup-toggle-show-common-commands () - "Show or hide an additional section with common commands. -The commands listed in this section are common to all popups -and are defined in `magit-popup-mode-map' (which see)." - (interactive) - (setq magit-popup-show-common-commands - (not magit-popup-show-common-commands)) - (magit-refresh-popup-buffer) - (fit-window-to-buffer)) - -(defun magit-popup-help () - "Show help for the argument or action at point." - (interactive) - (let* ((man (magit-popup-get :man-page)) - (key (read-key-sequence - (concat "Describe key" (and man " (? for manpage)") ": "))) - (int (aref key (1- (length key)))) - (def (or (lookup-key (current-local-map) key t) - (lookup-key (current-global-map) key)))) - (pcase def - (`magit-invoke-popup-switch - (--if-let (magit-popup-lookup int :switches) - (if (and (string-prefix-p "++" (magit-popup-event-arg it)) - (magit-popup-event-fun it)) - (magit-popup-describe-function (magit-popup-event-fun it)) - (magit-popup-manpage man it)) - (user-error "%c isn't bound to any switch" int))) - (`magit-invoke-popup-option - (--if-let (magit-popup-lookup int :options) - (if (and (string-prefix-p "++" (magit-popup-event-arg it)) - (magit-popup-event-fun it)) - (magit-popup-describe-function (magit-popup-event-fun it)) - (magit-popup-manpage man it)) - (user-error "%c isn't bound to any option" int))) - (`magit-popup-help - (magit-popup-manpage man nil)) - ((or `self-insert-command - `magit-invoke-popup-action) - (setq def (or (magit-popup-lookup int :actions) - (magit-popup-lookup int :variables))) - (if def - (magit-popup-describe-function (magit-popup-event-fun def)) - (ding) - (message nil))) - (`nil (ding) - (message nil)) - (_ (magit-popup-describe-function def))))) - -(defun magit-popup-manpage (topic arg) - (unless topic - (user-error "No man page associated with %s" - (magit-popup-get :man-page))) - (when arg - (setq arg (magit-popup-event-arg arg)) - (when (string-prefix-p "--" arg) - ;; handle '--' option and the '--[no-]' shorthand - (setq arg (cond ((string= "-- " arg) - "\\(?:\\[--\\] \\)?<[^[:space:]]+>\\.\\.\\.") - ((string-prefix-p "--no-" arg) - (concat "--" - "\\[?no-\\]?" - (substring arg 5))) - (t - (concat "--" - "\\(?:\\[no-\\]\\)?" - (substring arg 2))))))) - (let ((winconf (current-window-configuration)) buffer) - (pcase magit-popup-manpage-package - (`woman (delete-other-windows) - (split-window-below) - (with-no-warnings ; display-buffer-function is obsolete - (let ((display-buffer-alist nil) - (display-buffer-function nil) - (display-buffer-overriding-action nil)) - (woman topic))) - (setq buffer (current-buffer))) - (`man (cl-letf (((symbol-function #'fboundp) (lambda (_) nil))) - (setq buffer (man topic))) - (delete-other-windows) - (split-window-below) - (set-window-buffer (selected-window) buffer))) - (with-current-buffer buffer - (setq magit-popup-previous-winconf winconf) - (magit-popup-help-mode) - (fit-window-to-buffer (next-window)) - (if (and arg - (Man-find-section "OPTIONS") - (let ((case-fold-search nil) - ;; This matches preceding/proceeding options. - ;; Options such as '-a', '-S[]', and - ;; '--grep=' are matched by this regex - ;; without the shy group. The '. ' in the shy - ;; group is for options such as '-m - ;; parent-number', and the '-[^[:space:]]+ ' is - ;; for options such as '--mainline parent-number' - (others "-\\(?:. \\|-[^[:space:]]+ \\)?[^[:space:]]+")) - (re-search-forward - ;; should start with whitespace, and may have any - ;; number of options before/after - (format "^[\t\s]+\\(?:%s, \\)*?\\(?1:%s\\)%s\\(?:, %s\\)*$" - others - ;; options don't necessarily end in an '=' - ;; (e.g., '--gpg-sign[=]') - (string-remove-suffix "=" arg) - ;; Simple options don't end in an '='. - ;; Splitting this into 2 cases should make - ;; getting false positives less likely. - (if (string-suffix-p "=" arg) - ;; [^[:space:]]*[^.[:space:]] matches - ;; the option value, which is usually - ;; after the option name and either '=' - ;; or '[='. The value can't end in a - ;; period, as that means it's being used - ;; at the end of a sentence. The space - ;; is for options such as '--mainline - ;; parent-number'. - "\\(?: \\|\\[?=\\)[^[:space:]]*[^.[:space:]]" - ;; Either this doesn't match anything - ;; (e.g., '-a'), or the option is followed - ;; by a value delimited by a '[', '<', or - ;; ':'. A space might appear before this - ;; value, as in '-f '. The space - ;; alternative is for options such as '-m - ;; parent-number'. - "\\(?:\\(?: \\| ?[\\[<:]\\)[^[:space:]]*[^.[:space:]]\\)?") - others) - nil - t))) - (goto-char (match-beginning 1)) - (goto-char (point-min)))))) - -(defun magit-popup-describe-function (function) - (let ((winconf (current-window-configuration))) - (delete-other-windows) - (split-window-below) - (other-window 1) - (with-no-warnings ; display-buffer-function is obsolete - (let ((display-buffer-alist '(("" display-buffer-use-some-window))) - (display-buffer-function nil) - (display-buffer-overriding-action nil) - (help-window-select nil)) - (describe-function function))) - (fit-window-to-buffer) - (other-window 1) - (setq magit-popup-previous-winconf winconf) - (magit-popup-help-mode))) - -(defun magit-popup-info () - "Show the popup manual." - (interactive) - (let ((winconf (current-window-configuration))) - (delete-other-windows) - (split-window-below) - (info "(magit-popup.info)Usage") - (magit-popup-help-mode) - (setq magit-popup-previous-winconf winconf)) - (magit-popup-help-mode) - (fit-window-to-buffer (next-window))) - -(define-minor-mode magit-popup-help-mode - "Auxiliary minor mode used to restore previous window configuration. -When some sort of help buffer is created from within a popup, -then this minor mode is turned on in that buffer, so that when -the user quits it, the previous window configuration is also -restored." - :keymap '(([remap Man-quit] . magit-popup-quit) - ([remap Info-exit] . magit-popup-quit) - ([remap quit-window] . magit-popup-quit))) - -;;; Modes - -(define-derived-mode magit-popup-mode fundamental-mode "MagitPopup" - "Major mode for infix argument popups." - :mode 'magit-popup - (setq truncate-lines t) - (setq buffer-read-only t) - (setq-local scroll-margin 0) - (setq-local magit-popup-show-common-commands magit-popup-show-common-commands) - (hack-dir-local-variables-non-file-buffer)) - -(put 'magit-popup-mode 'mode-class 'special) - -(defun magit-popup-default-setup (val def) - (if (--when-let (magit-popup-get :sequence-predicate) - (funcall it)) - (magit-popup-put :actions (magit-popup-convert-actions - val (magit-popup-get :sequence-actions))) - (let ((vars (plist-get def :variables))) - (when (functionp vars) - (setq vars (funcall vars))) - (when vars - (magit-popup-put :variables (magit-popup-convert-variables val vars)))) - (magit-popup-put :switches (magit-popup-convert-switches - val (plist-get def :switches))) - (magit-popup-put :options (magit-popup-convert-options - val (plist-get def :options))) - (magit-popup-put :actions (magit-popup-convert-actions - val (plist-get def :actions))))) - -(defun magit-popup-mode-setup (popup mode) - (setq magit-previous-popup magit-current-popup) - (let ((val (symbol-value (plist-get (symbol-value popup) :variable))) - (def (symbol-value popup)) - (buf (current-buffer))) - (magit-popup-mode-display-buffer (get-buffer-create - (format "*%s*" popup)) - (or mode 'magit-popup-mode)) - (setq magit-this-popup popup) - (setq magit-pre-popup-buffer buf) - (if (bound-and-true-p magit-popup-setup-hook) ; obsolete - (run-hook-with-args 'magit-popup-setup-hook val def) - (funcall (or (magit-popup-get :setup-function) - 'magit-popup-default-setup) - val def))) - (magit-refresh-popup-buffer) - (fit-window-to-buffer nil nil (line-number-at-pos (point-max)))) - -(defun magit-popup-mode-display-buffer (buffer mode) - (let ((winconf (current-window-configuration))) - (select-window (display-buffer buffer magit-popup-display-buffer-action)) - (funcall mode) - (setq magit-popup-previous-winconf winconf))) - -(defvar magit-refresh-popup-buffer-hook nil - "Hook run by `magit-refresh-popup-buffer'. - -The hook is run right after inserting the representation of the -popup events but before optionally inserting the representation -of events shared by all popups and before point is adjusted.") - -(defun magit-refresh-popup-buffer () - (let* ((inhibit-read-only t) - (button (button-at (point))) - (prefix (and button (button-get button 'prefix))) - (event (and button (button-get button 'event)))) - (erase-buffer) - (save-excursion - (--if-let (magit-popup-get :refresh-function) - (funcall it) - (magit-popup-insert-section 'magit-popup-variable-button) - (magit-popup-insert-section 'magit-popup-switch-button) - (magit-popup-insert-section 'magit-popup-option-button) - (magit-popup-insert-section 'magit-popup-action-button)) - (run-hooks 'magit-refresh-popup-buffer-hook) - (when magit-popup-show-common-commands - (magit-popup-insert-command-section - 'magit-popup-internal-command-button - magit-popup-common-commands))) - (set-buffer-modified-p nil) - (when event - (while (and (ignore-errors (forward-button 1)) - (let ((b (button-at (point)))) - (or (not (equal (button-get b 'prefix) prefix)) - (not (equal (button-get b 'event) event))))))))) - -;;; Draw - -(defvar magit-popup-min-padding 3 - "Minimal amount of whitespace between columns in popup buffers.") - -(defun magit-popup-insert-section (type &optional spec heading) - (if (not spec) - (progn (setq spec (magit-popup-get (button-type-get type 'property))) - (when spec - (if (or (stringp (car spec)) - (functionp (car spec))) - (--each (--partition-by-header - (or (stringp it) (functionp it)) - spec) - (magit-popup-insert-section type (cdr it) (car it))) - (magit-popup-insert-section type spec)))) - (let* ((formatter (button-type-get type 'formatter)) - (items (mapcar (lambda (ev) - (and ev (or (funcall formatter type ev) '("")))) - (or spec (magit-popup-get - (button-type-get type 'property))))) - (maxcols (button-type-get type 'maxcols)) - (pred (magit-popup-get :sequence-predicate))) - (when items - (if (functionp heading) - (when (setq heading (funcall heading)) - (insert heading ?\n)) - (unless heading - (setq heading (button-type-get type 'heading))) - (insert (propertize heading 'face 'magit-popup-heading)) - (unless (string-match "\n$" heading) - (insert "\n"))) - (if (and pred (funcall pred)) - (setq maxcols nil) - (cl-typecase maxcols - (keyword (setq maxcols (magit-popup-get maxcols))) - (symbol (setq maxcols (symbol-value maxcols))))) - (when (functionp maxcols) - (setq maxcols (funcall maxcols heading))) - (when heading - (let ((colwidth - (+ (apply 'max (mapcar (lambda (e) (length (car e))) items)) - magit-popup-min-padding))) - (dolist (item items) - (unless (bolp) - (let ((padding (- colwidth (% (current-column) colwidth)))) - (if (and (< (+ (current-column) padding colwidth) - (window-width)) - (< (ceiling (/ (current-column) (* colwidth 1.0))) - (or maxcols 1000))) - (insert (make-string padding ?\s)) - (insert "\n")))) - (unless (equal item '("")) - (if item - (apply 'insert-button item) - (insert ?\s))))) - (insert (if (= (char-before) ?\n) "\n" "\n\n"))))))) - -(defun magit-popup-format-argument-button (type ev) - (list (format-spec - (button-type-get type 'format) - `((?k . ,(propertize (concat - (--when-let (button-type-get type 'prefix) - (char-to-string it)) - (magit-popup-event-keydsc ev)) - 'face 'magit-popup-key)) - (?d . ,(magit-popup-event-dsc ev)) - (?a . ,(propertize (magit-popup-event-arg ev) - 'face (if (magit-popup-event-use ev) - 'magit-popup-argument - 'magit-popup-disabled-argument))) - (?v . ,(let ((val (magit-popup-event-val ev))) - (if (and (magit-popup-event-use ev) - (not (equal val ""))) - (propertize (format "\"%s\"" val) - 'face 'magit-popup-option-value) - ""))))) - 'type type 'event (magit-popup-event-key ev))) - -(defun magit-popup-format-variable-button (type ev) - (if (not (magit-popup-event-arg ev)) - (magit-popup-format-action-button 'magit-popup-action-button ev) - (list (format-spec - (button-type-get type 'format) - `((?k . ,(propertize (magit-popup-event-keydsc ev) - 'face 'magit-popup-key)) - (?d . ,(funcall (magit-popup-event-arg ev))))) - 'type type 'event (magit-popup-event-key ev)))) - -(defun magit-popup-format-action-button (type ev) - (let* ((cmd (magit-popup-event-fun ev)) - (dsc (magit-popup-event-dsc ev)) - (fun (and (functionp dsc) dsc))) - (unless (and disabled-command-function - (symbolp cmd) - (get cmd 'disabled)) - (when fun - (setq dsc - (-when-let (branch (funcall fun)) - (if (text-property-not-all 0 (length branch) 'face nil branch) - branch - (magit-branch-set-face branch))))) - (when dsc - (list (format-spec - (button-type-get type 'format) - `((?k . ,(propertize (magit-popup-event-keydsc ev) - 'face 'magit-popup-key)) - (?d . ,dsc) - (?D . ,(if (and (not fun) - (eq cmd (magit-popup-get :default-action))) - (propertize dsc 'face 'bold) - dsc)))) - 'type type 'event (magit-popup-event-key ev)))))) - -(defun magit-popup-insert-command-section (type spec) - (magit-popup-insert-section - type (mapcar (lambda (elt) - (list (car (where-is-internal (cadr elt) - (current-local-map))) - (car elt))) - spec))) - -(defun magit-popup-format-command-button (type elt) - (nconc (magit-popup-format-action-button - type (make-magit-popup-event :key (car elt) - :dsc (cadr elt))) - (list 'function (lookup-key (current-local-map) (car elt))))) - -;;; Utilities - -(defun magit-popup-import-file-args (args files) - (if files - (cons (concat "-- " (mapconcat #'identity files ",")) args) - args)) - -(defun magit-popup-export-file-args (args) - (let ((files (--first (string-prefix-p "-- " it) args))) - (when files - (setq args (remove files args)) - (setq files (split-string (substring files 3) ","))) - (list args files))) - -(defconst magit-popup-font-lock-keywords - (eval-when-compile - `((,(concat "(\\(magit-define-popup\\)\\_>" - "[ \t'\(]*" - "\\(\\(?:\\sw\\|\\s_\\)+\\)?") - (1 'font-lock-keyword-face) - (2 'font-lock-function-name-face nil t))))) - -(font-lock-add-keywords 'emacs-lisp-mode magit-popup-font-lock-keywords) - -;;; _ -(provide 'magit-popup) -;; Local Variables: -;; indent-tabs-mode: nil -;; End: -;;; magit-popup.el ends here diff --git a/elpa/magit-popup-20200102.1811/magit-popup.elc b/elpa/magit-popup-20200102.1811/magit-popup.elc deleted file mode 100644 index defe86ff..00000000 Binary files a/elpa/magit-popup-20200102.1811/magit-popup.elc and /dev/null differ diff --git a/elpa/magit-popup-20200102.1811/magit-popup.info b/elpa/magit-popup-20200102.1811/magit-popup.info deleted file mode 100644 index fa4f64a1..00000000 --- a/elpa/magit-popup-20200102.1811/magit-popup.info +++ /dev/null @@ -1,744 +0,0 @@ -This is magit-popup.info, produced by makeinfo version 6.5 from -magit-popup.texi. - - Copyright (C) 2015-2020 Jonas Bernoulli - - You can redistribute this document and/or modify it under the terms - of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) - any later version. - - This document is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Magit-Popup: (magit-popup). Infix arguments with feedback. -END-INFO-DIR-ENTRY - - -File: magit-popup.info, Node: Top, Next: Introduction, Up: (dir) - -Magit-Popup User Manual -*********************** - -This package implements a generic interface for toggling switches and -setting options and then invoking an Emacs command that does something -with these arguments. Usually the command calls an external process -with the specified arguments. - - This package has been superseded by Transient (*note -(transient)Top::). No new features will be added but bugs will be -fixes. - -This manual is for Magit-Popup version 2.13.2. - - Copyright (C) 2015-2020 Jonas Bernoulli - - You can redistribute this document and/or modify it under the terms - of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) - any later version. - - This document is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -* Menu: - -* Introduction:: -* Usage:: -* Defining Prefix and Suffix Commands:: - -— The Detailed Node Listing — - -Usage - -* Customizing Existing Popups:: -* Other Options:: - -Defining Prefix and Suffix Commands - -* Defining Prefix Commands:: -* Defining Suffix Commands:: - - - -File: magit-popup.info, Node: Introduction, Next: Usage, Prev: Top, Up: Top - -1 Introduction -************** - -Taking inspiration from regular prefix commands and prefix arguments, -this library implements a similar abstraction; a new kind of prefix -command that is associated with a specific set of infix arguments and -suffix commands. - - Invoking such a prefix command displays a popup buffer which lists -the associated infix arguments and suffix commands. In that buffer each -argument is prefixed with the key sequence that can be used to toggle it -or change its value. Likewise each suffix command is prefixed with the -key used to invoke it. Such a popup buffer might look like this: - - ,----------------------------------------- - |Switches - | -l Show graph (--graph) - | -d Show refnames (--decorate) - | - |Options - | =m Search messages (--grep="popup") - | =p Search patches (-G) - | - |Action - | l Show log for current branch - | o Show log for another branch - '----------------------------------------- - - The user could then for example type ‘-l’ to toggle the ‘--graph’ -*switch* (when it is on then it is shown in green, otherwise in gray), -or ‘=m’ to change the value of the *option* ‘--grep’. - - Once all arguments are as desired one invokes a suffix command, which -causes the popup buffer to disappear. The suffix command should then -retrieve the infix arguments in its ‘interactive’ form like this is done -for prefix arguments. - - While such "prefix-infix-suffix" combos were inspired by regular -prefix commands and prefix arguments, they are also quite different. -This should illustrate the most basic differences: - - • A regular prefix command - - /- command1 - prefix --- command2 - \- command3 - - • Prefix arguments - - /- command1 - C-u ... --- command2 - \- well any command - - • A Prefix-Infix-Suffix combo - - /- argument1 -\ /- suffix1 - prefix----- argument2 --+-- suffix2 - ^ \- argument3 -/ - | | - '--------' - (refresh buffer) - - This package has been superseded by Transient (*note -(transient)Top::). No new features will be added but bugs will be -fixes. - - -File: magit-popup.info, Node: Usage, Next: Defining Prefix and Suffix Commands, Prev: Introduction, Up: Top - -2 Usage -******* - -Every popup buffers created with a prefix command contains a section -named "Actions" listing the available suffix commands. Most buffers -also contain a "Switches" and/or an "Options" section which list the two -types of infix arguments separately. - - Switches are arguments that can be toggled on or off. When a switch -is active then it is shown in color, when it is off then it is shown in -gray (of course the details depend on the color theme in use). - - Options are arguments that have a value. When an option has a value -then that is shown after the option itself. Because for some options -the empty string is a valid value, options are additionally colorized -like switches to indicate whether they are active or not. - - The events bound to suffix commands are always single alphabetic -characters. The bindings for arguments are always two events long. For -switches the first key is always ‘-’, for options it is always ‘=’. The -second key is always an alphabetic character. - - By default popup buffers also feature a section listing commands -common to all popups. To avoid conflicts with suffix commands, the -bindings of these common commands are not alphabetic characters. This -section is shown by default so that documentation-resistant users get a -chance to notice them. - - -- User Option: magit-popup-show-common-commands - - This option controls whether the section that lists the commands - that are common to all popups is initially shown. - - By default this is not the case, but note that you can temporarily - show this section using ‘C-t’, which therefore is the only common - command you actually have to memorize. - -‘C-t’ (‘magit-popup-toggle-show-common-commands’) - - Show or hide the section listing the commands shared by all popups. - -‘C-g’ (‘magit-popup-quit’) - - Quit popup buffer without invoking a suffix command. - - Without further action, setting arguments only affects the next -suffix command. Invoking the same prefix command again resets the -arguments to their default value, but the defaults can be changed -directly from the popup buffer itself. For a prefix command named -‘NAME-popup’ the default values are stored as the value of the custom -option named ‘NAME-arguments’. While this option can be customized -using the Custom interface, it is better to do so directly from the -popup buffer. - -‘C-c C-c’ (‘magit-popup-set-default-arguments’) - - This sets the default value for the arguments for the current - popup. - - Then the popup buffer is closed without invoking a suffix command; - unless a prefix argument is used in which case the popup remains - open. - -‘C-x C-s’ (‘magit-popup-save-default-arguments’) - - This sets the default value for the arguments for the current popup - and saves it for future Emacs sessions. - - Then the popup buffer is closed without invoking an action; unless - a prefix argument is used in which case the popup remains open. - - It is also possible to add additional arguments and commands to an -existing popup, but that cannot be done directly from the popup (or the -Custom interface). See *note Customizing Existing Popups::. - - Documentation about a popup’s arguments and commands can be shown -directly from the popup. - -‘C-h i’ (‘magit-popup-info’) - - Show this manual. - -‘?’ (‘magit-popup-help’) - - This command reads a key sequence and then shows the documentation - of the argument or command that sequence is bound to. In other - words type the same keys that you would use to invoke the argument - or command, but prefix the sequence with ‘?’. - - For suffix commands this shows the doc-string. For arguments this - command can only show something for popups that have an associated - man-page. If the man-page is set, then this command displays it in - a separate buffer and puts point on the entry about the argument in - question. - - The buffer which is used to display the documentation is selected. - Simply press ‘q’ to leave that buffer and restore the old window - configuration. - - While it isn’t very useful, it is possible to move around in a popup -buffer using ‘C-p’ and ‘C-n’, and to invoke the argument or command at -point using ‘RET’. But it is much more efficient to use the dedicated -key bindings instead, so these commands are not listed in popup buffers -along with the other common commands. - -* Menu: - -* Customizing Existing Popups:: -* Other Options:: - - -File: magit-popup.info, Node: Customizing Existing Popups, Next: Other Options, Up: Usage - -2.1 Customizing Existing Popups -=============================== - -It is possible to define additional infix arguments and suffix commands -to an existing popup using the following functions. - - You can find some examples which use the below commands at -. - - -- Function: magit-define-popup-switch popup key desc switch &optional - enable at prepend - - In POPUP, define KEY as SWITCH. - - POPUP is a popup command defined using ‘magit-define-popup’. - SWITCH is a string representing an argument that takes no value. - KEY is a character representing the second event in the sequence of - keystrokes used to toggle the argument. (The first event, the - prefix, is shared among all switches, defaults to ‘-’, and can be - changed in ‘magit-popup-mode-keymap’). - - DESC is a string describing the purpose of the argument, it is - displayed in the popup. - - If optional ENABLE is non-nil then the switch is on by default. - - SWITCH is inserted after all other switches already defined for - POPUP, unless optional PREPEND is non-nil, in which case it is - placed first. If optional AT is non-nil then it should be the KEY - of another switch already defined for POPUP, the argument is then - placed before or after AT, depending on PREPEND. - - -- Function: magit-define-popup-option popup key desc option &optional - reader value at prepend - - In POPUP, define KEY as OPTION. - - POPUP is a popup command defined using ‘magit-define-popup’. - OPTION is a string representing an argument that takes a value. - KEY is a character representing the second event in the sequence of - keystrokes used to set the argument’s value. (The first event, the - prefix, is shared among all options, defaults to ‘=’, and can be - changed in ‘magit-popup-mode-keymap’). - - DESC is a string describing the purpose of the argument, it is - displayed in the popup. - - If optional VALUE is non-nil then the option is on by default, and - VALUE is its default value. - - READER is used to read a value from the user when the option is - invoked and does not currently have a value. (When the option has - a value, then invoking the option causes it to be unset.) This - function must take two arguments but may choose to ignore them. - The first argument is the name of the option (with ": \" appended, - unless it ends with "=") and can be used as the prompt. The second - argument is nil or the value that was in effect before the option - was unset, which may be suitable as initial completion input. If - no reader is specified, then ‘read-from-minibuffer’ is used. - - OPTION is inserted after all other options already defined for - POPUP, unless optional PREPEND is non-nil, in which case it is - placed first. If optional AT is non-nil then it should be the KEY - of another option already defined for POPUP, the argument is then - placed before or after AT, depending on PREPEND. - - -- Function: magit-define-popup-action popup key desc command &optional - at prepend - - In POPUP, define KEY as COMMAND. - - POPUP is a popup command defined using ‘magit-define-popup’. - COMMAND can be any command but should usually consume the popup - arguments in its ‘interactive’ form. KEY is a character - representing the event used invoke the action, i.e. to - interactively call the COMMAND. - - DESC is a string describing the purpose of the action, it is - displayed in the popup. - - COMMAND is inserted after all other commands already defined for - POPUP, unless optional PREPEND is non-nil, in which case it is - placed first. If optional AT is non-nil then it should be the KEY - of another command already defined for POPUP, the command is then - placed before or after AT, depending on PREPEND. - - -- Function: magit-define-popup-sequence-action popup key desc command - &optional at prepend - - Like ‘magit-define-popup-action’, but modifies the value of the - ‘:sequence-actions’ property instead of ‘:actions’. - - -- Function: magit-define-popup-variable popup key desc command - formatter &optional at prepend - - In POPUP, define KEY as COMMAND. - - POPUP is a popup command defined using ‘magit-define-popup’. - COMMAND is a command which calls ‘magit-popup-set-variable’. - FORMATTER is a function which calls ‘magit-popup-format-variable’. - These two functions have to be called with the same arguments. - - KEY is a character representing the event used interactively call - the COMMAND. - - DESC is the variable or a representation thereof. It’s not - actually used for anything. - - COMMAND is inserted after all other commands already defined for - POPUP, unless optional PREPEND is non-nil, in which case it is - placed first. If optional AT is non-nil then it should be the KEY - of another command already defined for POPUP, the command is then - placed before or after AT, depending on PREPEND." - - -- Function: magit-change-popup-key popup type from to - - In POPUP, bind TO to what FROM was bound to. TYPE is one of - ‘:action’, ‘:sequence-action’, ‘:switch’, or ‘:option’. Bind TO - and unbind FROM, both are characters. - - -- Function: magit-remove-popup-key popup type key - - In POPUP, remove KEY’s binding of TYPE. POPUP is a popup command - defined using ‘magit-define-popup’. TYPE is one of ‘:action’, - ‘:sequence-action’, ‘:switch’, or ‘:option’. KEY is the character - which is to be unbound. - - It is also possible to change other aspects of a popup by setting a -property using ‘plist-put’. See *note Defining Prefix Commands:: for -valid properties. The most likely change Magit users might want to make -is: - - (plist-put magit-show-refs-popup :use-prefix nil) - - -File: magit-popup.info, Node: Other Options, Prev: Customizing Existing Popups, Up: Usage - -2.2 Other Options -================= - - -- User Option: magit-popup-use-prefix-argument - - This option controls the effect that the use of a prefix argument - before entering a popup has. - - • ‘default’ - - With a prefix argument directly invoke the popup’s default - action (an Emacs command), instead of bringing up the popup. - - • ‘popup’ - - With a prefix argument bring up the popup, otherwise directly - invoke the popup’s default action. - - • ‘nil’ - - Ignore prefix arguments. - - This option can be overridden for individual popups. - ‘magit-show-refs-popup’ for example defaults to invoking the - default action directly. It only shows the popup buffer when a - prefix argument is used. See *note Customizing Existing Popups::. - - -- User Option: magit-popup-manpage-package - - The Emacs package used to display man-pages, one of ‘man’ or - ‘woman’. - - -- User Option: magit-popup-display-buffer-action - - The option controls how the window used to display a popup buffer - is created. Popup buffers are displayed using ‘display-buffer’ - with the value of this option as ACTION argument. You can also set - this to nil and instead add an entry to ‘display-buffer-alist’. - - To emphasize the default action by making it bold use this: - - (button-type-put 'magit-popup-action-button 'format " %k %D") - - -File: magit-popup.info, Node: Defining Prefix and Suffix Commands, Prev: Usage, Up: Top - -3 Defining Prefix and Suffix Commands -************************************* - -If you write an extension for Magit then you should use this library now -and later when ‘transient’ is released port to that. - - If you are considering using this library to define popups for -packages not related to Magit, then keep in mind that it will be -superseded eventually. Once ‘transient’ has been released I will only -fix bugs in ‘magit-popup’ but not implement any new features. - - Also consider using ‘hydra’ instead. To some extend ‘magit-popup’ -and ‘hydra’ are similar but have a different focus. The main purpose of -‘magit-popup’ is to pass infix arguments to suffix commands. If all you -need is a command dispatcher then you are better of using ‘hydra’. Of -course ‘hydra’ may also be a better fit not only because of the features -it lacks, but also because of the features it provides, which are in -turn missing from ‘magit-popup’. - - Here is an example of how one defines a prefix command along with its -infix arguments, and then also one of its suffix commands. - - ;;;###autoload (autoload 'magit-tag-popup "magit" nil t) - (magit-define-popup magit-tag-popup - "Show popup buffer featuring tagging commands." - 'magit-commands - :man-page "git-tag" - :switches '((?a "Annotate" "--annotate") - (?s "Sign" "--sign") - (?f "Force" "--force")) - :actions '((?t "Create" magit-tag) - (?k "Delete" magit-tag-delete) - (?p "Prune" magit-tag-prune)) - :default-action 'magit-tag) - - ;;;###autoload - (defun magit-tag (name rev &optional args) - "Create a new tag with the given NAME at REV." - (interactive (list (magit-read-tag "Tag name") - (magit-read-branch-or-commit "Place tag on") - (magit-tag-arguments))) - (magit-run-git-with-editor "tag" args name rev)) - -* Menu: - -* Defining Prefix Commands:: -* Defining Suffix Commands:: - - -File: magit-popup.info, Node: Defining Prefix Commands, Next: Defining Suffix Commands, Up: Defining Prefix and Suffix Commands - -3.1 Defining Prefix Commands -============================ - -Prefix commands and their infix arguments are defined using the macro -‘magit-define-popup’. The key bindings and descriptions of suffix -commands are also defined using that macro, but the actual interactive -commands have to be defined separately using plain ‘defun’. - - -- Macro: magit-define-popup name doc [group [mode [option]]] :keyword - value... - - This macro defines a popup named NAME. The NAME should begin with - the package prefix and by convention end with ‘-popup’, it is used - as the name of the command which shows the popup and for an - internal variable (whose value is used to store information about - the popup and should not be accessed directly). DOC is the - doc-string of the popup command. - - This macro also defines an option and a function both named - ‘SHORTNAME-arguments’, where SHORTNAME is NAME with the trailing - ‘-popup’ removed. The name of this option and this function can be - overwritten using the optional argument OPTION, but that is rarely - advisable. As a special case if OPTION is specified but ‘nil’, - then this option and this function are not defined at all, which is - useful for popups that are used as simple dispatchers that offer no - arguments. - - The option ‘SHORTNAME-arguments’ holds the value for the popup - arguments. It can be customized from within the popup or using the - Custom interface. It can also have a buffer local value in any - non-popup buffer. The local value for the buffer from which the - popup command was invoked, can be set from within the popup buffer. - - The function ‘SHORTNAME-arguments’ returns the currently effective - value of the variable by the same name. See below for more - information. - - Optional argument GROUP specifies the Custom group into which the - option is placed. If omitted then the option is placed into some - group the same way it is done when directly using ‘defcustom’ and - omitting the group, except when NAME begins with "magit-", in which - case the group ‘magit-git-arguments’ is used. - - The optional argument MODE specifies the mode used by the popup - buffer. If it is omitted or ‘nil’ then ‘magit-popup-mode’ is used. - - The remaining arguments should have the form ‘[KEYWORD VALUE]...’. - - The following keywords are meaningful (and by convention are - usually specified in that order): - - • ‘:actions’ - - The actions which can be invoked from the popup. VALUE is a - list whose members have the form (KEY DESC COMMAND), see - ‘magit-define-popup-action’ for details. - - Actions are regular Emacs commands, which usually have an - ‘interactive’ form setup to consume the values of the popup - ‘:switches’ and ‘:options’ when invoked from the corresponding - popup, else when invoked as the default action or directly - without using the popup, the default value of the variable - ‘SHORTNAME-arguments’. This is usually done by calling the - function ‘SHORTNAME-arguments’. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, - which is used as the heading, or nil, in which case the - section is not inserted. - - Members of VALUE may also be nil. This should only be used - together with ‘:max-action-columns’ and allows having gaps in - the action grit, which can help arranging actions sensibly. - - • ‘:default-action’ - - The default action of the popup which is used directly instead - of displaying the popup buffer, when the popup is invoked with - a prefix argument. Also see ‘magit-popup-use-prefix-argument’ - and ‘:use-prefix’, which can be used to inverse the meaning of - the prefix argument. - - • ‘:use-prefix’ - - Controls when to display the popup buffer and when to invoke - the default action (if any) directly. This overrides the - global default set using ‘magit-popup-use-prefix-argument’. - The value, if specified, should be one of ‘default’ or - ‘prefix’, or a function that is called with no arguments and - returns one of these symbols. - - • ‘:max-action-columns’ - - The maximum number of actions to display on a single line, a - number or a function that return a number and takes the name - of the section currently being inserted as argument. If there - isn’t enough room to display as many columns as specified - here, then fewer are used. - - • ‘:switches’ - - The popup arguments which can be toggled on and off. VALUE is - a list whose members have the form ‘(KEY DESC SWITCH)’, see - ‘magit-define-popup-switch’ for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, - which is used as the heading, or nil, in which case the - section is not inserted. - - • ‘:options’ - - The popup arguments which take a value, as in "–opt~OPTVAL". - VALUE is a list whose members have the form ‘(KEY DESC OPTION - READER)’, see ‘magit-define-popup-option’ for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, - which is used as the heading, or nil, in which case the - section is not inserted. - - • ‘:default-arguments’ - - The default arguments, a list of switches (which are then - enabled by default) and options with there default values, as - in ‘"--OPT=OPTVAL"’. - - • ‘:variables’ - - Variables which can be set from the popup. VALUE is a list - whose members have the form ‘(KEY DESC COMMAND FORMATTER)’, - see ‘magit-define-popup-variable’ for details. - - Members of VALUE may also be strings and functions, assuming - the first member is a string or function. In that case the - members are split into sections and these special elements are - used as headings. If such an element is a function then it is - called with no arguments and must return either a string, - which is used as the heading, or nil, in which case the - section is not inserted. - - Members of VALUE may also be actions as described above for - ‘:actions’. - - VALUE may also be a function that returns a list as describe - above. - - • ‘:sequence-predicate’ - - When this function returns non-nil, then the popup uses - ‘:sequence-actions’ instead of ‘:actions’, and does not show - the ‘:switches’ and ‘:options’. - - • ‘:sequence-actions’ - - The actions which can be invoked from the popup, when - ‘:sequence-predicate’ returns non-nil. - - • ‘:setup-function’ - - When this function is specified, then it is used instead of - ‘magit-popup-default-setup’. - - • ‘:refresh-function’ - - When this function is specified, then it is used instead of - calling ‘magit-popup-insert-section’ three times with symbols - ‘magit-popup-switch-button’, ‘magit-popup-option-button’, and - finally ‘magit-popup-action-button’ as argument. - - • ‘:man-page’ - - The name of the manpage to be displayed when the user requests - help for an argument. - - -File: magit-popup.info, Node: Defining Suffix Commands, Prev: Defining Prefix Commands, Up: Defining Prefix and Suffix Commands - -3.2 Defining Suffix Commands -============================ - -Commands intended to be invoked from a particular popup should determine -the currently effective arguments by calling the function -‘SHORTNAME-arguments’ inside their ‘interactive’ form. This function is -created by the ‘magit-define-popup’ macro. For a popup named -‘prefix-foo-popup’ the name of this function is ‘prefix-foo-arguments’. - - When the command was invoked as an action in the respective popup, -then this function returns the arguments that were set in the popup. -Otherwise when the command was invoked as the default of the popup (by -calling the popup command with a prefix argument), or without using the -popup command at all, then this function returns the buffer-local or -global value of the variable ‘SHORTNAME-arguments’. - - Internally arguments are handled as a list of strings. This might -not be appropriate for the intended use inside commands, or it might be -necessary to manipulate that list somehow, i.e. to split "–ARG=VAL" -into "–ARG""VAL". This should be done by advising or redefining the -function ‘SHORTNAME-arguments’. - - Internally ‘SHORNAME-arguments’ used following variables and -function. Except when redefining the former, you should not use these -directly. - - -- Variable: magit-current-popup - - The popup from which this editing command was invoked. - - -- Variable: magit-current-popup-args - - The value of the popup arguments for this editing command. - - If the current command was invoked from a popup, then this is a - list of strings of all the set switches and options. This includes - arguments which are set by default not only those explicitly set - during this invocation. - - When the value is nil, then that can be because no argument is set, - or because the current command wasn’t invoked from a popup at all. - - -- Function: magit-current-popup-args &rest args - - This function returns the value of the popup arguments for this - editing command. The value is the same as that of the variable by - the same name, except that FILTER is applied. FILTER is a list of - regexps; only arguments that match one of them are returned. The - first element of FILTER may also be ‘:not’ in which case only - arguments that don’t match any of the regexps are returned, or - ‘:only’ which doesn’t change the behavior. - - - -Tag Table: -Node: Top770 -Node: Introduction2139 -Node: Usage4478 -Node: Customizing Existing Popups9175 -Node: Other Options15316 -Node: Defining Prefix and Suffix Commands16859 -Node: Defining Prefix Commands19011 -Node: Defining Suffix Commands27706 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/request-20200127.21/request-pkg.el b/elpa/request-20200127.21/request-pkg.el deleted file mode 100644 index e375bf03..00000000 --- a/elpa/request-20200127.21/request-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "request" "20200127.21" "Compatible layer for URL request in Emacs" '((emacs "24.4")) :commit "431d14343c61bc51a86c9a9e1acb6c26fe9a6298" :authors '(("Takafumi Arakaki ")) :maintainer '("Takafumi Arakaki ") :url "https://github.com/tkf/emacs-request") diff --git a/elpa/request-20200127.21/request-autoloads.el b/elpa/request-20200219.2257/request-autoloads.el similarity index 100% rename from elpa/request-20200127.21/request-autoloads.el rename to elpa/request-20200219.2257/request-autoloads.el diff --git a/elpa/request-20200219.2257/request-pkg.el b/elpa/request-20200219.2257/request-pkg.el new file mode 100644 index 00000000..93875679 --- /dev/null +++ b/elpa/request-20200219.2257/request-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "request" "20200219.2257" "Compatible layer for URL request in Emacs" '((emacs "24.4")) :commit "216d570a58d05ef1307edb63d2539bafa5f688c6" :authors '(("Takafumi Arakaki ")) :maintainer '("Takafumi Arakaki ") :url "https://github.com/tkf/emacs-request") diff --git a/elpa/request-20200127.21/request.el b/elpa/request-20200219.2257/request.el similarity index 99% rename from elpa/request-20200127.21/request.el rename to elpa/request-20200219.2257/request.el index 170215d0..d6e9319a 100644 --- a/elpa/request-20200127.21/request.el +++ b/elpa/request-20200219.2257/request.el @@ -6,7 +6,7 @@ ;; Author: Takafumi Arakaki ;; URL: https://github.com/tkf/emacs-request -;; Package-Version: 20200127.21 +;; Package-Version: 20200219.2257 ;; Package-Requires: ((emacs "24.4")) ;; Version: 0.3.2 @@ -947,12 +947,14 @@ Currently it is used only for testing.") (default-value 'buffer-file-coding-system)) (select-safe-coding-system-accept-default-p (lambda (&rest _) t))) - (setf (default-value 'buffer-file-coding-system) 'no-conversion) - (with-temp-file tempfile - (setq-local buffer-file-coding-system encoding) - (insert data)) - (setf (default-value 'buffer-file-coding-system) - buffer-file-coding-system-orig)) + (unwind-protect + (progn + (setf (default-value 'buffer-file-coding-system) 'no-conversion) + (with-temp-file tempfile + (setq-local buffer-file-coding-system encoding) + (insert data))) + (setf (default-value 'buffer-file-coding-system) + buffer-file-coding-system-orig))) (list "--data-binary" (concat "@" (request-untrampify-filename tempfile))))) (when type (list "--request" type)) (cl-loop for (k . v) in headers diff --git a/elpa/request-20200127.21/request.elc b/elpa/request-20200219.2257/request.elc similarity index 96% rename from elpa/request-20200127.21/request.elc rename to elpa/request-20200219.2257/request.elc index 50e694b7..d80f470d 100644 Binary files a/elpa/request-20200127.21/request.elc and b/elpa/request-20200219.2257/request.elc differ diff --git a/elpa/slime-20200213.1710/contrib/README.md b/elpa/slime-20200219.2239/contrib/README.md similarity index 100% rename from elpa/slime-20200213.1710/contrib/README.md rename to elpa/slime-20200219.2239/contrib/README.md diff --git a/elpa/slime-20200213.1710/contrib/bridge.el b/elpa/slime-20200219.2239/contrib/bridge.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/bridge.el rename to elpa/slime-20200219.2239/contrib/bridge.el diff --git a/elpa/slime-20200213.1710/contrib/bridge.elc b/elpa/slime-20200219.2239/contrib/bridge.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/bridge.elc rename to elpa/slime-20200219.2239/contrib/bridge.elc index 5287fa84..69e522fb 100644 Binary files a/elpa/slime-20200213.1710/contrib/bridge.elc and b/elpa/slime-20200219.2239/contrib/bridge.elc differ diff --git a/elpa/slime-20200213.1710/contrib/inferior-slime.el b/elpa/slime-20200219.2239/contrib/inferior-slime.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/inferior-slime.el rename to elpa/slime-20200219.2239/contrib/inferior-slime.el diff --git a/elpa/slime-20200213.1710/contrib/inferior-slime.elc b/elpa/slime-20200219.2239/contrib/inferior-slime.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/inferior-slime.elc rename to elpa/slime-20200219.2239/contrib/inferior-slime.elc index 12d3b458..c4291f92 100644 Binary files a/elpa/slime-20200213.1710/contrib/inferior-slime.elc and b/elpa/slime-20200219.2239/contrib/inferior-slime.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-asdf.el b/elpa/slime-20200219.2239/contrib/slime-asdf.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-asdf.el rename to elpa/slime-20200219.2239/contrib/slime-asdf.el diff --git a/elpa/slime-20200213.1710/contrib/slime-asdf.elc b/elpa/slime-20200219.2239/contrib/slime-asdf.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-asdf.elc rename to elpa/slime-20200219.2239/contrib/slime-asdf.elc index 7ceb57c2..3a690ccf 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-asdf.elc and b/elpa/slime-20200219.2239/contrib/slime-asdf.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-autodoc.el b/elpa/slime-20200219.2239/contrib/slime-autodoc.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-autodoc.el rename to elpa/slime-20200219.2239/contrib/slime-autodoc.el diff --git a/elpa/slime-20200213.1710/contrib/slime-autodoc.elc b/elpa/slime-20200219.2239/contrib/slime-autodoc.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-autodoc.elc rename to elpa/slime-20200219.2239/contrib/slime-autodoc.elc index ee3482b2..8f85b055 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-autodoc.elc and b/elpa/slime-20200219.2239/contrib/slime-autodoc.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-banner.el b/elpa/slime-20200219.2239/contrib/slime-banner.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-banner.el rename to elpa/slime-20200219.2239/contrib/slime-banner.el diff --git a/elpa/slime-20200213.1710/contrib/slime-banner.elc b/elpa/slime-20200219.2239/contrib/slime-banner.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-banner.elc rename to elpa/slime-20200219.2239/contrib/slime-banner.elc index d952505a..3a78fd38 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-banner.elc and b/elpa/slime-20200219.2239/contrib/slime-banner.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-buffer-streams.el b/elpa/slime-20200219.2239/contrib/slime-buffer-streams.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-buffer-streams.el rename to elpa/slime-20200219.2239/contrib/slime-buffer-streams.el diff --git a/elpa/slime-20200213.1710/contrib/slime-buffer-streams.elc b/elpa/slime-20200219.2239/contrib/slime-buffer-streams.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-buffer-streams.elc rename to elpa/slime-20200219.2239/contrib/slime-buffer-streams.elc index 247f051f..8e75a6cb 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-buffer-streams.elc and b/elpa/slime-20200219.2239/contrib/slime-buffer-streams.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-c-p-c.el b/elpa/slime-20200219.2239/contrib/slime-c-p-c.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-c-p-c.el rename to elpa/slime-20200219.2239/contrib/slime-c-p-c.el diff --git a/elpa/slime-20200213.1710/contrib/slime-c-p-c.elc b/elpa/slime-20200219.2239/contrib/slime-c-p-c.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-c-p-c.elc rename to elpa/slime-20200219.2239/contrib/slime-c-p-c.elc index 8fc20ffa..2371dc95 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-c-p-c.elc and b/elpa/slime-20200219.2239/contrib/slime-c-p-c.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-cl-indent.el b/elpa/slime-20200219.2239/contrib/slime-cl-indent.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-cl-indent.el rename to elpa/slime-20200219.2239/contrib/slime-cl-indent.el diff --git a/elpa/slime-20200213.1710/contrib/slime-cl-indent.elc b/elpa/slime-20200219.2239/contrib/slime-cl-indent.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-cl-indent.elc rename to elpa/slime-20200219.2239/contrib/slime-cl-indent.elc index a2da12a5..fae1e644 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-cl-indent.elc and b/elpa/slime-20200219.2239/contrib/slime-cl-indent.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-clipboard.el b/elpa/slime-20200219.2239/contrib/slime-clipboard.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-clipboard.el rename to elpa/slime-20200219.2239/contrib/slime-clipboard.el diff --git a/elpa/slime-20200213.1710/contrib/slime-clipboard.elc b/elpa/slime-20200219.2239/contrib/slime-clipboard.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-clipboard.elc rename to elpa/slime-20200219.2239/contrib/slime-clipboard.elc index 00976f4c..58db7a83 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-clipboard.elc and b/elpa/slime-20200219.2239/contrib/slime-clipboard.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-compiler-notes-tree.el b/elpa/slime-20200219.2239/contrib/slime-compiler-notes-tree.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-compiler-notes-tree.el rename to elpa/slime-20200219.2239/contrib/slime-compiler-notes-tree.el diff --git a/elpa/slime-20200213.1710/contrib/slime-compiler-notes-tree.elc b/elpa/slime-20200219.2239/contrib/slime-compiler-notes-tree.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-compiler-notes-tree.elc rename to elpa/slime-20200219.2239/contrib/slime-compiler-notes-tree.elc index 130ae3ff..e1b38411 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-compiler-notes-tree.elc and b/elpa/slime-20200219.2239/contrib/slime-compiler-notes-tree.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-editing-commands.el b/elpa/slime-20200219.2239/contrib/slime-editing-commands.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-editing-commands.el rename to elpa/slime-20200219.2239/contrib/slime-editing-commands.el diff --git a/elpa/slime-20200213.1710/contrib/slime-editing-commands.elc b/elpa/slime-20200219.2239/contrib/slime-editing-commands.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-editing-commands.elc rename to elpa/slime-20200219.2239/contrib/slime-editing-commands.elc index 9c54fcaf..2a0bd29f 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-editing-commands.elc and b/elpa/slime-20200219.2239/contrib/slime-editing-commands.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-enclosing-context.el b/elpa/slime-20200219.2239/contrib/slime-enclosing-context.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-enclosing-context.el rename to elpa/slime-20200219.2239/contrib/slime-enclosing-context.el diff --git a/elpa/slime-20200213.1710/contrib/slime-enclosing-context.elc b/elpa/slime-20200219.2239/contrib/slime-enclosing-context.elc similarity index 94% rename from elpa/slime-20200213.1710/contrib/slime-enclosing-context.elc rename to elpa/slime-20200219.2239/contrib/slime-enclosing-context.elc index b521078f..17cdeb8b 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-enclosing-context.elc and b/elpa/slime-20200219.2239/contrib/slime-enclosing-context.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy-inspector.el b/elpa/slime-20200219.2239/contrib/slime-fancy-inspector.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-fancy-inspector.el rename to elpa/slime-20200219.2239/contrib/slime-fancy-inspector.el diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy-inspector.elc b/elpa/slime-20200219.2239/contrib/slime-fancy-inspector.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-fancy-inspector.elc rename to elpa/slime-20200219.2239/contrib/slime-fancy-inspector.elc index 6b3bed21..d0ce88ba 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-fancy-inspector.elc and b/elpa/slime-20200219.2239/contrib/slime-fancy-inspector.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy-trace.el b/elpa/slime-20200219.2239/contrib/slime-fancy-trace.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-fancy-trace.el rename to elpa/slime-20200219.2239/contrib/slime-fancy-trace.el diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy-trace.elc b/elpa/slime-20200219.2239/contrib/slime-fancy-trace.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-fancy-trace.elc rename to elpa/slime-20200219.2239/contrib/slime-fancy-trace.elc index 12ef28cc..396fad67 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-fancy-trace.elc and b/elpa/slime-20200219.2239/contrib/slime-fancy-trace.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy.el b/elpa/slime-20200219.2239/contrib/slime-fancy.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-fancy.el rename to elpa/slime-20200219.2239/contrib/slime-fancy.el diff --git a/elpa/slime-20200213.1710/contrib/slime-fancy.elc b/elpa/slime-20200219.2239/contrib/slime-fancy.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-fancy.elc rename to elpa/slime-20200219.2239/contrib/slime-fancy.elc index d6c0f7d4..a0666c5f 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-fancy.elc and b/elpa/slime-20200219.2239/contrib/slime-fancy.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-fontifying-fu.el b/elpa/slime-20200219.2239/contrib/slime-fontifying-fu.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-fontifying-fu.el rename to elpa/slime-20200219.2239/contrib/slime-fontifying-fu.el diff --git a/elpa/slime-20200213.1710/contrib/slime-fontifying-fu.elc b/elpa/slime-20200219.2239/contrib/slime-fontifying-fu.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-fontifying-fu.elc rename to elpa/slime-20200219.2239/contrib/slime-fontifying-fu.elc index 0f80eef8..204ea6a6 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-fontifying-fu.elc and b/elpa/slime-20200219.2239/contrib/slime-fontifying-fu.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-fuzzy.el b/elpa/slime-20200219.2239/contrib/slime-fuzzy.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-fuzzy.el rename to elpa/slime-20200219.2239/contrib/slime-fuzzy.el diff --git a/elpa/slime-20200213.1710/contrib/slime-fuzzy.elc b/elpa/slime-20200219.2239/contrib/slime-fuzzy.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-fuzzy.elc rename to elpa/slime-20200219.2239/contrib/slime-fuzzy.elc index 7ee43879..3a1e4620 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-fuzzy.elc and b/elpa/slime-20200219.2239/contrib/slime-fuzzy.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-highlight-edits.el b/elpa/slime-20200219.2239/contrib/slime-highlight-edits.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-highlight-edits.el rename to elpa/slime-20200219.2239/contrib/slime-highlight-edits.el diff --git a/elpa/slime-20200213.1710/contrib/slime-highlight-edits.elc b/elpa/slime-20200219.2239/contrib/slime-highlight-edits.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-highlight-edits.elc rename to elpa/slime-20200219.2239/contrib/slime-highlight-edits.elc index 95d4072e..8df537de 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-highlight-edits.elc and b/elpa/slime-20200219.2239/contrib/slime-highlight-edits.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-hyperdoc.el b/elpa/slime-20200219.2239/contrib/slime-hyperdoc.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-hyperdoc.el rename to elpa/slime-20200219.2239/contrib/slime-hyperdoc.el diff --git a/elpa/slime-20200213.1710/contrib/slime-hyperdoc.elc b/elpa/slime-20200219.2239/contrib/slime-hyperdoc.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-hyperdoc.elc rename to elpa/slime-20200219.2239/contrib/slime-hyperdoc.elc index f947d0d1..622d031f 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-hyperdoc.elc and b/elpa/slime-20200219.2239/contrib/slime-hyperdoc.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-indentation.el b/elpa/slime-20200219.2239/contrib/slime-indentation.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-indentation.el rename to elpa/slime-20200219.2239/contrib/slime-indentation.el diff --git a/elpa/slime-20200213.1710/contrib/slime-indentation.elc b/elpa/slime-20200219.2239/contrib/slime-indentation.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-indentation.elc rename to elpa/slime-20200219.2239/contrib/slime-indentation.elc index d5f889a2..5d502522 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-indentation.elc and b/elpa/slime-20200219.2239/contrib/slime-indentation.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-listener-hooks.el b/elpa/slime-20200219.2239/contrib/slime-listener-hooks.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-listener-hooks.el rename to elpa/slime-20200219.2239/contrib/slime-listener-hooks.el diff --git a/elpa/slime-20200213.1710/contrib/slime-listener-hooks.elc b/elpa/slime-20200219.2239/contrib/slime-listener-hooks.elc similarity index 97% rename from elpa/slime-20200213.1710/contrib/slime-listener-hooks.elc rename to elpa/slime-20200219.2239/contrib/slime-listener-hooks.elc index 4fe6b4d3..7f0d4a03 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-listener-hooks.elc and b/elpa/slime-20200219.2239/contrib/slime-listener-hooks.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-macrostep.el b/elpa/slime-20200219.2239/contrib/slime-macrostep.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-macrostep.el rename to elpa/slime-20200219.2239/contrib/slime-macrostep.el diff --git a/elpa/slime-20200213.1710/contrib/slime-macrostep.elc b/elpa/slime-20200219.2239/contrib/slime-macrostep.elc similarity index 71% rename from elpa/slime-20200213.1710/contrib/slime-macrostep.elc rename to elpa/slime-20200219.2239/contrib/slime-macrostep.elc index ab5cdac6..8815d902 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-macrostep.elc and b/elpa/slime-20200219.2239/contrib/slime-macrostep.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-mdot-fu.el b/elpa/slime-20200219.2239/contrib/slime-mdot-fu.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-mdot-fu.el rename to elpa/slime-20200219.2239/contrib/slime-mdot-fu.el diff --git a/elpa/slime-20200213.1710/contrib/slime-mdot-fu.elc b/elpa/slime-20200219.2239/contrib/slime-mdot-fu.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-mdot-fu.elc rename to elpa/slime-20200219.2239/contrib/slime-mdot-fu.elc index e13ea05b..41819ad3 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-mdot-fu.elc and b/elpa/slime-20200219.2239/contrib/slime-mdot-fu.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-media.el b/elpa/slime-20200219.2239/contrib/slime-media.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-media.el rename to elpa/slime-20200219.2239/contrib/slime-media.el diff --git a/elpa/slime-20200213.1710/contrib/slime-media.elc b/elpa/slime-20200219.2239/contrib/slime-media.elc similarity index 59% rename from elpa/slime-20200213.1710/contrib/slime-media.elc rename to elpa/slime-20200219.2239/contrib/slime-media.elc index 16087ad6..9dc0988f 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-media.elc and b/elpa/slime-20200219.2239/contrib/slime-media.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-mrepl.el b/elpa/slime-20200219.2239/contrib/slime-mrepl.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-mrepl.el rename to elpa/slime-20200219.2239/contrib/slime-mrepl.el diff --git a/elpa/slime-20200213.1710/contrib/slime-mrepl.elc b/elpa/slime-20200219.2239/contrib/slime-mrepl.elc similarity index 96% rename from elpa/slime-20200213.1710/contrib/slime-mrepl.elc rename to elpa/slime-20200219.2239/contrib/slime-mrepl.elc index 3d206a5d..2984b400 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-mrepl.elc and b/elpa/slime-20200219.2239/contrib/slime-mrepl.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-package-fu.el b/elpa/slime-20200219.2239/contrib/slime-package-fu.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-package-fu.el rename to elpa/slime-20200219.2239/contrib/slime-package-fu.el diff --git a/elpa/slime-20200213.1710/contrib/slime-package-fu.elc b/elpa/slime-20200219.2239/contrib/slime-package-fu.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-package-fu.elc rename to elpa/slime-20200219.2239/contrib/slime-package-fu.elc index e0164da2..f0b6d936 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-package-fu.elc and b/elpa/slime-20200219.2239/contrib/slime-package-fu.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-parse.el b/elpa/slime-20200219.2239/contrib/slime-parse.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-parse.el rename to elpa/slime-20200219.2239/contrib/slime-parse.el diff --git a/elpa/slime-20200213.1710/contrib/slime-parse.elc b/elpa/slime-20200219.2239/contrib/slime-parse.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-parse.elc rename to elpa/slime-20200219.2239/contrib/slime-parse.elc index c1047963..8d5cfc7a 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-parse.elc and b/elpa/slime-20200219.2239/contrib/slime-parse.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-presentation-streams.el b/elpa/slime-20200219.2239/contrib/slime-presentation-streams.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-presentation-streams.el rename to elpa/slime-20200219.2239/contrib/slime-presentation-streams.el diff --git a/elpa/slime-20200213.1710/contrib/slime-presentation-streams.elc b/elpa/slime-20200219.2239/contrib/slime-presentation-streams.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-presentation-streams.elc rename to elpa/slime-20200219.2239/contrib/slime-presentation-streams.elc index 4f82b7f5..9a79dc39 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-presentation-streams.elc and b/elpa/slime-20200219.2239/contrib/slime-presentation-streams.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-presentations.el b/elpa/slime-20200219.2239/contrib/slime-presentations.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-presentations.el rename to elpa/slime-20200219.2239/contrib/slime-presentations.el diff --git a/elpa/slime-20200213.1710/contrib/slime-presentations.elc b/elpa/slime-20200219.2239/contrib/slime-presentations.elc similarity index 91% rename from elpa/slime-20200213.1710/contrib/slime-presentations.elc rename to elpa/slime-20200219.2239/contrib/slime-presentations.elc index 8442f011..1f16c657 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-presentations.elc and b/elpa/slime-20200219.2239/contrib/slime-presentations.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-quicklisp.el b/elpa/slime-20200219.2239/contrib/slime-quicklisp.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-quicklisp.el rename to elpa/slime-20200219.2239/contrib/slime-quicklisp.el diff --git a/elpa/slime-20200213.1710/contrib/slime-quicklisp.elc b/elpa/slime-20200219.2239/contrib/slime-quicklisp.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-quicklisp.elc rename to elpa/slime-20200219.2239/contrib/slime-quicklisp.elc index 6e6b74ff..4389ddec 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-quicklisp.elc and b/elpa/slime-20200219.2239/contrib/slime-quicklisp.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-references.el b/elpa/slime-20200219.2239/contrib/slime-references.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-references.el rename to elpa/slime-20200219.2239/contrib/slime-references.el diff --git a/elpa/slime-20200213.1710/contrib/slime-references.elc b/elpa/slime-20200219.2239/contrib/slime-references.elc similarity index 72% rename from elpa/slime-20200213.1710/contrib/slime-references.elc rename to elpa/slime-20200219.2239/contrib/slime-references.elc index 2e3016fa..48301248 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-references.elc and b/elpa/slime-20200219.2239/contrib/slime-references.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-repl.el b/elpa/slime-20200219.2239/contrib/slime-repl.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-repl.el rename to elpa/slime-20200219.2239/contrib/slime-repl.el diff --git a/elpa/slime-20200213.1710/contrib/slime-repl.elc b/elpa/slime-20200219.2239/contrib/slime-repl.elc similarity index 92% rename from elpa/slime-20200213.1710/contrib/slime-repl.elc rename to elpa/slime-20200219.2239/contrib/slime-repl.elc index 6fd63da5..ab974ae6 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-repl.elc and b/elpa/slime-20200219.2239/contrib/slime-repl.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-sbcl-exts.el b/elpa/slime-20200219.2239/contrib/slime-sbcl-exts.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-sbcl-exts.el rename to elpa/slime-20200219.2239/contrib/slime-sbcl-exts.el diff --git a/elpa/slime-20200213.1710/contrib/slime-sbcl-exts.elc b/elpa/slime-20200219.2239/contrib/slime-sbcl-exts.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-sbcl-exts.elc rename to elpa/slime-20200219.2239/contrib/slime-sbcl-exts.elc index 477a7b1b..2fb9d28b 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-sbcl-exts.elc and b/elpa/slime-20200219.2239/contrib/slime-sbcl-exts.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-scheme.el b/elpa/slime-20200219.2239/contrib/slime-scheme.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-scheme.el rename to elpa/slime-20200219.2239/contrib/slime-scheme.el diff --git a/elpa/slime-20200213.1710/contrib/slime-scheme.elc b/elpa/slime-20200219.2239/contrib/slime-scheme.elc similarity index 97% rename from elpa/slime-20200213.1710/contrib/slime-scheme.elc rename to elpa/slime-20200219.2239/contrib/slime-scheme.elc index e254ea42..a2e83468 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-scheme.elc and b/elpa/slime-20200219.2239/contrib/slime-scheme.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-scratch.el b/elpa/slime-20200219.2239/contrib/slime-scratch.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-scratch.el rename to elpa/slime-20200219.2239/contrib/slime-scratch.el diff --git a/elpa/slime-20200213.1710/contrib/slime-scratch.elc b/elpa/slime-20200219.2239/contrib/slime-scratch.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-scratch.elc rename to elpa/slime-20200219.2239/contrib/slime-scratch.elc index f7e9fcab..c4cf51fe 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-scratch.elc and b/elpa/slime-20200219.2239/contrib/slime-scratch.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-snapshot.el b/elpa/slime-20200219.2239/contrib/slime-snapshot.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-snapshot.el rename to elpa/slime-20200219.2239/contrib/slime-snapshot.el diff --git a/elpa/slime-20200213.1710/contrib/slime-snapshot.elc b/elpa/slime-20200219.2239/contrib/slime-snapshot.elc similarity index 98% rename from elpa/slime-20200213.1710/contrib/slime-snapshot.elc rename to elpa/slime-20200219.2239/contrib/slime-snapshot.elc index f94e656b..338b6879 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-snapshot.elc and b/elpa/slime-20200219.2239/contrib/slime-snapshot.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-sprof.el b/elpa/slime-20200219.2239/contrib/slime-sprof.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-sprof.el rename to elpa/slime-20200219.2239/contrib/slime-sprof.el diff --git a/elpa/slime-20200213.1710/contrib/slime-sprof.elc b/elpa/slime-20200219.2239/contrib/slime-sprof.elc similarity index 95% rename from elpa/slime-20200213.1710/contrib/slime-sprof.elc rename to elpa/slime-20200219.2239/contrib/slime-sprof.elc index 0f2dbe3a..7003e817 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-sprof.elc and b/elpa/slime-20200219.2239/contrib/slime-sprof.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-trace-dialog.el b/elpa/slime-20200219.2239/contrib/slime-trace-dialog.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-trace-dialog.el rename to elpa/slime-20200219.2239/contrib/slime-trace-dialog.el diff --git a/elpa/slime-20200213.1710/contrib/slime-trace-dialog.elc b/elpa/slime-20200219.2239/contrib/slime-trace-dialog.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-trace-dialog.elc rename to elpa/slime-20200219.2239/contrib/slime-trace-dialog.elc index ec449ef0..cc60b97e 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-trace-dialog.elc and b/elpa/slime-20200219.2239/contrib/slime-trace-dialog.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-tramp.el b/elpa/slime-20200219.2239/contrib/slime-tramp.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-tramp.el rename to elpa/slime-20200219.2239/contrib/slime-tramp.el diff --git a/elpa/slime-20200213.1710/contrib/slime-tramp.elc b/elpa/slime-20200219.2239/contrib/slime-tramp.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-tramp.elc rename to elpa/slime-20200219.2239/contrib/slime-tramp.elc index 0140decf..b50e533a 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-tramp.elc and b/elpa/slime-20200219.2239/contrib/slime-tramp.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-typeout-frame.el b/elpa/slime-20200219.2239/contrib/slime-typeout-frame.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-typeout-frame.el rename to elpa/slime-20200219.2239/contrib/slime-typeout-frame.el diff --git a/elpa/slime-20200213.1710/contrib/slime-typeout-frame.elc b/elpa/slime-20200219.2239/contrib/slime-typeout-frame.elc similarity index 85% rename from elpa/slime-20200213.1710/contrib/slime-typeout-frame.elc rename to elpa/slime-20200219.2239/contrib/slime-typeout-frame.elc index 1f943b53..b9d23bb8 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-typeout-frame.elc and b/elpa/slime-20200219.2239/contrib/slime-typeout-frame.elc differ diff --git a/elpa/slime-20200213.1710/contrib/slime-xref-browser.el b/elpa/slime-20200219.2239/contrib/slime-xref-browser.el similarity index 100% rename from elpa/slime-20200213.1710/contrib/slime-xref-browser.el rename to elpa/slime-20200219.2239/contrib/slime-xref-browser.el diff --git a/elpa/slime-20200213.1710/contrib/slime-xref-browser.elc b/elpa/slime-20200219.2239/contrib/slime-xref-browser.elc similarity index 99% rename from elpa/slime-20200213.1710/contrib/slime-xref-browser.elc rename to elpa/slime-20200219.2239/contrib/slime-xref-browser.elc index 7337a5d4..29cf2a07 100644 Binary files a/elpa/slime-20200213.1710/contrib/slime-xref-browser.elc and b/elpa/slime-20200219.2239/contrib/slime-xref-browser.elc differ diff --git a/elpa/slime-20200213.1710/contrib/swank-arglists.lisp b/elpa/slime-20200219.2239/contrib/swank-arglists.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-arglists.lisp rename to elpa/slime-20200219.2239/contrib/swank-arglists.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-asdf.lisp b/elpa/slime-20200219.2239/contrib/swank-asdf.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-asdf.lisp rename to elpa/slime-20200219.2239/contrib/swank-asdf.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-buffer-streams.lisp b/elpa/slime-20200219.2239/contrib/swank-buffer-streams.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-buffer-streams.lisp rename to elpa/slime-20200219.2239/contrib/swank-buffer-streams.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-c-p-c.lisp b/elpa/slime-20200219.2239/contrib/swank-c-p-c.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-c-p-c.lisp rename to elpa/slime-20200219.2239/contrib/swank-c-p-c.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-clipboard.lisp b/elpa/slime-20200219.2239/contrib/swank-clipboard.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-clipboard.lisp rename to elpa/slime-20200219.2239/contrib/swank-clipboard.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-fancy-inspector.lisp b/elpa/slime-20200219.2239/contrib/swank-fancy-inspector.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-fancy-inspector.lisp rename to elpa/slime-20200219.2239/contrib/swank-fancy-inspector.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-fuzzy.lisp b/elpa/slime-20200219.2239/contrib/swank-fuzzy.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-fuzzy.lisp rename to elpa/slime-20200219.2239/contrib/swank-fuzzy.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-goo.goo b/elpa/slime-20200219.2239/contrib/swank-goo.goo similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-goo.goo rename to elpa/slime-20200219.2239/contrib/swank-goo.goo diff --git a/elpa/slime-20200213.1710/contrib/swank-hyperdoc.lisp b/elpa/slime-20200219.2239/contrib/swank-hyperdoc.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-hyperdoc.lisp rename to elpa/slime-20200219.2239/contrib/swank-hyperdoc.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-ikarus.ss b/elpa/slime-20200219.2239/contrib/swank-ikarus.ss similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-ikarus.ss rename to elpa/slime-20200219.2239/contrib/swank-ikarus.ss diff --git a/elpa/slime-20200213.1710/contrib/swank-indentation.lisp b/elpa/slime-20200219.2239/contrib/swank-indentation.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-indentation.lisp rename to elpa/slime-20200219.2239/contrib/swank-indentation.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-jolt.k b/elpa/slime-20200219.2239/contrib/swank-jolt.k similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-jolt.k rename to elpa/slime-20200219.2239/contrib/swank-jolt.k diff --git a/elpa/slime-20200213.1710/contrib/swank-kawa.scm b/elpa/slime-20200219.2239/contrib/swank-kawa.scm similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-kawa.scm rename to elpa/slime-20200219.2239/contrib/swank-kawa.scm diff --git a/elpa/slime-20200213.1710/contrib/swank-larceny.scm b/elpa/slime-20200219.2239/contrib/swank-larceny.scm similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-larceny.scm rename to elpa/slime-20200219.2239/contrib/swank-larceny.scm diff --git a/elpa/slime-20200213.1710/contrib/swank-listener-hooks.lisp b/elpa/slime-20200219.2239/contrib/swank-listener-hooks.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-listener-hooks.lisp rename to elpa/slime-20200219.2239/contrib/swank-listener-hooks.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-macrostep.lisp b/elpa/slime-20200219.2239/contrib/swank-macrostep.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-macrostep.lisp rename to elpa/slime-20200219.2239/contrib/swank-macrostep.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-media.lisp b/elpa/slime-20200219.2239/contrib/swank-media.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-media.lisp rename to elpa/slime-20200219.2239/contrib/swank-media.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-mit-scheme.scm b/elpa/slime-20200219.2239/contrib/swank-mit-scheme.scm similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-mit-scheme.scm rename to elpa/slime-20200219.2239/contrib/swank-mit-scheme.scm diff --git a/elpa/slime-20200213.1710/contrib/swank-mlworks.sml b/elpa/slime-20200219.2239/contrib/swank-mlworks.sml similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-mlworks.sml rename to elpa/slime-20200219.2239/contrib/swank-mlworks.sml diff --git a/elpa/slime-20200213.1710/contrib/swank-mrepl.lisp b/elpa/slime-20200219.2239/contrib/swank-mrepl.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-mrepl.lisp rename to elpa/slime-20200219.2239/contrib/swank-mrepl.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-package-fu.lisp b/elpa/slime-20200219.2239/contrib/swank-package-fu.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-package-fu.lisp rename to elpa/slime-20200219.2239/contrib/swank-package-fu.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-presentation-streams.lisp b/elpa/slime-20200219.2239/contrib/swank-presentation-streams.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-presentation-streams.lisp rename to elpa/slime-20200219.2239/contrib/swank-presentation-streams.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-presentations.lisp b/elpa/slime-20200219.2239/contrib/swank-presentations.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-presentations.lisp rename to elpa/slime-20200219.2239/contrib/swank-presentations.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-quicklisp.lisp b/elpa/slime-20200219.2239/contrib/swank-quicklisp.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-quicklisp.lisp rename to elpa/slime-20200219.2239/contrib/swank-quicklisp.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-r6rs.scm b/elpa/slime-20200219.2239/contrib/swank-r6rs.scm similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-r6rs.scm rename to elpa/slime-20200219.2239/contrib/swank-r6rs.scm diff --git a/elpa/slime-20200213.1710/contrib/swank-repl.lisp b/elpa/slime-20200219.2239/contrib/swank-repl.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-repl.lisp rename to elpa/slime-20200219.2239/contrib/swank-repl.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-sbcl-exts.lisp b/elpa/slime-20200219.2239/contrib/swank-sbcl-exts.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-sbcl-exts.lisp rename to elpa/slime-20200219.2239/contrib/swank-sbcl-exts.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-snapshot.lisp b/elpa/slime-20200219.2239/contrib/swank-snapshot.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-snapshot.lisp rename to elpa/slime-20200219.2239/contrib/swank-snapshot.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-sprof.lisp b/elpa/slime-20200219.2239/contrib/swank-sprof.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-sprof.lisp rename to elpa/slime-20200219.2239/contrib/swank-sprof.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-trace-dialog.lisp b/elpa/slime-20200219.2239/contrib/swank-trace-dialog.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-trace-dialog.lisp rename to elpa/slime-20200219.2239/contrib/swank-trace-dialog.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank-util.lisp b/elpa/slime-20200219.2239/contrib/swank-util.lisp similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank-util.lisp rename to elpa/slime-20200219.2239/contrib/swank-util.lisp diff --git a/elpa/slime-20200213.1710/contrib/swank.rb b/elpa/slime-20200219.2239/contrib/swank.rb similarity index 100% rename from elpa/slime-20200213.1710/contrib/swank.rb rename to elpa/slime-20200219.2239/contrib/swank.rb diff --git a/elpa/slime-20200213.1710/dir b/elpa/slime-20200219.2239/dir similarity index 100% rename from elpa/slime-20200213.1710/dir rename to elpa/slime-20200219.2239/dir diff --git a/elpa/slime-20200213.1710/lib/hyperspec.el b/elpa/slime-20200219.2239/lib/hyperspec.el similarity index 100% rename from elpa/slime-20200213.1710/lib/hyperspec.el rename to elpa/slime-20200219.2239/lib/hyperspec.el diff --git a/elpa/slime-20200213.1710/lib/hyperspec.elc b/elpa/slime-20200219.2239/lib/hyperspec.elc similarity index 99% rename from elpa/slime-20200213.1710/lib/hyperspec.elc rename to elpa/slime-20200219.2239/lib/hyperspec.elc index e3e93e3a..bcc12f65 100644 Binary files a/elpa/slime-20200213.1710/lib/hyperspec.elc and b/elpa/slime-20200219.2239/lib/hyperspec.elc differ diff --git a/elpa/slime-20200213.1710/metering.lisp b/elpa/slime-20200219.2239/metering.lisp similarity index 100% rename from elpa/slime-20200213.1710/metering.lisp rename to elpa/slime-20200219.2239/metering.lisp diff --git a/elpa/slime-20200213.1710/nregex.lisp b/elpa/slime-20200219.2239/nregex.lisp similarity index 100% rename from elpa/slime-20200213.1710/nregex.lisp rename to elpa/slime-20200219.2239/nregex.lisp diff --git a/elpa/slime-20200213.1710/packages.lisp b/elpa/slime-20200219.2239/packages.lisp similarity index 100% rename from elpa/slime-20200213.1710/packages.lisp rename to elpa/slime-20200219.2239/packages.lisp diff --git a/elpa/slime-20200213.1710/sbcl-pprint-patch.lisp b/elpa/slime-20200219.2239/sbcl-pprint-patch.lisp similarity index 100% rename from elpa/slime-20200213.1710/sbcl-pprint-patch.lisp rename to elpa/slime-20200219.2239/sbcl-pprint-patch.lisp diff --git a/elpa/slime-20200213.1710/slime-autoloads.el b/elpa/slime-20200219.2239/slime-autoloads.el similarity index 100% rename from elpa/slime-20200213.1710/slime-autoloads.el rename to elpa/slime-20200219.2239/slime-autoloads.el diff --git a/elpa/slime-20200213.1710/slime-pkg.el b/elpa/slime-20200219.2239/slime-pkg.el similarity index 75% rename from elpa/slime-20200213.1710/slime-pkg.el rename to elpa/slime-20200219.2239/slime-pkg.el index acc6d53d..2c7a4160 100644 --- a/elpa/slime-20200213.1710/slime-pkg.el +++ b/elpa/slime-20200219.2239/slime-pkg.el @@ -1,4 +1,4 @@ -(define-package "slime" "20200213.1710" "Superior Lisp Interaction Mode for Emacs" +(define-package "slime" "20200219.2239" "Superior Lisp Interaction Mode for Emacs" '((cl-lib "0.5") (macrostep "0.9")) :keywords diff --git a/elpa/slime-20200213.1710/slime-tests.el b/elpa/slime-20200219.2239/slime-tests.el similarity index 100% rename from elpa/slime-20200213.1710/slime-tests.el rename to elpa/slime-20200219.2239/slime-tests.el diff --git a/elpa/slime-20200213.1710/slime-tests.elc b/elpa/slime-20200219.2239/slime-tests.elc similarity index 98% rename from elpa/slime-20200213.1710/slime-tests.elc rename to elpa/slime-20200219.2239/slime-tests.elc index 55001ee6..1e1e47b3 100644 Binary files a/elpa/slime-20200213.1710/slime-tests.elc and b/elpa/slime-20200219.2239/slime-tests.elc differ diff --git a/elpa/slime-20200213.1710/slime.el b/elpa/slime-20200219.2239/slime.el similarity index 100% rename from elpa/slime-20200213.1710/slime.el rename to elpa/slime-20200219.2239/slime.el diff --git a/elpa/slime-20200213.1710/slime.elc b/elpa/slime-20200219.2239/slime.elc similarity index 87% rename from elpa/slime-20200213.1710/slime.elc rename to elpa/slime-20200219.2239/slime.elc index 99b87796..efd1d401 100644 Binary files a/elpa/slime-20200213.1710/slime.elc and b/elpa/slime-20200219.2239/slime.elc differ diff --git a/elpa/slime-20200213.1710/slime.info b/elpa/slime-20200219.2239/slime.info similarity index 99% rename from elpa/slime-20200213.1710/slime.info rename to elpa/slime-20200219.2239/slime.info index 94ae7ba0..6d61fb09 100644 --- a/elpa/slime-20200213.1710/slime.info +++ b/elpa/slime-20200219.2239/slime.info @@ -15,7 +15,7 @@ SLIME ***** SLIME is the “Superior Lisp Interaction Mode for Emacs”. This is the -manual for version 2.24. (Last updated February 14, 2020) +manual for version 2.24. (Last updated February 20, 2020) Written by Luke Gorrie and others. diff --git a/elpa/slime-20200213.1710/start-swank.lisp b/elpa/slime-20200219.2239/start-swank.lisp similarity index 100% rename from elpa/slime-20200213.1710/start-swank.lisp rename to elpa/slime-20200219.2239/start-swank.lisp diff --git a/elpa/slime-20200213.1710/swank-loader.lisp b/elpa/slime-20200219.2239/swank-loader.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank-loader.lisp rename to elpa/slime-20200219.2239/swank-loader.lisp diff --git a/elpa/slime-20200213.1710/swank.asd b/elpa/slime-20200219.2239/swank.asd similarity index 100% rename from elpa/slime-20200213.1710/swank.asd rename to elpa/slime-20200219.2239/swank.asd diff --git a/elpa/slime-20200213.1710/swank.lisp b/elpa/slime-20200219.2239/swank.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank.lisp rename to elpa/slime-20200219.2239/swank.lisp diff --git a/elpa/slime-20200213.1710/swank/abcl.lisp b/elpa/slime-20200219.2239/swank/abcl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/abcl.lisp rename to elpa/slime-20200219.2239/swank/abcl.lisp diff --git a/elpa/slime-20200213.1710/swank/allegro.lisp b/elpa/slime-20200219.2239/swank/allegro.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/allegro.lisp rename to elpa/slime-20200219.2239/swank/allegro.lisp diff --git a/elpa/slime-20200213.1710/swank/backend.lisp b/elpa/slime-20200219.2239/swank/backend.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/backend.lisp rename to elpa/slime-20200219.2239/swank/backend.lisp diff --git a/elpa/slime-20200213.1710/swank/ccl.lisp b/elpa/slime-20200219.2239/swank/ccl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/ccl.lisp rename to elpa/slime-20200219.2239/swank/ccl.lisp diff --git a/elpa/slime-20200213.1710/swank/clasp.lisp b/elpa/slime-20200219.2239/swank/clasp.lisp similarity index 99% rename from elpa/slime-20200213.1710/swank/clasp.lisp rename to elpa/slime-20200219.2239/swank/clasp.lisp index feeada27..c9bc1796 100644 --- a/elpa/slime-20200213.1710/swank/clasp.lisp +++ b/elpa/slime-20200219.2239/swank/clasp.lisp @@ -515,7 +515,7 @@ (defimplementation frame-source-location (frame-number) (let* ((address (core::backtrace-frame-return-address (elt *backtrace* frame-number))) (code-source-location (ext::code-source-position address))) - (format t "code-source-location ~s~%" code-source-location) + (format t "address: ~a code-source-location ~s~%" address code-source-location) ;; (core::source-info-backtrace *backtrace*) (if (ext::code-source-line-source-pathname code-source-location) (make-location (list :file (namestring (ext::code-source-line-source-pathname code-source-location))) @@ -707,7 +707,7 @@ "STOPPED")) (defimplementation make-lock (&key name) - (mp:make-lock :name name :recursive t)) + (mp:make-lock :name name)) (defimplementation call-with-lock-held (lock function) (declare (type function function)) diff --git a/elpa/slime-20200213.1710/swank/clisp.lisp b/elpa/slime-20200219.2239/swank/clisp.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/clisp.lisp rename to elpa/slime-20200219.2239/swank/clisp.lisp diff --git a/elpa/slime-20200213.1710/swank/cmucl.lisp b/elpa/slime-20200219.2239/swank/cmucl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/cmucl.lisp rename to elpa/slime-20200219.2239/swank/cmucl.lisp diff --git a/elpa/slime-20200213.1710/swank/corman.lisp b/elpa/slime-20200219.2239/swank/corman.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/corman.lisp rename to elpa/slime-20200219.2239/swank/corman.lisp diff --git a/elpa/slime-20200213.1710/swank/ecl.lisp b/elpa/slime-20200219.2239/swank/ecl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/ecl.lisp rename to elpa/slime-20200219.2239/swank/ecl.lisp diff --git a/elpa/slime-20200213.1710/swank/gray.lisp b/elpa/slime-20200219.2239/swank/gray.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/gray.lisp rename to elpa/slime-20200219.2239/swank/gray.lisp diff --git a/elpa/slime-20200213.1710/swank/lispworks.lisp b/elpa/slime-20200219.2239/swank/lispworks.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/lispworks.lisp rename to elpa/slime-20200219.2239/swank/lispworks.lisp diff --git a/elpa/slime-20200213.1710/swank/match.lisp b/elpa/slime-20200219.2239/swank/match.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/match.lisp rename to elpa/slime-20200219.2239/swank/match.lisp diff --git a/elpa/slime-20200213.1710/swank/mezzano.lisp b/elpa/slime-20200219.2239/swank/mezzano.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/mezzano.lisp rename to elpa/slime-20200219.2239/swank/mezzano.lisp diff --git a/elpa/slime-20200213.1710/swank/mkcl.lisp b/elpa/slime-20200219.2239/swank/mkcl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/mkcl.lisp rename to elpa/slime-20200219.2239/swank/mkcl.lisp diff --git a/elpa/slime-20200213.1710/swank/rpc.lisp b/elpa/slime-20200219.2239/swank/rpc.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/rpc.lisp rename to elpa/slime-20200219.2239/swank/rpc.lisp diff --git a/elpa/slime-20200213.1710/swank/sbcl.lisp b/elpa/slime-20200219.2239/swank/sbcl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/sbcl.lisp rename to elpa/slime-20200219.2239/swank/sbcl.lisp diff --git a/elpa/slime-20200213.1710/swank/scl.lisp b/elpa/slime-20200219.2239/swank/scl.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/scl.lisp rename to elpa/slime-20200219.2239/swank/scl.lisp diff --git a/elpa/slime-20200213.1710/swank/source-file-cache.lisp b/elpa/slime-20200219.2239/swank/source-file-cache.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/source-file-cache.lisp rename to elpa/slime-20200219.2239/swank/source-file-cache.lisp diff --git a/elpa/slime-20200213.1710/swank/source-path-parser.lisp b/elpa/slime-20200219.2239/swank/source-path-parser.lisp similarity index 100% rename from elpa/slime-20200213.1710/swank/source-path-parser.lisp rename to elpa/slime-20200219.2239/swank/source-path-parser.lisp diff --git a/elpa/slime-20200213.1710/xref.lisp b/elpa/slime-20200219.2239/xref.lisp similarity index 100% rename from elpa/slime-20200213.1710/xref.lisp rename to elpa/slime-20200219.2239/xref.lisp diff --git a/elpa/transient-20200125.1308/dir b/elpa/transient-20200219.2113/dir similarity index 100% rename from elpa/transient-20200125.1308/dir rename to elpa/transient-20200219.2113/dir diff --git a/elpa/transient-20200125.1308/transient-autoloads.el b/elpa/transient-20200219.2113/transient-autoloads.el similarity index 100% rename from elpa/transient-20200125.1308/transient-autoloads.el rename to elpa/transient-20200219.2113/transient-autoloads.el diff --git a/elpa/transient-20200125.1308/transient-pkg.el b/elpa/transient-20200219.2113/transient-pkg.el similarity index 80% rename from elpa/transient-20200125.1308/transient-pkg.el rename to elpa/transient-20200219.2113/transient-pkg.el index ed112f14..15a51ed0 100644 --- a/elpa/transient-20200125.1308/transient-pkg.el +++ b/elpa/transient-20200219.2113/transient-pkg.el @@ -1,4 +1,4 @@ -(define-package "transient" "20200125.1308" "Transient commands" +(define-package "transient" "20200219.2113" "Transient commands" '((emacs "25.1")) :keywords '("bindings") diff --git a/elpa/transient-20200125.1308/transient.el b/elpa/transient-20200219.2113/transient.el similarity index 99% rename from elpa/transient-20200125.1308/transient.el rename to elpa/transient-20200219.2113/transient.el index f816a202..54ff80d6 100644 --- a/elpa/transient-20200125.1308/transient.el +++ b/elpa/transient-20200219.2113/transient.el @@ -141,7 +141,7 @@ want to change the value of `transient-mode-line-format'." :type '(cons (choice function (repeat :tag "Functions" function)) alist)) -(defcustom transient-mode-line-format (and window-system 'line) +(defcustom transient-mode-line-format 'line "The mode-line format for the transient popup buffer. If nil, then the buffer has no mode-line. If the buffer is not @@ -150,7 +150,8 @@ a good value. If `line' (the default), then the buffer also has no mode-line, but a thin line is drawn instead, using the background color of -the face `transient-separator'. +the face `transient-separator'. Termcap frames cannot display +thin lines and therefore fallback to treating `line' like nil. Otherwise this can be any mode-line format. See `mode-line-format' for details." @@ -2116,15 +2117,17 @@ Non-infix suffix commands usually don't have a value." nil) (cl-defmethod transient-init-value ((obj transient-prefix)) - (oset obj value - (if-let ((saved (assq (oref obj command) transient-values))) - (cdr saved) - (if-let ((default (and (slot-boundp obj 'default-value) - (oref obj default-value)))) - (if (functionp default) - (funcall default) - default) - nil)))) + (if (slot-boundp obj 'value) + (oref obj value) + (oset obj value + (if-let ((saved (assq (oref obj command) transient-values))) + (cdr saved) + (if-let ((default (and (slot-boundp obj 'default-value) + (oref obj default-value)))) + (if (functionp default) + (funcall default) + default) + nil))))) (cl-defmethod transient-init-value ((obj transient-switch)) (oset obj value @@ -2541,7 +2544,8 @@ have a history of their own.") (transient--insert-groups) (when (or transient--helpp transient--editp) (transient--insert-help)) - (when (eq transient-mode-line-format 'line) + (when (and (eq transient-mode-line-format 'line) + window-system) (insert (propertize "__" 'face 'transient-separator 'display '(space :height (1)))) (insert (propertize "\n" 'face 'transient-separator 'line-height t))) diff --git a/elpa/transient-20200125.1308/transient.elc b/elpa/transient-20200219.2113/transient.elc similarity index 86% rename from elpa/transient-20200125.1308/transient.elc rename to elpa/transient-20200219.2113/transient.elc index f13f9a76..1cd149c9 100644 Binary files a/elpa/transient-20200125.1308/transient.elc and b/elpa/transient-20200219.2113/transient.elc differ diff --git a/elpa/transient-20200125.1308/transient.info b/elpa/transient-20200219.2113/transient.info similarity index 98% rename from elpa/transient-20200125.1308/transient.info rename to elpa/transient-20200219.2113/transient.info index 70ec12a9..fde56c44 100644 --- a/elpa/transient-20200125.1308/transient.info +++ b/elpa/transient-20200219.2113/transient.info @@ -44,7 +44,7 @@ reading a new value in the minibuffer. Calling a suffix command usually causes the transient to be exited but suffix commands can also be configured to not exit the transient. -This manual is for Transient version 0.1.0 (v0.1.0-134-g83cb1e4+1). +This manual is for Transient version 0.1.0 (v0.1.0-141-g5c0f901+1). Copyright (C) 2018-2020 Jonas Bernoulli @@ -672,7 +672,8 @@ File: transient.info, Node: Other Options, Next: Modifying Existing Transients If ‘line’ (the default), then the buffer also has no mode-line, but a thin line is drawn instead, using the background color of the - face ‘transient-separator’. + face ‘transient-separator’. Termcap frames cannot display thin + lines and therefore fallback to treating ‘line’ like ‘nil’. Otherwise this can be any mode-line format. See *note (elisp)Mode Line Format:: for details. @@ -2370,21 +2371,21 @@ Appendix E Variable Index (line 32) * transient-default-level: Enabling and Disabling Suffixes. (line 38) -* transient-detect-key-conflicts: Other Options. (line 136) +* transient-detect-key-conflicts: Other Options. (line 137) * transient-display-buffer-action: Other Options. (line 46) * transient-enable-popup-navigation: Other Options. (line 28) -* transient-force-fixed-pitch: Other Options. (line 150) -* transient-highlight-mismatched-keys: Other Options. (line 95) +* transient-force-fixed-pitch: Other Options. (line 151) +* transient-highlight-mismatched-keys: Other Options. (line 96) * transient-history-file: Using History. (line 33) * transient-history-limit: Using History. (line 38) * transient-levels-file: Enabling and Disabling Suffixes. (line 44) * transient-mode-line-format: Other Options. (line 71) -* transient-read-with-initial-input: Other Options. (line 87) +* transient-read-with-initial-input: Other Options. (line 88) * transient-show-common-commands: Common Suffix Commands. (line 23) * transient-show-popup: Other Options. (line 6) -* transient-substitute-key-function: Other Options. (line 114) +* transient-substitute-key-function: Other Options. (line 115) * transient-values-file: Saving Values. (line 30) @@ -2403,34 +2404,34 @@ Node: Getting Help for Suffix Commands18310 Node: Enabling and Disabling Suffixes19703 Node: Other Commands22993 Node: Other Options23949 -Node: Modifying Existing Transients30960 -Node: Defining New Commands34364 -Node: Defining Transients34700 -Node: Binding Suffix and Infix Commands37132 -Node: Group Specifications37987 -Node: Suffix Specifications41320 -Node: Defining Suffix and Infix Commands44887 -Node: Using Infix Arguments48072 -Node: Transient State50292 -Node: Classes and Methods56165 -Node: Group Classes58379 -Node: Group Methods60296 -Node: Prefix Classes60941 -Node: Suffix Classes62033 -Node: Suffix Methods64277 -Node: Suffix Value Methods64598 -Node: Suffix Format Methods67358 -Node: Prefix Slots68810 -Node: Suffix Slots71287 -Node: Predicate Slots74138 -Node: Related Abstractions and Packages75386 -Node: Comparison With Prefix Keys and Prefix Arguments75673 -Node: Comparison With Other Packages85985 -Node: FAQ90176 -Node: Keystroke Index93910 -Node: Command Index95544 -Node: Function Index97331 -Node: Variable Index101488 +Node: Modifying Existing Transients31069 +Node: Defining New Commands34473 +Node: Defining Transients34809 +Node: Binding Suffix and Infix Commands37241 +Node: Group Specifications38096 +Node: Suffix Specifications41429 +Node: Defining Suffix and Infix Commands44996 +Node: Using Infix Arguments48181 +Node: Transient State50401 +Node: Classes and Methods56274 +Node: Group Classes58488 +Node: Group Methods60405 +Node: Prefix Classes61050 +Node: Suffix Classes62142 +Node: Suffix Methods64386 +Node: Suffix Value Methods64707 +Node: Suffix Format Methods67467 +Node: Prefix Slots68919 +Node: Suffix Slots71396 +Node: Predicate Slots74247 +Node: Related Abstractions and Packages75495 +Node: Comparison With Prefix Keys and Prefix Arguments75782 +Node: Comparison With Other Packages86094 +Node: FAQ90285 +Node: Keystroke Index94019 +Node: Command Index95653 +Node: Function Index97440 +Node: Variable Index101597  End Tag Table