* today's goal - no goals allowed
@ 2022-11-08 2:42 Emanuel Berg
0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2022-11-08 2:42 UTC (permalink / raw)
To: help-gnu-emacs
;;; -*- lexical-binding: t -*-
;;
;; this file:
;; https://dataswamp.org/~incal/emacs-init/today.el
(defun date (&optional fmt)
(or fmt (setq fmt "%F"))
(format-time-string fmt) )
(defun today (&optional no-insert)
(interactive "P")
(let ((date (date)))
(if no-insert
(prog1 date
(message date) )
(save-excursion
(if (looking-at "[[:digit:]]\\{4\\}-[[:digit:]]\\{2\\}-[[:digit:]]\\{2\\}")
(replace-match date)
(insert date) )
(save-buffer) ))))
(provide 'today)
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-08 2:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 2:42 today's goal - no goals allowed Emanuel Berg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.