From aa87c87aef7803511ae550c4d17a9eeba64af790 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 26 Dec 2022 17:56:57 -0500 Subject: Add command to open a file with Denote-style naming --- lisp/km-files.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/km-files.el b/lisp/km-files.el index 762afe5..5ec4a06 100644 --- a/lisp/km-files.el +++ b/lisp/km-files.el @@ -99,6 +99,14 @@ Use the current file name as initial input of prompt." (defun km/read-recent-file () (completing-read "Choose recent file: " recentf-list nil t)) +;;;###autoload +(defun km/find-file-with-denote-naming (file) + (interactive "F") + (find-file + (concat (file-name-directory file) + (format-time-string "%Y%m%dT%H%M%S--") + (file-name-nondirectory file)))) + ;;; Scratch files -- cgit v1.2.3