unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45333: complex command history should not save optional nil parameters
@ 2020-12-20  9:01 novim via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-07 11:57 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 36+ messages in thread
From: novim via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-12-20  9:01 UTC (permalink / raw)
  To: 45333

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

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:

(query-replace-regexp "a" "b" nil nil nil nil nil)

If I save this command then I delete the nils, because they are unnecessary there and make the expression noisy in my notes, so I delete them manually:

(query-replace-regexp "a" "b")

This is the same command, since the rest of the params are optional:

(query-replace FROM-STRING TO-STRING &optional DELIMITED START END BACKWARD REGION-NONCONTIGUOUS-P)

When commands are saved in the complex history they should be saved in a format which skips the rest of the arguments if they are optional and nil.

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-07-07 18:00 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-20  9:01 bug#45333: complex command history should not save optional nil parameters novim via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 11:57 ` Lars Ingebrigtsen
2022-06-07 13:15   ` Eli Zaretskii
2022-06-07 13:20     ` Eli Zaretskii
2022-06-08 11:43     ` Lars Ingebrigtsen
2022-06-08 13:57       ` Eli Zaretskii
2022-06-09 10:22         ` Lars Ingebrigtsen
2022-06-09 10:33           ` Eli Zaretskii
2022-06-10  8:52             ` Lars Ingebrigtsen
2022-07-05 14:16       ` Michael Heerdegen
2022-07-05 14:53         ` Drew Adams
2022-07-05 16:41         ` Lars Ingebrigtsen
2022-07-05 18:45           ` Michael Heerdegen
2022-07-05 18:48             ` Lars Ingebrigtsen
2022-07-05 19:06               ` Michael Heerdegen
2022-07-05 19:09                 ` Lars Ingebrigtsen
2022-07-05 19:43                   ` Michael Heerdegen
2022-07-05 19:50                     ` Lars Ingebrigtsen
2022-07-05 20:00                       ` Drew Adams
2022-07-05 20:49                       ` Lars Ingebrigtsen
2022-07-05 22:37                         ` Drew Adams
2022-07-06 18:41                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07  7:29                           ` Lars Ingebrigtsen
2022-07-07  9:45                             ` Lars Ingebrigtsen
2022-07-07 10:00                             ` Stefan Kangas
2022-07-07 10:06                               ` Lars Ingebrigtsen
2022-07-07 13:54                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 14:10                               ` Lars Ingebrigtsen
2022-07-07 14:49                                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 14:52                                   ` Lars Ingebrigtsen
2022-07-07 15:05                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 15:21                                       ` Lars Ingebrigtsen
2022-07-07 15:30                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-07 18:00                                           ` Lars Ingebrigtsen
2022-07-07 13:58                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-05 20:15               ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).