[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45333: complex command history should not save optional nil paramete
From: |
Lars Ingebrigtsen |
Subject: |
bug#45333: complex command history should not save optional nil parameters |
Date: |
Wed, 08 Jun 2022 13:43:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> > I often use complex command history and I often copy commands from it to
>> > my
>> > notes. For some commands the expression saved in this history is
>> > more complex than
>> > necessary.
>> >
>> > Here's an example with a simple command:
>> >
>> > I do a query replace then go to complex command history which shows:
[...]
>> I'm unfamiliar with the term "complex command history" -- how do you see
>> this history?
>
> I think like this:
>
> M-x repeat-complex-command RET
> M-n
> M-n
> ...
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?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no