summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2022-12-26 17:56:57 -0500
committerKyle Meyer <kyle@kyleam.com>2024-01-22 00:02:53 -0500
commitaa87c87aef7803511ae550c4d17a9eeba64af790 (patch)
tree7ac0183ecdec31a1255bd2e4bf0505d9975e801f /lisp
parent7863bba29a298f6403f4434fb94037209be0bf9f (diff)
downloademacs.d-aa87c87aef7803511ae550c4d17a9eeba64af790.tar.gz
Add command to open a file with Denote-style naming
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-files.el8
1 files changed, 8 insertions, 0 deletions
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