From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#66394: 29.1; Make register-read-with-preview more useful Date: Fri, 27 Oct 2023 03:27:59 +0200 Message-ID: <87ttqcg8gw.fsf@web.de> References: <87il7ib6cu.fsf@posteo.net> <87sf67qqmp.fsf@web.de> <875y3386ep.fsf@posteo.net> <87a5sddh14.fsf@web.de> <8734y5vnj7.fsf@posteo.net> <87bkcslr18.fsf@web.de> <87y1fwtyrl.fsf@posteo.net> <87y1fut1wp.fsf@web.de> <87ttqgpjiz.fsf@posteo.net> <87wmvbibpr.fsf@web.de> <877cnb2n63.fsf@posteo.net> <8734xyc8z0.fsf@web.de> <87zg05rewi.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27431"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66394@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 03:28:52 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qwBed-0006vR-Sn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 03:28:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwBeL-0006xs-Bs; Thu, 26 Oct 2023 21:28:33 -0400 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 1qwBeJ-0006xk-ST for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 21:28:31 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwBeJ-0006XM-Kl for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 21:28:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwBeo-0007hz-Bj for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 21:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 01:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66394 X-GNU-PR-Package: emacs Original-Received: via spool by 66394-submit@debbugs.gnu.org id=B66394.169837011429594 (code B ref 66394); Fri, 27 Oct 2023 01:29:02 +0000 Original-Received: (at 66394) by debbugs.gnu.org; 27 Oct 2023 01:28:34 +0000 Original-Received: from localhost ([127.0.0.1]:34751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwBeM-0007hF-H7 for submit@debbugs.gnu.org; Thu, 26 Oct 2023 21:28:34 -0400 Original-Received: from mout.web.de ([212.227.15.4]:56975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwBeH-0007gy-CA for 66394@debbugs.gnu.org; Thu, 26 Oct 2023 21:28:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1698370071; x=1698974871; i=michael_heerdegen@web.de; bh=nFEB0mp+iS/dm27fQ9cutynOyrTBKRV/KkxL5YE6Udg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=BcpDuKFgk8AyhmiM7D1mQuviJfmF7NNolEeXasapAMDjHsaxlXOIzm8WLr4SjDtX IAWw8eOVUCr23VKrM/EyILlEePSHeI9iRGXDsfTiTtBWmv7LvdeaBzBqfIbUlopnZ N5SsrFGxgL+ceiZKso1Ki9WbIVbkzdibin07hVOuf992/Hjm79YsSt++4S66F1vHp WEVXFECa3cJ4vFrBk+6re+MycYGtJAgQilNNKTYQq8EeqaLyUaruAHpjeEZCL0jw/ avtXIyKIAUtLUB0AIiiAnzBXYqzdEHCFUSEvE/6OXT4vtGw3w0UUjO+I6z/X6iMjw MjFNsfSyOV7xKGagHA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.59.210.159]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MFayw-1qhMjZ0ukw-00H5KH; Fri, 27 Oct 2023 03:27:51 +0200 In-Reply-To: <87zg05rewi.fsf@posteo.net> (Thierry Volpiatto's message of "Thu, 26 Oct 2023 06:17:07 +0000") X-Provags-ID: V03:K1:8mICF8YARWgCnOkVboNU+JRfK0guLkuqYyxUxjMP0HBvbKi0VsG GxZTD3MVrfaDkszhga57sVp9mY6TM2AZ6nKbuOmFeHc/mW2J8jaMi7vgwv03M9PVRuGNS9g UMC6OAomhiv7bGfdkYTT7KP0Rc4rkaR535SzPXnr8X7M9wb/vmfethga6BLf2ZcKyc5/ZRE duNAjzH9+7skQVDcrm6EA== UI-OutboundReport: notjunk:1;M01:P0:+HIEQ5m3Ke0=;bNut3RhmbAGy1kc/I1Xa7nEd2RQ AlZ6Fh86ev7FEHcgvGjeQvfvt69XEAUYAEGQSqpSobAYD88b+Gm+ZTXz5PtaNpBoVVms7UVnX lwAYqkga67tjSQqQw3ToxhjCBN2psUYKLE6IfR57fbGZ3+D+N3tv/SjVoe6Wi0gFh6puDgtJR Ea8gGV2k+A2KjSsjLSR2zrbf62X56bKD92+432O5CtyjO8CGTMoKiF6iCfBD9+hW04JmA+5wB a42q0sDgRAwB9/Uj0ng7yroLzP/JfRzXD9TQe65UDfC2TEPPsi9+YoJFL1KnhlWP5WNLO4KTT wEO4lTVn9Rc5crjcYtNF2C0+niJ5y9GkYwDiHJLXEsAmifq5thEE0QWd8hnU6lhrjl5U+YRNn 8+fa20t/GmVvTC4TiLT84zxiVk+2NzevlUKGXKZHc63si3txSEpjJiIjWW8yROe8cSFyPxDXr 9AWRr1muXQHVB6kXm6uG8QPYTwjvg4JW/DP2x3hJe8+5RgVNswag50+tcHD5PDwUS98LOxf2K ahO+vO1dMkYAl8X3+snWDaAFKX8X7zLS7L3uJxsJWV4L3ud7ZtjMvCI0hx8ZLUReM51Hp2/bb LfECioy+BtRoWub4MRXsCW2p7og+7433pLoJ/oN7BFEK5yzCQe+O1PhtZDF04KqnXGBpcQOK8 buyjo+z3CYTcyw4DPnrG6YQEbCRYDPLueNG5gYJzf+famKyZXM94SMB5ooiJqg4tHIaw1U3rP aHxb7eqnH8mwN7YVwotXH8Ov9hAyCYgR4sp7gw2v1y7uQ8Fmn0Gcvs4c84XwMwXUU59gvR7H X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273332 Archived-At: Thierry Volpiatto writes: > Why do you need another argument as long as you use `this-command`? > You can use e.g. (pcase this-command ('foo #'foo-p) etc...) I doubt all potential uses will use `this-command'. It's cleaner if the command that knows what it wants passes the information via argument than to make the other function derive it indirectly from the context (functional style). Maybe in the future we might need to pass other predicates as well. What when a user wants to add another register command? Or if a future command needs to prompt more than once? A predicate passed to the function can also be wrapped for further filtering etc... that's all more controllable and extensible than hiding the decision in a defun. Michael.