Skip to content

Commit

Permalink
update insert date func
Browse files Browse the repository at this point in the history
  • Loading branch information
chens committed Feb 1, 2024
1 parent cabf057 commit 1db1f3e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lisp/init-editing-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -525,16 +525,17 @@ ORIG is the advised function, which is called with its ARGS."
(delete (car list))
(remove-it (cdr list)))))

(defun timestamp ()
(defun cdadar/insert-timestamp ()
(interactive)
(insert (format-time-string "%Y%m%d%H%M%S")))

(defun date (arg)
(defun cdadar/insert-date ()
(interactive "P")
(insert (if arg
(format-time-string "%d.%m.%Y")
(format-time-string "%Y-%m-%d %a"))))
(insert (format-time-string "%Y-%m-%d")))

(defun cdadar/insert-date-week ()
(interactive "P")
(insert (format-time-string "%Y-%m-%d %a")))

(use-package restart-emacs)

Expand Down

0 comments on commit 1db1f3e

Please sign in to comment.