4 ms·
Workflow: I store tiny bits of code, shell lines, reminders, tiny text drafts, links, random notes. I frequently search backwards to find some specific lines of
by antoineMoPa 4y ago
Workflow: I store tiny bits of code, shell lines, reminders, tiny text drafts, links, random notes. I frequently search backwards to find some specific lines of code or shell script.
Tools: I use a single org-mode file and I have a shortcut command in Emacs to launch it (M-x wl). When I run this command, it generates a new entry with the date and time and places my cursor so I can type right away.
(defun wl ()
"Open work log"
(interactive)
(find-file "~/dailylog/wl.org")
(newentry)
)
(defun newentry ()
"New log entry"
(interactive)
(search-forward "#now#")
(beginning-of-line)
(insert "\n\n* ")
(insert (shell-command-to-string "date"))
(dotimes (i 50) (insert "="))
(insert "\n\n\n")
(forward-line -2)
)
;; bonus function
(defun codeblock ()
(interactive)
(insert "#+NAME\n")
(insert "#+BEGIN_SRC javascript\n")
(insert "#+END_SRC\n")
(forward-line -1)
)
Format: No particular format except the auto-generated date above. There needs to be the string '#now#' in ~/dailylog/wl.org, this is where new entries are generated.