Can you explain how you achieve this?
43 karma · joined April 30, 2020
Here is the 22 years old ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=125419
I find it beautiful, tho :)
(defun new-note ()
(interactive)
(insert "----------------\n")
(insert (shell-command-to-string "echo -n $(date \"+%Y-%m-%d %T\")"))
(insert "\n"))
(global-set-key (kbd "C-M-n") #'new-note)
And to invoke it from the shell: emacs --function new-note --file notes.txt
If somebody knows a better or more elegant way to do this, please tell me!