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: Wed, 24 Mar 2021 22:19:19 +0000 Message-ID: <87tup0kxeg.fsf@tcd.ie> References: <20210313133546.6042.78482@vcs0.savannah.gnu.org> <20210313133547.AA06C20B2E@vcs0.savannah.gnu.org> <877dma1yfv.fsf@tcd.ie> <87sg4ygmd9.fsf@gmx.de> <87zgz5uc0k.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Albinus , Stefan Monnier , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 24 23:20:41 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 1lPBrk-0002Ey-Sc for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Mar 2021 23:20:40 +0100 Original-Received: from localhost ([::1]:45162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPBrj-0008B9-SC for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Mar 2021 18:20:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPBqY-0007HH-Mg for emacs-devel@gnu.org; Wed, 24 Mar 2021 18:19:26 -0400 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:42814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPBqW-0002OY-7b for emacs-devel@gnu.org; Wed, 24 Mar 2021 18:19:26 -0400 Original-Received: by mail-wr1-x42b.google.com with SMTP id x13so323253wrs.9 for ; Wed, 24 Mar 2021 15:19:23 -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=84h5icK3lbmlYiBZM3taL8Flp3rC+s7TkTdgYd3aw1s=; b=A/ON5sMyupSiBDRasYnd+21l9wt2yTY/b/O2t3AOFob9ImLDWm0tiyPvkkylIYT886 QM1qx34YichXqj7v/eiMBs+YazaBYs6qlOPuq6B3HqTAZzaYq/Qb6yt7PdTJm5Y5t3Dw z09oiqKD+Bo9CqUW5e5A8ocAdVKApdIm29P91n3ILqRzl15XcD0GA9XzhJ5tf2rNEO1s b1I9D4a8W+mCx6J3f6sebJNZGn44MPQmeBU6g9zgjn9cyAAqDIePISZFgls0fjc610Yp zmVx5HVjB9L0IqA66wbxa4A/ie0yjKLn5qbeob0uGdLoTQoihPwGNwOdggOq8LkKzxYe R+hA== 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=84h5icK3lbmlYiBZM3taL8Flp3rC+s7TkTdgYd3aw1s=; b=Rm7f+5RAUaonSi5RgNpkb3pXXtBHFFBOBVXiat72soYFEr2zTuF0xsV37JhfTnL17m vBNwmjWFlvkJbMlLVGw7KUdpzFXAV2EX+y0iQdF+4IROTx2rtXtKkYOGV6to0lGtxLv1 MXGcWiltsivN+DGmAu6Azo69xlbf5WWvzTVJyneY9Fg7Bc1BvkR6vJsd2WCNcuCdFSB+ YoIT4i5xDbbrCSDpWr6ih0a6pw8nGi9EesYM9r+5iUO+qv3QwiGk/RopxKFI3RxcqZ1K v3djChImO1Andwpnq+N7Fon92eEDfXoxXyCAe/Did4eeX3aBmJ9KQGM+1E89iy8kq7pP 9MqA== X-Gm-Message-State: AOAM531Htg8OhbbLaQkQeGUOTZa1/d2M3wRl8SQvx7R02G6pCCGZBaM4 U8KPNP2446D1ADZdOEerPWQjog== X-Google-Smtp-Source: ABdhPJy41Km0dsEPKpx5dnQWj4VyQJhfCbOC2/xxUy9f3jmXRcBk/G3JJoyo+KcvOu9etBO3gnp97g== X-Received: by 2002:a5d:6103:: with SMTP id v3mr5495228wrt.375.1616624362203; Wed, 24 Mar 2021 15:19:22 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id d13sm5045138wro.23.2021.03.24.15.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 15:19:21 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 14 Mar 2021 10:57:32 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=contovob@tcd.ie; helo=mail-wr1-x42b.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:266990 Archived-At: --=-=-= Content-Type: text/plain Stefan Monnier writes: >> Like so? Or do we want the safety net higher up, e.g. in >> read-extended-command or its callers? > > LGTM, but I think Lars would know better, Lars, any thoughts on how best to protect M-x from errors in completion-predicate? Is the following okay? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Demote-completion-predicate-errors.patch >From 41cbd533d7fb770ef3ce8a8a88180f9e0e1ecc54 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 14 Mar 2021 12:52:31 +0000 Subject: [PATCH] Demote completion-predicate errors For discussion, see the following thread: https://lists.gnu.org/r/emacs-devel/2021-03/msg00682.html * lisp/simple.el (command-completion-default-include-p): Demote errors when calling completion-predicate so M-x doesn't break. --- lisp/simple.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 98fccf4ff2..295c01e21f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2025,7 +2025,12 @@ command-completion-default-include-p BUFFER." (if (get symbol 'completion-predicate) ;; An explicit completion predicate takes precedence. - (funcall (get symbol 'completion-predicate) symbol buffer) + ;; Demote any errors so M-x continues to work. + (condition-case-unless-debug err + (funcall (get symbol 'completion-predicate) symbol buffer) + (error + (message "command-completion-default-include-p: %s: %S" symbol err) + nil)) (or (null (command-modes symbol)) (command-completion-using-modes-p symbol buffer)))) -- 2.30.1 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--