Closed ghost closed 12 years ago
(ob:get-header "DATE")
will retrieve the document's #+DATE:
header which maybe not what you need.
If you want to retrieve the post's date, you might want to (ob:format-date (ob:post-timestamp POST) (ob:gettext :post-timestamp))
or something similar.
the timestamp
slot in ob:post
is a emacs internal encoded time (see encode-time
).
Thank you, but I must apologize for not being clear enough. I do want the blog date using (ob:get-header "DATE"). This was working a few days ago, but is no longer working. You can see an example of this problem by visiting your own RSS feed at http://renard.github.com/o-blog/index.xml, which gives the same error "
This had been fixed.
For some reason the #+DATE:
(the last file modification) was removed.
Thanks. Yes, that was it. For some silly reason, I thought it was being auto-generated at the time of publishing the blog.
Nope this is generated when saving the file.
I got something like that in my emacs configuration:
(add-hook 'before-save-hook 'time-stamp)
(make-variable-buffer-local 'time-stamp-start)
(add-hook 'org-mode-hook (lambda () (setq time-stamp-start "^#\\+DATE: ")))
Check at https://github.com/renard/emacs-el/blob/master/cw/cw-local.el
Thank you for the suggestion!
Timestamps using ob:get-header "DATE" were working, but now produceLisp error in nil: (wrong-type-argument integerp nil) as of the most recent commits.