New answers tagged

2

Here's a function that manufactures a filename out of today's time stamp and writes the file out: (defun write-file-timestamp () (interactive) (let ((fname (format-time-string "%Y-%m-%d.org"))) (write-file fname t))) The t argument in the write-file call asks for confirmation if the file exists already: you can omit it if you don't ...


5

I have the following in my .emacs: ;; date (global-set-key "\C-\M-d" (lambda (arg) (interactive "P") (let ((separator (pcase arg ('(4) "-") (0 "/") (_ "")))) (insert (format-time-string (concat "%Y" separator "%m&...


Top 50 recent answers are included