From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Instead of pcase Date: Wed, 29 Nov 2023 14:56:20 +0200 Message-ID: <635b6374-fa73-4dca-b5d2-3f329e7ac3d1@gutov.dev> References: <87fs169mjj.fsf@posteo.net> <093f11a1-57c2-5e56-d39b-26fef1c67cbb@gutov.dev> <25942.25061.217864.329049@retriever.mtv.corp.google.com> <87zfzdcz6z.fsf@posteo.net> <87zfza2aq2.fsf@web.de> <7nmsv9zq6u.fsf@ecube.ecubist.org> <7nv89x5tsi.fsf@ecube.ecubist.org> <87o7focuf5.fsf@web.de> <5be2b2cb-8bb2-5fe1-6a83-cb6582608b2e@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3884"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: michael_heerdegen@web.de, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 29 13:57:28 2023 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 1r8K87-0000nE-Bk for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Nov 2023 13:57:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8K7H-00075G-3r; Wed, 29 Nov 2023 07:56:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8K7E-00074m-LU for emacs-devel@gnu.org; Wed, 29 Nov 2023 07:56:32 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8K7A-0007aB-VT; Wed, 29 Nov 2023 07:56:31 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 03F165C0230; Wed, 29 Nov 2023 07:56:26 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 29 Nov 2023 07:56:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701262585; x=1701348985; bh=7PvuwCjJU63wxx2EUpexGgsfEHbM4gdGxos dLc9Dcoo=; b=vq/Axq3teSLZuZdHOxXJnGjNb+KZxDlHKa5bdS/CYcnVotDvNMu AxAD8+FGkgcNqSEInpawZ0PteMU/WdrYsC1M7QDYNr7Zo1E0CqC9PqYQdSsa9VK/ iRW/gMMHXGNkwWjAk4iV/RoOIrdijG9DBKxLQtzw6H1SEPQiyLoywNLqEapA8jyA Q5EyX946B7NvVyXi+Q7JxBsH/CBAShHmAagEjhz4ahx1iUM6K0UUZM3AWLjaiVOc CsX1BHJEco879o3xEFFx5EAcRIgBJ8CCQP5x7DIFp4isph0Bd58lH3L5wkJev1bg OQL48CMTmft9KG4z+6w078j1bkqBc6TP6Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701262585; x=1701348985; bh=7PvuwCjJU63wxx2EUpexGgsfEHbM4gdGxos dLc9Dcoo=; b=QekJs1RvVEhxwlyHB8Z7W6XSumSIEnbD6MNsFfbLADmLscMffIB BaBAm5BqIi8dY35Q7lmjWGVd+BkY9Yu5lFt2W6ylBzjKfZ/GzBiOU65T8QjT1xNV L3bXAj1dD7mmbbyBcs7vSpNwWNxkg7f/ysgesiNiEXX4a/jvLUwLFWgKkzB0d2ij eVAJjAehURkZB/msOE4yphZqHdtIhI2OUnIB1ZUrQg8nvIQUwc7Gbwp3//7vIqP4 5XqEXcPbp4qQvoMJ64CPh6JZuvjih/BV9anT8EdDPunLGaTXZddAzY1N+3/WYG6O D44YfnJ9mz3YQyRv6VQhgXK/gl4Tl1nyKwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeihedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesth ekredttdefjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehg uhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpefhffehleejffegffeugefhkeektd ffgfehjedvgeejtedtudehueffgffgfeejheenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Nov 2023 07:56:24 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.26; envelope-from=dmitry@gutov.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -49 X-Spam_score: -5.0 X-Spam_bar: ----- X-Spam_report: (-5.0 / 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, NICE_REPLY_A=-2.177, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313357 Archived-At: On 29/11/2023 05:42, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > > However, to make the simplest possible result, I need to know > > > all the kinds of values that RES can have. For instance, at this point, > > > > > > (`(,hookfun . ,_) > > > ;; The hook function already performed completion 🙁 > > > ;; Not much we can do at this point. > > > (message "%s already performed completion!" hookfun) > > > nil) > > > > > > what are the possible values of RES that will NOT match that pattern? > > > Since "_" means "anything", the pcase form does enumerate all possible > > options > > We had a miscommunication. Your answer tells me what that pcase > clause recognizes, but the question I am asking is a different one. > My question is about what values of RES are_valid_ at that point in > the code. > > (anything else would be a bug in the code producing res). > > My question is about the code producing RES. > What are the values it can produce, and what do they mean? I'm not sure it's productive to explain the whole completion mechanism here, and which bits are involved in it. I just wanted you to assume that the existing code does what it should do (there exist only those cases that pcase matches, and the ones it does not, should not exist), and to try to rewrite it using a different syntax.