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 695f679: Remove ; ; ; ###tramp-autoload cookie from Tramp defcustoms (Bug#47063) Date: Sat, 13 Mar 2021 22:27:48 +0000 Message-ID: <877dma1yfv.fsf@tcd.ie> References: <20210313133546.6042.78482@vcs0.savannah.gnu.org> <20210313133547.AA06C20B2E@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="33243"; 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 Sat Mar 13 23:28:53 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 1lLCkf-0008Xf-Pa for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Mar 2021 23:28:53 +0100 Original-Received: from localhost ([::1]:34030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLCke-0007PA-Rx for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Mar 2021 17:28:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLCjk-0006uy-5I for emacs-devel@gnu.org; Sat, 13 Mar 2021 17:27:56 -0500 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:54229) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLCji-0004O7-1x for emacs-devel@gnu.org; Sat, 13 Mar 2021 17:27:55 -0500 Original-Received: by mail-wm1-x336.google.com with SMTP id g20so5898929wmk.3 for ; Sat, 13 Mar 2021 14:27:51 -0800 (PST) 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=hC0VFhHhKpFbANZpgpdpLAi7EbJc3t2iIOIg1hh06Cc=; b=XNIvVMoeDty55UilJAcwxDL15w6BroPYN/+WIY27DEo8wSNYXfzmJNu2qaMAz386Qq +1tU8lTUpOwYEd6tSWS1HEykvpuec9mDq9sWi+PI4+vHuiS1qpbDcS9SzGwyHLWyr3Ok xq5P8sn6u5j0i69iYGotGpzsofpIfm7PRBgWEgrqqjZp+jdp1SFavJnEKCnaHvOw/G+Q 7Fj2GV0TXx2agelKflZL4/Pq0XBtDSmX1RAwAIjGQNK6zPnndbJbvR8Tq2beUNLN4S9K Df6X8QLLZmUaw7Fx+PU+rSLAw8T0wjiRW/Bw4bTw2iZPrcL/6YrA3SXR7HWVlxuCkrdm dFjA== 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=hC0VFhHhKpFbANZpgpdpLAi7EbJc3t2iIOIg1hh06Cc=; b=mYlmifHHS3UGwMZJl7d8pKjYXsEherd/L1nNJpMZxtIZlfZpMWS5f82n680fbWjbGE B/bA/lxGJOYQZ6QPqAhP+bJu1iubOXD35SmyafXX/c9aovBWztS1zpXz4TOChiXdaeUo VmQTLy81rhI5iAcP70IjDnc3/G4k8NIhRG65I0SPdjWnP/mNri/rt2sFf6Is7jtKlTAm ehFYM6kpJlvEbHFXLfuVUdmkGhLZvLtMJKDX0SxvNeN3YxhzuEZApScPzAWq3eyKxQN2 2LPNr0LsDjaCYphuzHeuXzCr2uaXY1fx09YlFvb3YyVss1OkZqGNh//uAlEGyaDqSs4g Zf8Q== X-Gm-Message-State: AOAM532wkL92xcLzYea7sKWFUvlda5XSM59EiofNEXEsGCotQGbOiZtr NuQ/gHS4ce6hhWnTdpFlA87/jQ== X-Google-Smtp-Source: ABdhPJyXicWkYb3D7+y4ZTu7hK8A2kHNeYek78RxwlW53chJOSSVFvhaoXsTmfH4M7WApEhV3tqo9Q== X-Received: by 2002:a05:600c:608:: with SMTP id o8mr19888942wmm.42.1615674470747; Sat, 13 Mar 2021 14:27:50 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id f2sm14280476wrq.34.2021.03.13.14.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 14:27:50 -0800 (PST) In-Reply-To: <20210313133547.AA06C20B2E@vcs0.savannah.gnu.org> (Michael Albinus's message of "Sat, 13 Mar 2021 08:35:47 -0500 (EST)") Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=contovob@tcd.ie; helo=mail-wm1-x336.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:266446 Archived-At: Michael.Albinus@gmx.de (Michael Albinus) writes: > diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el > index f8de708..278fb9d 100644 > --- a/lisp/net/tramp-crypt.el > +++ b/lisp/net/tramp-crypt.el > @@ -112,6 +112,14 @@ initializing a new crypted remote directory." > "Non-nil when encryption support is available.") > (setq tramp-crypt-enabled (executable-find tramp-crypt-encfs-program)) > > +;; This function takes action since Emacs 28.1, when > +;; `read-extended-command-predicate' is set to > +;; `command-completion-default-include-p'. > +(defun tramp-crypt-enabled-p (_symbol _buffer) > + "A predicate for Tramp interactive commands. > +They are completed by \"M-x TAB\" only when encryption support is enabled." > + tramp-crypt-enabled) [...] > +;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form. > +;;;###tramp-autoload > +(function-put > + #'tramp-crypt-add-directory 'completion-predicate #'tramp-crypt-enabled-p) [...] > +;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form. > +(function-put > + #'tramp-crypt-remove-directory 'completion-predicate #'tramp-crypt-enabled-p) Here, the completion-predicate property is autoloaded, but tramp-crypt-enabled-p is not, resulting in the following unfortunate interaction when only tramp.el is loaded: 0. emacs -Q 1. M-x toggle-debug-on-error RET 2. M-x load-library RET tramp RET 3. M-x customize-set-variable RET read-extended-command-predicate RET 4. e TAB RET 5. M-x TAB Debugger entered--Lisp error: (void-function tramp-crypt-enabled-p) tramp-crypt-enabled-p(tramp-crypt-add-directory #) command-completion-default-include-p(tramp-crypt-add-directory #) My question is, which combination of the following should happen: - The completion-predicate properties are not autoloaded. - The function tramp-crypt-enabled-p is autoloaded. - The function command-completion-default-include-p checks whether completion-predicate is functionp. Thanks, -- Basil