emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org c1bb68ab9d 1/3: ox: Make export errors more promine


From: ELPA Syncer
Subject: [elpa] externals/org c1bb68ab9d 1/3: ox: Make export errors more prominent
Date: Wed, 29 Mar 2023 10:58:28 -0400 (EDT)

branch: externals/org
commit c1bb68ab9d187a3c972e00fa9ab6773911a71f44
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    ox: Make export errors more prominent
    
    * lisp/ox-html.el (org-html-fontify-code):
    * lisp/ox-latex.el (org-latex-generate-engraved-preamble):
    (org-latex-inline-src-block):
    (org-latex-src-block):
    (org-latex-src--engrave-code):
    * lisp/ox-odt.el:
    (org-odt--table):
    (org-odt--translate-latex-fragments):
    (org-odt--export-wrap): Use `warn' instead of `message' when external
    dependency/tool is missing/fails.
---
 lisp/ox-html.el  |  4 ++--
 lisp/ox-latex.el | 14 +++++++-------
 lisp/ox-odt.el   | 14 +++++++-------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 82e266dde4..f1258d3850 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2326,9 +2326,9 @@ is the language used for CODE, as a string, or nil."
      ((not org-html-htmlize-output-type) (org-html-encode-plain-text code))
      ;; No htmlize library or an inferior version of htmlize.
      ((not (progn (require 'htmlize nil t)
-                 (fboundp 'htmlize-region-for-paste)))
+               (fboundp 'htmlize-region-for-paste)))
       ;; Emit a warning.
-      (message "Cannot fontify source block (htmlize.el >= 1.34 required)")
+      (warn "Cannot fontify source block (htmlize.el >= 1.34 required)")
       (org-html-encode-plain-text code))
      (t
       ;; Map language
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index cb152eb5ac..613a444ab9 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1374,7 +1374,7 @@ which are given by `org-latex-engraved-preamble' and
                         "\n"))
                (t (funcall gen-theme-spec engraved-theme))))
            (funcall gen-theme-spec engraved-theme))
-       (message "Cannot engrave source blocks. Consider installing 
`engrave-faces'.")
+       (warn "Cannot engrave source blocks. Consider installing 
`engrave-faces'.")
        "% WARNING syntax highlighting unavailable as engrave-faces-latex was 
missing.\n")
      "\n")))
 
@@ -2423,8 +2423,8 @@ contextual information."
       (`engraved (org-latex-inline-src-block--engraved info code lang))
       (`listings (org-latex-inline-src-block--listings info code lang))
       (oldval
-       (message "Please update the LaTeX src-block-backend to %s"
-                (if oldval "listings" "verbatim"))
+       (warn "Please update the LaTeX src-block-backend to %s"
+             (if oldval "listings" "verbatim"))
        (if oldval
            (org-latex-inline-src-block--listings info code lang)
          (org-latex--text-markup code 'code info))))))
@@ -3321,8 +3321,8 @@ contextual information."
          (`listings #'org-latex-src-block--listings)
          ((guard custom-env) #'org-latex-src-block--custom)
          (oldval
-          (message "Please update the LaTeX src-block-backend to %s"
-                   (if oldval "listings" "verbatim"))
+          (warn "Please update the LaTeX src-block-backend to %s"
+                (if oldval "listings" "verbatim"))
           (if oldval
               #'org-latex-src-block--listings
             #'org-latex-src-block--verbatim)))
@@ -3498,8 +3498,8 @@ to the Verbatim environment or Verb command."
                 (when lang-mode
                   (if (functionp lang-mode)
                       (funcall lang-mode)
-                    (message "Cannot engrave code as %s. %s is undefined."
-                             lang lang-mode)))
+                    (warn "Cannot engrave code as %s. %s is undefined."
+                          lang lang-mode)))
                 (engrave-faces-latex-buffer)))
              (engraved-code
               (with-current-buffer engraved-buffer
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index cf217c9e78..6a639d53d2 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -1009,7 +1009,7 @@ See `org-odt--build-date-styles' for implementation 
details."
              (setq exit-code (archive-zip-extract archive member))
              (buffer-string)))
       (unless (zerop exit-code)
-       (message command-output)
+       (warn command-output)
        (error "Extraction failed")))))
 
 ;;;; Target
@@ -3413,7 +3413,7 @@ contextual information."
     ;; such tables from export.
     (table.el
      (prog1 nil
-       (message
+       (warn
        (concat
         "(ox-odt): Found table.el-type table in the source Org file."
         "  table.el doesn't support export to ODT format."
@@ -3720,16 +3720,16 @@ contextual information."
        (if (and (fboundp 'org-format-latex-mathml-available-p)
                (org-format-latex-mathml-available-p))
           (setq processing-type 'mathml)
-        (message "LaTeX to MathML converter not available.")
+        (warn "LaTeX to MathML converter not available.  Falling back to 
verbatim.")
         (setq processing-type 'verbatim)))
       ((dvipng imagemagick)
        (unless (and (org-check-external-command "latex" "" t)
                    (org-check-external-command
                     (if (eq processing-type 'dvipng) "dvipng" "convert") "" t))
-        (message "LaTeX to PNG converter not available.")
+        (warn "LaTeX to PNG converter not available.  Falling back to 
verbatim.")
         (setq processing-type 'verbatim)))
       (otherwise
-       (message "Unknown LaTeX option.  Forcing verbatim.")
+       (warn "Unknown LaTeX option.  Forcing verbatim.")
        (setq processing-type 'verbatim)))
 
     ;; Store normalized value for later use.
@@ -4089,8 +4089,8 @@ contextual information."
        (error
        ;; Cleanup work directory and work files.
        (funcall --cleanup-xml-buffers)
-       (message "OpenDocument export failed: %s"
-                (error-message-string err))))))
+       (warn "OpenDocument export failed: %s"
+             (error-message-string err))))))
 
 
 ;;;; Export to OpenDocument formula



reply via email to

[Prev in Thread] Current Thread [Next in Thread]