[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ff08d38 28/48: Fix region compilation with \usep
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex ff08d38 28/48: Fix region compilation with \usepackage[utf8]{inputenc} |
Date: |
Sun, 16 Sep 2018 01:47:24 -0400 (EDT) |
branch: externals/auctex
commit ff08d38666f10050f93b6cc4c5777420f30a0409
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix region compilation with \usepackage[utf8]{inputenc}
* tex-buf.el (TeX-quote-filename): Wrap non-ascii characters in
\unexpanded{} for non UTF-8 LaTeX so that raw file name is recovered.
---
tex-buf.el | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/tex-buf.el b/tex-buf.el
index ad6dad6..eed31f2 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -2032,7 +2032,33 @@ The hooks are run in the region buffer, you may use the
variable
(while (setq pos (string-match "[~#]" file pos))
(setq file (replace-match "\\\\string\\&" t nil file 0)
pos (+ pos 8))))
- file)
+ ;; Use \unexpanded so that \message outputs the raw file name.
+ ;; When \usepackage[utf8]{inputenc} is used in standard (pdf)latex,
+ ;; \message does not output non-ascii file name in raw form without
+ ;; \enuexpanded, which makes AUCTeX to fail to recognize the file
+ ;; names right when analysing the process output buffer.
+ ;; Note that \usepackage[utf8]{inputenc} is enabled by default in
+ ;; standard (pdf)latex since TeXLive 2018.
+ (if (and (memq major-mode '(latex-mode doctex-mode))
+ ;; Japanese upLaTeX requires the same treatment with
+ ;; respect to non-ascii characters other than Japanese, in
+ ;; file names within \message{}.
+ ;; However, pLaTeX (non u- version) does not support
+ ;; non-ascii file name encoded in UTF-8. So considering
+ ;; `ptex' doesn't make sense here. We cater for only
+ ;; `default' and `uptex' engines.
+ (memq TeX-engine '(default uptex)))
+ ;; It would fail to put entire `file' inside \unexpanded{} when
+ ;; the above loop injects \string before "#" and "~". So put
+ ;; only multibyte characters inside \unexpanded{}.
+ ;; It is safe in upLaTeX to use \unexpanded{} on Japanese
+ ;; characters though they are handled by upLaTeX in a totally
+ ;; different way from inputenc.
+ ;; Thus put all multibyte characters, without considering
+ ;; whether they are Japanese or not, inside \unexpanded{}.
+ (replace-regexp-in-string "[[:multibyte:]]+"
+ "\\\\unexpanded{\\&}" file t)
+ file))
(defvar font-lock-mode-enable-list)
(defvar font-lock-auto-fontify)
- [elpa] externals/auctex c64a0e1 27/48: Quote %b expansion string for Zathura, (continued)
- [elpa] externals/auctex c64a0e1 27/48: Quote %b expansion string for Zathura, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 4775f96 21/48: ; * tex-jp.el (japanese-TeX-self-insert-command): Silence byte compiler., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 96ba113 23/48: Support UTF-8 with BOM in Japanese TeX documents, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex d5f98ae 32/48: ; Fix typos, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 3b1ffcd 30/48: TL 2018 non-ascii file name fix for preview-latex, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 0d8f8a2 14/48: Prevent spurious newlines to be added, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 527bcb2 16/48: ; * doc/auctex.texi (Processor Options): Add note of case in an option., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 7371b46 07/48: Add support for dvipdfmx to \includegraphics, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 4afd633 11/48: Update key=val options to geometry package v5.8, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 6a17a52 24/48: ; * doc/changes.texi (News in 12.2): Add news about removed option., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex ff08d38 28/48: Fix region compilation with \usepackage[utf8]{inputenc},
Tassilo Horn <=
- [elpa] externals/auctex cad042f 31/48: Add note and test about the change involving non-ascii file name, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 5ce08ab 33/48: Raise robustness of call of dvipng command, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 3741b8c 26/48: Prepare for UTF-8 with BOM, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 4816092 36/48: Fix possible endless loop, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 74c4843 40/48: Add new style/thmtools.el and style/thm-restate.el, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex ff8f183 39/48: ; * style/floatrow.el (LaTeX-floatrow-update-key-val-options): Use `setq' inside the loop., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex e0caf59 25/48: Drop compatibility code for older emacsen in preview-latex, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 1fef01c 45/48: Update style/lettrine.el to package version 2.01, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex cff843b 17/48: Remove obsolete option related to Japanese TeX, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a59c754 35/48: Adjust test for known emacs bug, Tassilo Horn, 2018/09/16