Automatic date entry actually works and doesn't not work

This commit is contained in:
MitchMarq42 2022-09-26 13:01:11 -08:00
parent 357645dc20
commit 4503f441cd
2 changed files with 7 additions and 3 deletions

View File

@ -14,3 +14,5 @@ There are a few things to immediately note:
- The theme is my own. Every existing emacs (and vim, for that matter) colorscheme/theme is washed-in and gray-on-gray. Doom, spacemacs, solarized, nord, dracula, or any other name-able theme. Also, any "new and exciting" theme you see on Reddit will be the same. This infuriated me to no end, so in the early days of my nvim tweaking I pulled the most unique and contrastful theme I could find. It was called "sv" and it was hacked up by some guy on github once and then forgotten (https://github.com/alexkh/vimcolors). So I extended it for nvim, then recreated it in emacs with the aid of [[https://github.com/jasonm23/autothemer][autothemer]] (which you can find at [[.config/emacs/lisp/mitch-theme.el][.config/emacs/lisp/mitch-theme.el]]).
- Typing ~qq~ will change your input method. This is sort-of a built-in feature, but the default trigger is to type ~C-\~, which is annoying to press. The ~qq~ behavior is built into Japanese-mode specifically and normally toggles in and out of ~japanese-ascii~, which is literally just normal text except ~qq~ switches back to Japanese.
* 2022-09-26 12:57 pm
This is the time of day that I wrote the thing that creates the above heading now. It works it works it works...

View File

@ -77,9 +77,11 @@
"Insert the current date and time in my preffered format, with a newline at
the end."
(interactive)
(let ((calendar-date-display-form calendar-iso-date-display-form))
(insert
(downcase
(format "%s %s\n" (calendar-date-string (calendar-current-date))
(format-time-string "%-l:%M %p"))))
(format-time-string "%-l:%M %p"))))))
(defun mitch-1st-heading-now ()
"Insert a brand new 2nd level Org heading containing the current date/time.
Start insert mode."