summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2012-08-23 08:36:15 -0400
committerJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2012-08-23 08:40:47 -0400
commit44d68803d31fa2ea577030fdf86d274a38bbaf71 (patch)
tree234befc437aeda519d8ce6d5f383236c3db28c2b
parente759d34826b5d3e0b328aa9328aaf32c693d3779 (diff)
downloadorg-mode-44d68803d31fa2ea577030fdf86d274a38bbaf71.tar.gz
contrib/lisp/org-e-texinfo: Improve error reporting after makeinfo
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-collect-errors): Fixed error checking to actually return an error message.
-rw-r--r--contrib/lisp/org-e-texinfo.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/lisp/org-e-texinfo.el b/contrib/lisp/org-e-texinfo.el
index ac893ea..8256d44 100644
--- a/contrib/lisp/org-e-texinfo.el
+++ b/contrib/lisp/org-e-texinfo.el
@@ -1757,7 +1757,7 @@ Return INFO file name or an error if it couldn't be produced."
(set-window-configuration wconfig))))
(defun org-e-texinfo-collect-errors (buffer)
- "Collect some kind of errors from \"pdflatex\" command output.
+ "Collect some kind of errors from \"makeinfo\" command output.
BUFFER is the buffer containing output.
@@ -1765,9 +1765,9 @@ Return collected error types as a string, or nil if there was
none."
(with-current-buffer buffer
(save-excursion
- (goto-char (point-max))
+ (goto-char (point-min))
;; Find final "makeinfo" run.
- (when (re-search-backward "^makeinfo (GNU texinfo)" nil t)
+ (when t
(let ((case-fold-search t)
(errors ""))
(when (save-excursion
@@ -1786,8 +1786,11 @@ none."
(re-search-forward "requires a sectioning" nil t))
(setq errors (concat errors " [invalid section command]")))
(when (save-excursion
- (re-search-forward "[unexpected]" nil t))
+ (re-search-forward "\\[unexpected\]" nil t))
(setq errors (concat errors " [unexpected error]")))
+ (when (save-excursion
+ (re-search-forward "misplaced " nil t))
+ (setq errors (concat errors " [syntax error]")))
(and (org-string-nw-p errors) (org-trim errors)))))))
(provide 'org-e-texinfo)