macos 更新至 12.1 后,emacs+skim 向前搜索

macos 更新至 12.1 后,emacs+skim 向前搜索

我有一台 mac mini M1,运行 macos 12.1、emacs(27.2 build 3),带有 auctex 13.0.14(elpa 包)和 Skim 1.6.6。

问题:emacs 中的 Cc Cc 可以编译,但无法将 Skim 作为查看器启动。正向搜索 Cc Cv 不起作用。Skim 上的反向搜索(command-Shift-right click)可以工作。

这是我的.emacs 文件:

(require 'tex-site)

(setq ns-pop-up-frames 'nil)


(set-face-attribute 'mode-line nil  :height 187)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
;(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)


(setq TeX-PDF-mode t)

;; Use Skim as viewer, enable source <-> PDF sync
;; make latexmk available via C-c C-c
;; Note: SyncTeX is setup via ~/.latexmkrc (see below)
(add-hook 'LaTeX-mode-hook (lambda ()
  (push
    '("latexmk" "latexmk -pdf %s" TeX-run-TeX nil t
      :help "Run latexmk on file")
    TeX-command-list)))
(add-hook 'TeX-mode-hook '(lambda () (setq TeX-command-default "latexmk")))

;; use Skim as default pdf viewer
;; Skim's displayline is used for forward search (from .tex to .pdf)
;; option -b highlights the current line; option -g opens Skim in the background  
(setq TeX-view-program-selection '((output-pdf "PDF Viewer")))
(setq TeX-view-program-list
'(("PDF Viewer" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")))

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(TeX-source-correlate-method 'synctex)
 '(TeX-source-correlate-mode t)
 '(TeX-source-correlate-start-server t)
 '(column-number-mode t)
 '(display-time-mode t)
 '(package-selected-packages '(auctex auctex-latexmk))
 '(show-paren-mode t)
 '(size-indication-mode t))

(server-start); start emacs in server mode so that skim can talk to it

我刚刚将 macos 从 12.01 更新到 12.1。

知道哪里出了问题吗?

相关内容