This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.
See this search for previous “Weekly Tips, Tricks, &c.” Threads.
Don’t feel constrained in regards to what you post, just keep your post vaguely, generally on the topic of emacs.
Not sure if anyone post this, but I just found a way to autofill (async-) shell-command with latest run command from history with 2 simple lines of code:
(advice-add #'read-shell-command :filter-args #'(lambda(args) (list (car args) (car shell-command-history))))
I’m still learning lisp, so any improvement are welcome.
This was a great little ergonomic improvement, and thanks for taking us on that journey!
My final version is in my config now. The only improvements are skipping the most recent command when scrolling back through history (a nice improvement IMO) and some probably unnecessary refactoring.
Thanks for finding that advice solution, which is like 98% of my version. : )
I’m glad it helps someone
I like your version, i didn’t notice the navigation duplication before, and that
cl-destructuring-bind
is a life saver.