xenodium · 2022-08-14 13:15
xenodium · 2022-08-14 13:17
Take one-liners (or [longer scripts](https://xenodium.com/png-to-icns-emacs-dwim-style/)) and make them [seamless command-line utils](https://xenodium.com/seamless-command-line-utils/).
TrepidTurtle · 2022-08-14 13:30
Very cool, and a well written blog post as well. I’ll definitely be trying this out! You make a convincing argument for moving some more complex commands to Emacs functions.
codefake · 2022-08-14 14:00
Awesome, thanks for sharing.
thevoidzero · 2022-08-14 14:33
I was thinking wouldn't it be better to take input for the output pdf name as joined(u) as default value?
Other than that it seems like a cool concept. I keep forgetting commands too and have to look through History. Also will these increase emacs init time?
xenodium · 2022-08-14 16:15
>I was thinking wouldn't it be better to take input for the output pdf name as joined(u) as default value?
Ah maybe. Thanks. Could give that a try, but will likely need a helper function to read file names with basic validation (ie. ensure expected extension, non-empty string, non-existing file, etc).
Until then, `dwim-shell-command-on-marked-files` automatically places point on the new file created. Use `C-x C-q` to rename the new file.
>Also will these increase emacs init time?
Doesn't have to. Can be lazy loaded via `use-package` or preferred method.
xenodium · 2022-08-14 16:17
Thanks. Glad you like it.
xenodium · 2022-08-14 16:18
👍👍
Rob23Hert · 2022-08-17 06:28
Really cool idea! Another useful tool could be one that adds the page numbers to a pdf. I usually use the method from [dry-labs](https://www.dry-lab.org/blog/2018/numbering-pages-of-a-pdf), this allows me also to insert the name of the pdf in the header. Also I don't know any other "one" liner.
xenodium · 2022-08-17 07:39
>usually use the method from dry-labs
Handy. Saving. Thanks!
>Also I don't know any other "one" liner.
Btw, dwim-shell-command should work with multi-line scripts [https://xenodium.com/png-to-icns-emacs-dwim-style](https://xenodium.com/png-to-icns-emacs-dwim-style) and multiple languages [https://xenodium.com/emacs-dwim-shell-command-multi-language](https://xenodium.com/emacs-dwim-shell-command-multi-language)
Rob23Hert · 2022-08-17 09:22
Works like a charm, thank you! You can find the script in [my config](https://github.com/moberga/my-doom#dwim-functions) if you need it.