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

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

[elpa] externals/auctex 9e1aa85 22/42: Make preview-latex parsing robust


From: Tassilo Horn
Subject: [elpa] externals/auctex 9e1aa85 22/42: Make preview-latex parsing robust to fix Bug#20773, Bug#27088
Date: Thu, 23 Nov 2017 06:06:11 -0500 (EST)

branch: externals/auctex
commit 9e1aa85d6d7ee84a12503a1dee62785c12e64ac1
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Make preview-latex parsing robust to fix Bug#20773, Bug#27088
    
    * preview.el.in (TeX-inline-preview-internal): Set environment
    variable max_print_line to sufficiently large value of 1000 so that
    LaTeX process does not insert newline in lines necessary to identify
    Bounding Boxes.
---
 preview.el.in | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/preview.el.in b/preview.el.in
index 8bde248..e09ef9a 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3537,19 +3537,25 @@ internal parameters, STR may be a log to insert into 
the current log."
       ((preview-format-name (shell-quote-argument
                             (preview-dump-file-name
                              (file-name-nondirectory master))))
+       (process-environment process-environment)
        (process
-       (TeX-run-command
-        "Preview-LaTeX"
-        (if (consp (cdr dumped-cons))
-            (preview-do-replacements
-             command
-             (append preview-undump-replacements
-                     ;; Since the command options provided in
-                     ;; (TeX-engine-alist) are dropped, give them
-                     ;; back.
-                     (list (list "\\`\\([^ ]+\\)"
-                           (TeX-command-expand "%(PDF)%(latex)" nil)))))
-          command) file)))
+       (progn
+         ;; Fix Bug#20773, Bug#27088.
+         ;; Make LaTeX not to insert newline in lines necessary to
+         ;; identify Bounding Boxes.
+         (setenv "max_print_line" "1000")
+         (TeX-run-command
+          "Preview-LaTeX"
+          (if (consp (cdr dumped-cons))
+              (preview-do-replacements
+               command
+               (append preview-undump-replacements
+                       ;; Since the command options provided in
+                       ;; (TeX-engine-alist) are dropped, give them
+                       ;; back.
+                       (list (list "\\`\\([^ ]+\\)"
+                                   (TeX-command-expand "%(PDF)%(latex)" 
nil)))))
+            command) file))))
     (condition-case err
        (progn
          (when str



reply via email to

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