diff options
author | Sébastien Delafond <sdelafond@gmail.com> | 2016-11-07 10:41:54 +0100 |
---|---|---|
committer | Sébastien Delafond <sdelafond@gmail.com> | 2016-11-07 10:41:54 +0100 |
commit | 1a7cd65ca362047cd97d4127d49108994baebc6c (patch) | |
tree | f18735f3b77120ef2e91043f2f662b03e47ccbb0 /contrib/lisp/ox-groff.el | |
parent | 55074078ca876273e3fa58ee6838cba90d2b6100 (diff) | |
parent | ec84430cf4e09ba25ec675debdf802bc28111e06 (diff) |
Merge tag 'upstream/9.0'
Upstream version 9.0
Diffstat (limited to 'contrib/lisp/ox-groff.el')
-rw-r--r-- | contrib/lisp/ox-groff.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el index 6489ee7..c83d44d 100644 --- a/contrib/lisp/ox-groff.el +++ b/contrib/lisp/ox-groff.el @@ -92,7 +92,6 @@ (underline . org-groff-underline) (verbatim . org-groff-verbatim) (verse-block . org-groff-verse-block)) - :export-block "GROFF" :menu-entry '(?g "Export to GROFF" ((?g "As GROFF file" org-groff-export-to-groff) @@ -1066,9 +1065,7 @@ contextual information." (let* ((code (org-element-property :value inline-src-block))) (cond (org-groff-source-highlight - (let* ((tmpdir (if (featurep 'xemacs) - temp-directory - temporary-file-directory)) + (let* ((tmpdir temporary-file-directory) (in-file (make-temp-name (expand-file-name "srchilite" tmpdir))) (out-file (make-temp-name @@ -1489,9 +1486,7 @@ contextual information." (custom-env (and lang (cadr (assq (intern lang) org-groff-custom-lang-environments)))) - (num-start (case (org-element-property :number-lines src-block) - (continued (org-export-get-loc src-block info)) - (new 0))) + (num-start (org-export-get-loc src-block info)) (retain-labels (org-element-property :retain-labels src-block)) (caption (and (not (org-export-read-attribute :attr_groff src-block :disable-caption)) @@ -1507,9 +1502,7 @@ contextual information." ;; Case 2. Source fontification. (org-groff-source-highlight - (let* ((tmpdir (if (featurep 'xemacs) - temp-directory - temporary-file-directory)) + (let* ((tmpdir temporary-file-directory) (in-file (make-temp-name (expand-file-name "srchilite" tmpdir))) (out-file (make-temp-name @@ -1903,6 +1896,7 @@ Return PDF file name or an error if it couldn't be produced." (let* ((base-name (file-name-sans-extension (file-name-nondirectory file))) (full-name (file-truename file)) (out-dir (file-name-directory file)) + (time (current-time)) ;; Properly set working directory for compilation. (default-directory (if (file-name-absolute-p file) (file-name-directory full-name) @@ -1937,7 +1931,12 @@ Return PDF file name or an error if it couldn't be produced." (let ((pdffile (concat out-dir base-name ".pdf"))) ;; Check for process failure. Provide collected errors if ;; possible. - (if (not (file-exists-p pdffile)) + (if (or (not (file-exists-p pdffile)) + ;; Only compare times up to whole seconds as some + ;; filesystems (e.g. HFS+) do not retain any finer + ;; granularity. + (time-less-p (cl-subseq (nth 5 (file-attributes pdffile)) 0 2) + (cl-subseq time 0 2))) (error (concat (format "PDF file %s wasn't produced" pdffile) (when errors (concat ": " errors)))) ;; Else remove log files, when specified, and signal end of |