Skip to content

Instantly share code, notes, and snippets.

@superdaigo
Last active December 14, 2015 14:59
Show Gist options
  • Save superdaigo/67829cc75cd60e9f30b5 to your computer and use it in GitHub Desktop.
Save superdaigo/67829cc75cd60e9f30b5 to your computer and use it in GitHub Desktop.
The sample function to insert current date in emacs. The format is "yyyy-mm-dd (aaa)" in this snippet.
;; insert-date
(defun insert-date ()
"Insert current date yyyy-mm-dd (aaa)"
(interactive)
;; Print weekday in English
(setq tmp-locale woman-locale)
(set-locale-environment "en_US.UTF-8")
(insert (format-time-string "%Y-%m-%d (%a)"))
(set-locale-environment tmp-locale)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment