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#45333: complex command history should not save optional nil parameters Date: Tue, 05 Jul 2022 16:16:58 +0200 Message-ID: <875ykbabl1.fsf@web.de> References: <0DJzRuBn1S9jW_MoJt5HXcLQWrzb7Vjkfmlwa9zPvgLIFeEfdPLoiguSztbL4TnuHyxd59Z7BpS9qJo5BinMO3n1mDlWjcytLjq9HmoGIl0=@protonmail.com> <8735ggk7nz.fsf@gnus.org> <83ee007gxo.fsf@gnu.org> <87o7z3bcsp.fsf@gnus.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="26672"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: laszlomail@protonmail.com, Eli Zaretskii , 45333@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 05 16:18:12 2022 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 1o8jNT-0006h9-T9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 16:18:11 +0200 Original-Received: from localhost ([::1]:45428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8jNS-0008W2-Ph for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Jul 2022 10:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8jNK-0008SA-N5 for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 10:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8jNK-0002WT-DE for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 10:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8jNK-0006Wi-9L for bug-gnu-emacs@gnu.org; Tue, 05 Jul 2022 10:18: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: Tue, 05 Jul 2022 14:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45333-submit@debbugs.gnu.org id=B45333.165703063125028 (code B ref 45333); Tue, 05 Jul 2022 14:18:02 +0000 Original-Received: (at 45333) by debbugs.gnu.org; 5 Jul 2022 14:17:11 +0000 Original-Received: from localhost ([127.0.0.1]:51192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8jMV-0006Vc-HC for submit@debbugs.gnu.org; Tue, 05 Jul 2022 10:17:11 -0400 Original-Received: from mout.web.de ([212.227.17.11]:51475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8jMR-0006V2-33 for 45333@debbugs.gnu.org; Tue, 05 Jul 2022 10:17:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1657030619; bh=0/QNckBW7IppifqmxVL0qhjJDtRtnvifLkwDYFfq25M=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=YshGcXjijkG4ecZl0+6ABXDBk1KV0WH3r/cPJlFv4pPcXxuuCfFhQGTVIc9dL9ljs 7lwrvtfDDP4al3uKGxK66FJlzqIkhmvkA1zJitoMGrUVzJ+D6PiHiwQFOW2xr5aUw9 ZurvMhP74m14l9iZAjEHWLgqCrHaQJctFnVXrups= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N6sBp-1nXB8W2dUl-0183s0; Tue, 05 Jul 2022 16:16:59 +0200 In-Reply-To: <87o7z3bcsp.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 08 Jun 2022 13:43:50 +0200") X-Provags-ID: V03:K1:BE1OnyIMcUQUqR/Lg4QLKDC5uCjIWMtSmhkiSEVxs8vhJYqP6JF i5rV8OXI9Rm54WojeVrTk1TeFLzTwC9FLfLArQt2Q7ojwm64J96Wvyv40IVhnwMbiq6vYFr SZCrXLiffoC3mkAFdLf18id6zvf+pFro5PZeX6mZt80iFStRPmTiC66eUdsWLBgIl0rbb2T ehonIluQkZCWYoBELOhEw== X-UI-Out-Filterresults: notjunk:1;V03:K0:+OPbjsDlxj0=:j7JjmxyR3l11rmqOmzERJG UY54ZZi7zDXMUaoFybB31BsVjooA/t0EZtOsvjETueZwnDvj5fjsWZNVAJaQL1UWLZ7inRE2+ Z+sVFAN20vCvzOp0IveYGUyoNPY6mhDwgQmkMNaPZSvMJX+9HvFNZNv9oQ856vKKaXUVLUSD1 t47vJ9ONbtBAa5UX3GAKcj8av74trcy05QgTKztWTtpD/bAUUgDGgd24oeI/Iv+BMr+4TA/UM mNoKj3Rirg8L2JIW+zCd9utuotV86K2sGClp8IAWPdH/M+mL4vurpUAdapkssyhanIDRf8yMn MkhiTnf5wgetkXrL0K+pxWBfcq1HmA3/X/VthzMtbUj4Z566hTUAxU1BmFkcpGfx6AotnuJp5 3vucKKOk8c6xhnR3AnxS+Pg5+1O4X4nCLOamYOofvcSk3z/L5O/jJiad0rVXilGJ2Yw+Xp9BW lVgdtlstNbJomK82D2+lh8TRnft++fulCbmVRvYM9Ztx4uyxOLGQX9Snaf5J2UODbvYd5Iup0 oBXrHxUJhWh1OTn94Gy3LlS959ikfd2GaD4TcdO0v/cbDshVm6CM3Mm8Hew1n5QTskBEuYzpO 7rB1b4p3ZfZDNH94gJ2ZJ3kqgfa+fZxTi9TB9RtuCFbUE23jZy7Me9OblYEb0jmFKKkgmBPe0 njfTf1p9e6IaV7cfWUW2JtXIEN4jjArTBuRN9Z3in6NRSG/LsFJz9Xyf2g4m0Lbxq0UfPBaUE cPxhbbNLV4cI+SSOlaS/S8WxUXv5VSi1vbjbeWcMNERe8iCkqCBEG2DW8b9iGSOx5mH6QzT6 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" Xref: news.gmane.io gmane.emacs.bugs:236120 Archived-At: Lars Ingebrigtsen writes: > Ah; thanks. Yes, we land things like > > (replace-string "foo" "bar" nil nil nil nil nil) > > in `command-history' -- where all those nils are optional. We could > pretty easily filter those out by looking at the signature of the > function and peeling off trailing nils, I think? Would there be any > disadvantages to doing so? Note that there are only such `nil`s when the evaluation of the interactive spec returned them. It's somewhat consistent if the command history includes the argument list exactly as returned by `interactive'. The more general problem is to provide interactive forms that work nicely with `repeat-complex-command' - something programmers are often not aware of when writing commands. Anyway, trying of prettify away those `nil`s seems like overkill to me. In theory even an optional `nil' can be significant. Michael.