[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 5183123: Add Tramp recompilation
From: |
Basil L. Contovounesios |
Subject: |
Re: master 5183123: Add Tramp recompilation |
Date: |
Fri, 23 Apr 2021 17:23:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael.Albinus@gmx.de (Michael Albinus) writes:
> diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
> index d208f0e..6342cf5 100644
> --- a/lisp/net/tramp-cmds.el
> +++ b/lisp/net/tramp-cmds.el
> @@ -472,6 +472,48 @@ For details, see `tramp-rename-files'."
> (function-put
> #'tramp-rename-these-files 'completion-predicate
> #'tramp-command-completion-p)
>
> +;; This function takes action since Emacs 28.1, when
> +;; `read-extended-command-predicate' is set to
> +;; `command-completion-default-include-p'.
> +;;;###tramp-autoload
> +(defun tramp-recompile-elpa-command-completion-p (_symbol _buffer)
> + "A predicate for `tramp-recompile-elpa'.
> +It is completed by \"M-x TAB\" only if package.el is loaded, and
> +Tramp is an installed ELPA package."
> + ;; We cannot apply `package-installed-p', this would also return the
> + ;; builtin package.
> + (tramp-compat-funcall 'package--user-installed-p 'tramp))
It looks like package--user-installed-p isn't currently designed to be
used in this way:
0. emacs -Q
1. (progn
(require 'package)
(require 'tramp)
(setq read-extended-command-predicate
#'command-completion-default-include-p)
(read-extended-command))
2. C-j C-i
Debugger entered--Lisp error: (wrong-type-argument package-desc nil)
signal(wrong-type-argument (package-desc nil))
package--user-installed-p(tramp)
tramp-recompile-elpa-command-completion-p(tramp-recompile-elpa
#<buffer *scratch*>)
command-completion-default-include-p(tramp-recompile-elpa
#<buffer *scratch*>)
Should package--user-installed-p simply guard against a nil package
descriptor?
Thanks,
--
Basil
- Re: master 5183123: Add Tramp recompilation,
Basil L. Contovounesios <=
Re: master 5183123: Add Tramp recompilation, Michael Albinus, 2021/04/23