소스 검색

ox-publish: Fix "Invalid time specification" error with timestamps in DATE

* lisp/ox-publish.el (org-publish-find-date): Fix "Invalid time
  specification" error with timestamps in DATE.
Nicolas Goaziou 12 년 전
부모
커밋
1ce00aaffd
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      lisp/ox-publish.el

+ 4 - 1
lisp/ox-publish.el

@@ -829,7 +829,10 @@ modification time.  Return time in `current-time' format."
     (cond ((eq (org-element-type date) 'timestamp)
 	   (org-time-string-to-time (org-element-interpret-data date)))
 	  ((let ((ts (and (consp date) (assq 'timestamp date))))
-	     (and ts (org-string-nw-p (org-element-interpret-data ts)))))
+	     (and ts
+		  (let ((value (org-element-interpret-data ts)))
+		    (and (org-string-nw-p value)
+			 (org-time-string-to-time value))))))
 	  ((file-exists-p file) (nth 5 (file-attributes file)))
 	  (t (error "No such file: \"%s\"" file)))))