X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=blog-tool.el;h=6d5401db68637911e73b21981f610e08b7c6b0f5;hb=b33c6ab57943b861817299ce21a416ed3504eaa6;hp=cb04b8e4c6413d9726a8adb14b282c3c299c45d5;hpb=8cd3d8902baade6c093b52913b68fd9149861c43;p=blog.git diff --git a/blog-tool.el b/blog-tool.el index cb04b8e..6d5401d 100644 --- a/blog-tool.el +++ b/blog-tool.el @@ -33,11 +33,9 @@ "Create a post." (interactive) (let ((title (read-from-minibuffer "Title: ")) - (date (format-time-string "%Y-%m-%d")) (filename "")) (setq filename (concat blog-root-dir "/posts/" - date "-" (replace-regexp-in-string " " "-" title) ".org")) (find-file filename) @@ -45,8 +43,9 @@ "#+TITLE: " title "\n" "#+AUTHOR: " my-name "\n" "#+EMAIL: " my-email "\n" - "#+DATE: " date " " (format-time-string "%A") "\n" - "\n")) + "#+DATE: ")) + (org-insert-time-stamp (current-time) nil nil nil "\n") + (insert "\n") (save-buffer)))