[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex ff08d38 28/48: Fix region compila
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [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
+ ;; nuexpanded, 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)
- [AUCTeX-diffs] [elpa] externals/auctex cad042f 31/48: Add note and test about the change involving non-ascii file name, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex cad042f 31/48: Add note and test about the change involving non-ascii file name, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 7371b46 07/48: Add support for dvipdfmx to \includegraphics, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 00f0e0e 13/48: ; * tex.el (TeX-expand-list): Fix docstring (bug#31217)., Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 68095a3 15/48: Fix previous removal of xemacs compatibility code, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 59a9e5b 10/48: Correct how `TeX-record-buffer' is used, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 4816092 36/48: Fix possible endless loop, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 527bcb2 16/48: ; * doc/auctex.texi (Processor Options): Add note of case in an option., Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex c64a0e1 27/48: Quote %b expansion string for Zathura, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 0d5c1c0 41/48: ; Fix last commit and push missing Makefile.in., Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex a59c754 35/48: Adjust test for known emacs bug, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex ff08d38 28/48: Fix region compilation with \usepackage[utf8]{inputenc},
Tassilo Horn <=
- [AUCTeX-diffs] [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
- [AUCTeX-diffs] [elpa] externals/auctex 1a7b2bf 18/48: Adjust coding system for Japanese pTeX engine on w32, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 03ba1fa 43/48: Add new style/ocg-p.el and style/ocgx.el, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex cff843b 17/48: Remove obsolete option related to Japanese TeX, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 3741b8c 26/48: Prepare for UTF-8 with BOM, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 94378c1 09/48: Correct record in changes.texi, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 96ba113 23/48: Support UTF-8 with BOM in Japanese TeX documents, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 3b1ffcd 30/48: TL 2018 non-ascii file name fix for preview-latex, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex a8ea127 29/48: Accept non-ascii file name in accord with change in TL 2018, Tassilo Horn, 2018/09/16
- [AUCTeX-diffs] [elpa] externals/auctex 8d30dc1 37/48: Add new style/marginnote.el, Tassilo Horn, 2018/09/16