projects
/
blog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the correct date format when creating post
[blog.git]
/
blog-tool.el
diff --git
a/blog-tool.el
b/blog-tool.el
index
cb04b8e
..
6d5401d
100644
(file)
--- a/
blog-tool.el
+++ b/
blog-tool.el
@@
-33,11
+33,9
@@
"Create a post."
(interactive)
(let ((title (read-from-minibuffer "Title: "))
"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/"
(filename ""))
(setq filename
(concat blog-root-dir "/posts/"
- date "-"
(replace-regexp-in-string " " "-" title)
".org"))
(find-file filename)
(replace-regexp-in-string " " "-" title)
".org"))
(find-file filename)
@@
-45,8
+43,9
@@
"#+TITLE: " title "\n"
"#+AUTHOR: " my-name "\n"
"#+EMAIL: " my-email "\n"
"#+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)))
(save-buffer)))