Closed yyr closed 12 years ago
Hi,
The time stamp is a numeric value on purpose because it is converted later to a string (within the templates).
See blog_post.html
and ob:format-date
.
I think I failed to convey necessary information about bug.
here is recipe for reproducing..
(setq time-stamp-format "%3a %3b %2d %02H:%02M:%02S %:y (%z)")
I get this backtrace..
Debugger entered--Lisp error: (error "Not a standard Org-mode time string: Mon Jun 4 03:09:50 2012 (jst)")
signal(error ("Not a standard Org-mode time string: Mon Jun 4 03:09:50 2012 (jst)"))
error("Not a standard Org-mode time string: %s" "Mon Jun 4 03:09:50 2012 (jst)")
org-parse-time-string("Mon Jun 4 03:09:50 2012 (jst)")
(apply (quote encode-time) (org-parse-time-string (or (org-entry-get (point) "CLOSED") (time-stamp-string))))
(let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get (point) "CLOSED") (time-stamp-string))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category category))
(progn (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get ... "CLOSED") (time-stamp-string))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category category)))
(if (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (progn (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " ...)) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or ... ...)))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last ...)) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category category))))
(when (search-forward-regexp org-complex-heading-regexp (point-at-eol) t) (let* ((title (match-string-no-properties 4)) (tags (loop for tn in (org-get-local-tags) with td do (setf td (replace-regexp-in-string "_" " " (replace-regexp-in-string "@" "-" tn))) and collect (make-ob:tags :name td :safe (ob:sanitize-string td)))) (timestamp (apply (quote encode-time) (org-parse-time-string (or (org-entry-get ... "CLOSED") (time-stamp-string))))) (year (string-to-number (format-time-string "%Y" timestamp))) (month (string-to-number (format-time-string "%m" timestamp))) (day (string-to-number (format-time-string "%d" timestamp))) (category (or (org-entry-get (point) "category") (car (last (org-get-outline-path))) (org-entry-get (point) "ARCHIVE_OLPATH") (ob:blog-default-category BLOG))) (page (org-entry-get (point) "PAGE")) (filename (or (org-entry-get (point) "CUSTOM_ID") (ob:sanitize-string title))) (filepath (format "%s/%.4d/%.2d" category year month)) (htmlfile (format "%s/%.2d_%s.html" filepath day filename)) (content (ob-get-entry-text))) (when page (setq htmlfile page filename (file-name-sans-extension (file-name-nondirectory htmlfile)) filepath (file-name-directory htmlfile))) (make-ob:post :title title :tags tags :timestamp timestamp :year year :month month :day day :filename filename :filepath filepath :path-to-root (file-relative-name "." filepath) :htmlfile htmlfile :template (or (org-entry-get (point) "TEMPLATE") (if page "blog_static.html" "blog_post.html")) :content content :content-html (ob-export-string-to-html content) :category category)))
ob-parse-entry()
(save-current-buffer (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (ob-parse-entry))
(with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))
(list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)))
(nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))
(setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)))))
(while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--)))
(let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))
(catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer ... ... ...)))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))))
(block nil (let* ((--cl-var-- markers) (marker nil) (posts nil) (posts nil)) (while (consp --cl-var--) (setq marker (car --cl-var--)) (setq posts (nconc posts (list (with-current-buffer (marker-buffer marker) (goto-char ...) (ob-parse-entry))))) (setq --cl-var-- (cdr --cl-var--))) (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
(loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)) into posts finally return (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post))
(save-excursion (loop for marker in markers with posts = nil collect (with-current-buffer (marker-buffer marker) (goto-char (marker-position marker)) (ob-parse-entry)) into posts finally return (loop for post in (sort posts (quote ob-sort-posts-by-date)) with id = 0 do (setf (ob:post-id post) id) and do (incf id 1) and collect post)))
ob-parse-entries((#<marker at 364 in sample.org> #<marker at 5421 in sample.org> #<marker at 6466 in sample.org> #<marker at 6552 in sample.org> #<marker at 7898 in sample.org> #<marker at 10102 in sample.org> #<marker at 14718 in sample.org> #<marker at 18882 in sample.org> #<marker at 20218 in sample.org>))
(let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (let ((syncf (if (functionp (quote dired-do-sync)) (quote dired-do-sync) (quote copy-directory)))) (funcall syncf (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG))) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time)))))
(save-current-buffer (set-buffer (or (get-file-buffer file) (find-file file))) (run-hooks (quote o-blog-before-publish-hook)) (let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (let ((syncf (if (functionp (quote dired-do-sync)) (quote dired-do-sync) (quote copy-directory)))) (funcall syncf (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG))) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time))))))
(with-current-buffer (or (get-file-buffer file) (find-file file)) (run-hooks (quote o-blog-before-publish-hook)) (let* ((start-time (current-time)) (default-directory (file-name-directory file)) (BLOG (ob-parse-blog-headers)) (STATIC (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-static-filter BLOG) (quote file-with-archives)))) (POSTS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-posts-filter BLOG) (quote file-with-archives)))) (ALL-POSTS POSTS) (SNIPPETS (ob-parse-entries (org-map-entries (quote point-marker) (ob:blog-snippet-filter BLOG) (quote file-with-archives)))) (TAGS (ob-compute-tags POSTS))) (ob-write-static) (ob-write-posts) (ob-write-tags) (ob-write-index) (let ((syncf (if (functionp (quote dired-do-sync)) (quote dired-do-sync) (quote copy-directory)))) (funcall syncf (format "%s/%s" (ob:blog-template-dir BLOG) (ob:blog-style-dir BLOG)) (ob:blog-publish-dir BLOG))) (run-hooks (quote o-blog-after-publish-hook)) (message (format "Blog %s published in %ss" file (format-time-string "%s.%3N" (time-subtract (current-time) start-time))))))
org-publish-blog-sync("/home/yagnesh/o-blog/example/sample.org")
(if async (org-publish-blog-async file) (org-publish-blog-sync file))
org-publish-blog("/home/yagnesh/o-blog/example/sample.org" nil)
call-interactively(org-publish-blog record nil)
command-execute(org-publish-blog record)
smex-read-and-run(("eval-buffer" "org-publish-blog" "load-file" "org-reload" "rgrep" "org-version" "org-export" "magit-push" "el-get-install" "org2jekyll-new-post" "toggle-debug-on-error" "org-export-dispatch" "el-get-remove" "grep" "find-grep" "shell" "dan/switch-to-org-scratch" "add-file-local-variable" "customize-themes" "outline-minor-mode" "door-gnus" "magit-pull" "delete-this-file" "el-get-update" "el-get-self-update" "kill-rectangle" "reload-init-file" "org-export-generic" "semantic-decoration-mode" "imenu" "calculator" "insert-date" "message-mode" "semantic-show-parser-state-mode" "mediawiki-site" "org-indent-mode" "eval-region" "downcase-word" "ebib" "conf-mode" "yas/expand" "el-get-init" "boxquote-yank" "semantic-mode" "fundamental-mode" "max-emacs-x-window" "query-replace-regexp" "semantic-mru-bookmark-mode" "bbdb" "magit-status" ...))
smex()
call-interactively(smex nil nil)
recursive-edit()
debug(lambda)
* autopair-post-command-handler()
I have time-stamp-format is customized. because of that publishing is failed