blog.el 707 B

1234567891011121314151617181920212223242526
  1. (defun blog-insert-entry ()
  2. (interactive)
  3. (let* ((now (decode-time))
  4. (year (nth 5 now))
  5. (month (nth 4 now))
  6. (day (nth 3 now))
  7. (hour (nth 2 now))
  8. (minute (nth 1 now))
  9. (date (format "%d-%d-%d" year month day)))
  10. (insert "CLOSED: ")
  11. (newline)
  12. (insert ":LOGBOOK:")
  13. (newline)
  14. (insert (concat "- State \"DONE\" from \"\" " (concat "[" date "]")))
  15. (newline)
  16. (insert ":END:")
  17. (newline)
  18. (insert ":PROPERTIES:")
  19. (newline)
  20. (insert (concat ":CREATED: " (concat "[" date "]")))
  21. (newline)
  22. (insert ":ID: " date "-" (read-string "Article ID: "))
  23. (newline)
  24. (insert ":END:")
  25. (newline)))