Move org datetime stuff to where it's actually useful

This commit is contained in:
MitchMarq42 2023-12-15 15:16:20 -09:00
parent 2307a39f50
commit 808873b4b4
2 changed files with 18 additions and 18 deletions

View File

@ -72,24 +72,6 @@
;; (add-to-list 'auto-mode-alist `(,org-wiki-regex . org-vw-mode))
(add-hook 'org-mode-hook #'org-vw-mode)
(defun mitch-insert-current-datetime ()
"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"))))))
(defun mitch-1st-heading-now ()
"Insert a brand new 2nd level Org heading containing the current date/time.
Start insert mode."
(interactive)
(goto-char (point-max))
(insert "* ")
(mitch-insert-current-datetime)
(evil-insert 1))
;; ------------------ ABANDON ALL SANITY, YE WHO ENTER HERE --------------------
(defvar mitch/org-dwim-char-chars '("_" "/" "*" "+" "~" "="))

View File

@ -612,6 +612,24 @@ targets."
font-lock-doc-markup-face))))
(add-hook 'org-mode-hook
#'mitch/org-grayify-stars 90)
(defun mitch-insert-current-datetime ()
"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"))))))
(defun mitch-1st-heading-now ()
"Insert a brand new 2nd level Org heading containing the current date/time.
Start insert mode."
(interactive)
(goto-char (point-max))
(insert "* ")
(mitch-insert-current-datetime)
(evil-insert 1))
:hook
(org-mode . turn-off-line-numbers)
;; (org-mode . org-vw-mode)