Created
January 8, 2016 12:04
-
-
Save cabo/cb56cb935ba868f169f3 to your computer and use it in GitHub Desktop.
Insert time in emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun german-time () | |
(format-time-string "%d.%m.%Y" (current-time))) | |
(defun iso-date () | |
(format-time-string "%Y-%m-%d" (current-time))) | |
(defun ins-time (&optional arg) | |
(interactive "*P") | |
(if arg | |
(insert (german-time)) | |
(insert (iso-date)))) | |
(global-set-key "\C-c=" (quote ins-time)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment