From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: master 5183123: Add Tramp recompilation Date: Fri, 23 Apr 2021 17:23:13 +0100 Message-ID: <878s59m0lq.fsf@tcd.ie> References: <20210419095256.30298.23862@vcs0.savannah.gnu.org> <20210419095259.0651220FD4@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32478"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 23 18:24:09 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZybB-0008Bf-Rj for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Apr 2021 18:24:09 +0200 Original-Received: from localhost ([::1]:53502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZybA-0000vl-W2 for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Apr 2021 12:24:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZyaP-0000UV-0Q for emacs-devel@gnu.org; Fri, 23 Apr 2021 12:23:21 -0400 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:51914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZyaM-0003dJ-9C for emacs-devel@gnu.org; Fri, 23 Apr 2021 12:23:20 -0400 Original-Received: by mail-wm1-x32f.google.com with SMTP id z6so8532587wmg.1 for ; Fri, 23 Apr 2021 09:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZoAVSFMt2kdoK3c37Bd7IIt997cYV/XwpPRan7aU8Kc=; b=GbQifAu6eE+ZMGNjbGV3tlNs0kw2FF/HGvVVBsT4w6e8umdPVLCP9J1Eaf4GS5BWPC rQF4X1iK/mxv1Uhm24asWIoZD+G4vct6BwWX2H+iFTWOUOpBTlDujo7FY0fddvIsCaUa OdumQgcADnnrrz5K317YT1gjZsw4C/bNnUURTLKc1HVUx4SHc9iM0yu9zvdCw46MxX38 uQWkcwkGw9ETHq20mCaqKB3oRjhUym7IgK8lI0iHc3tc1aBNApbTFPVQ9Djbr+/EipH8 5urZPpdae2S5XPJKKON/nkxqNUC0E5EXe6R4+kjdi7oIw8mBpdAxpbiMQu8Y8dOsGtOj K19g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ZoAVSFMt2kdoK3c37Bd7IIt997cYV/XwpPRan7aU8Kc=; b=QOgRB8/P1HKZohOP8TG6Rxjg5oum9rLCznca94D3tjqXFbGW1P7z449iom56MgnHY2 uJXiD8JNJ0LIsmOfq9jdCkVtANfj85vmjx3PXKUpwFHMgj5XlrktQFKORTH2y89wlprA IyBb80jwKahd4d0AWHY3GQ3flg6B8/PRYCNtzBL0UJzr39wRPNNvO0yBRIFc5kOEol2Y LdV7Wz+itbnx5WaWGqdZ1NjyOzXwg+EnVQxbA0nRPr5wmCevrIajhdJNqtH2AvQ6FoWs vSdbKVcjPcqf97a33QmYqk4uvbmyYcQbc7llLXBhcd5cPChR3dVSp/qbF1FVEx0WeG2e 3WHw== X-Gm-Message-State: AOAM5306dOUPO9+6G2Q8AeEDAgcyT2MB1IDateHMT+LLIFAisHhKjYs7 tMNjHBsG3H+dIF2baTFeY+jyng== X-Google-Smtp-Source: ABdhPJx3PtihNZB3eRgmP+b0NIlvvBeAbezQyMeien9Ec90NSvNMRRW/xYTtVc5dsphV7NrGgr92cg== X-Received: by 2002:a05:600c:4142:: with SMTP id h2mr6453354wmm.87.1619194994833; Fri, 23 Apr 2021 09:23:14 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id x189sm11577808wmg.17.2021.04.23.09.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Apr 2021 09:23:14 -0700 (PDT) In-Reply-To: <20210419095259.0651220FD4@vcs0.savannah.gnu.org> (Michael Albinus's message of "Mon, 19 Apr 2021 05:52:58 -0400 (EDT)") Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=contovob@tcd.ie; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268323 Archived-At: 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 #) command-completion-default-include-p(tramp-recompile-elpa #) Should package--user-installed-p simply guard against a nil package descriptor? Thanks, -- Basil