Windows 10/11にGNU Emacs ,YaTeXを入れています。Emacsを28にしたところ日本語ファイル名のTeXファイルをCtrl+C,T,Dでタイプセットしようとするとエラーが出るようになりました。と思ったら,Emacs 26.3に戻しても同じ症状です。
Call `platex テスト.tex'
This is e-pTeX, Version 3.141592653-p4.0.0-220214-2.6 (utf8.sjis) (TeX Live 2022) (preloaded format=platex)
restricted \write18 enabled.
entering extended mode
! I can't find file `郢昴 縺帷ケ昴 tex'.
<*> 郢昴 縺帷ケ昴 tex
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
ここで「テスト」と入力すればタイプセットが進行します。
コマンドプロンプトで
latex テスト
とすれば
platex テスト.tex
This is e-pTeX, Version 3.141592653-p4.0.0-220214-2.6 (utf8.sjis) (TeX Live 2022) (preloaded format=platex)
restricted \write18 enabled.
entering extended mode
(./テスト.tex(guessed encoding: UTF-8 = utf8)
pLaTeX2e <2021-11-15> (based on LaTeX2e <2022-06-01> patch level 5)
L3 programming layer <2022-08-05>
(c:/texlive/2022/texmf-dist/tex/platex/jsclasses/jsarticle.cls(guessed encoding: UTF-8 = utf8)
Document Class: jsarticle 2021/06/28 jsclasses (okumura, texjporg)
(c:/texlive/2022/texmf-dist/tex/platex/jsclasses/jslogo.sty))
(c:/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./テスト.aux) [1] (./テスト.aux) )
Output written on テスト.dvi (1 page, 340 bytes).
Transcript written on テスト.log.
と正しく実行されます。
init.elは
(set-language-environment "Japanese")
(set-default-coding-systems 'utf-8)
(prefer-coding-system 'utf-8)
(setq inhibit-startup-screen t)
;;
;; YaTeX
;;
(add-to-list 'load-path "~/.emacs.d/yatex")
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
(setq auto-mode-alist
(append '(("\\.tex$" . yatex-mode)
("\\.ltx$" . yatex-mode)
("\\.cls$" . yatex-mode)
("\\.sty$" . yatex-mode)
("\\.clo$" . yatex-mode)
("\\.bbl$" . yatex-mode)) auto-mode-alist))
(setq tex-command "platex")
(setq dvi2-command "SumatraPDF")
(setq dviprint-command-format "dvipdfmx %s")
(setq bibtex-command "latexmk -e \"$latex=q/uplatex %O -kanji=utf8 -no-guess-input-enc -synctex=1 %S/\" -e \"$bibtex=q/upbibtex %O %B/\" -e \"$biber=q/biber %O --bblencoding=utf8 -u -U --output_safechars %B/\" -e \"$makeindex=q/upmendex %O -o %D %S/\" -e \"$dvipdf=q/dvipdfmx %O -o %D %S/\" -norc -gg -pdfdvi")
(setq makeindex-command "latexmk -e \"$latex=q/uplatex %O -kanji=utf8 -no-guess-input-enc -synctex=1 %S/\" -e \"$bibtex=q/upbibtex %O %B/\" -e \"$biber=q/biber %O --bblencoding=utf8 -u -U --output_safechars %B/\" -e \"$makeindex=q/upmendex %O -o %D %S/\" -e \"$dvipdf=q/dvipdfmx %O -o %D %S/\" -norc -gg -pdfdvi")
(setq dvi2-command "rundll32 shell32,ShellExec_RunDLL SumatraPDF -reuse-instance")
(setq tex-pdfview-command "rundll32 shell32,ShellExec_RunDLL SumatraPDF -reuse-instance")
(defun fwdsumatrapdf-forward-search ()
(interactive)
(progn
(process-kill-without-query
(start-process
"fwdsumatrapdf"
nil
"fwdsumatrapdf"
(expand-file-name
(concat (file-name-sans-extension (or YaTeX-parent-file
(save-excursion
(YaTeX-visit-main t)
buffer-file-name)))
".pdf"))
(buffer-name)
(number-to-string (save-restriction
(widen)
(count-lines (point-min) (point))))))))
(add-hook 'yatex-mode-hook
'(lambda ()
(define-key YaTeX-mode-map (kbd "C-c f") 'fwdsumatrapdf-forward-search)))
(add-hook 'yatex-mode-hook
'(lambda ()
(auto-fill-mode -1)))
;;
;; RefTeX with YaTeX
;;
;(add-hook 'yatex-mode-hook 'turn-on-reftex)
(add-hook 'yatex-mode-hook
'(lambda ()
(reftex-mode 1)
(define-key reftex-mode-map (concat YaTeX-prefix ">") 'YaTeX-comment-region)
(define-key reftex-mode-map (concat YaTeX-prefix "<") 'YaTeX-uncomment-region)))
;; (defun string-to-int (string &optional base)
;; (string-to-number string base))
です。