0

假设我想在 emacs 中打开 pdf 文件。使用 Cx Cf 在 emacs gui 中非常容易。但是当我在 emacs -nw 中使用它时。它显示代码而不是文档。我怎样才能做到这一点?谢谢你。

4

1 回答 1

0

如果您只想将 pdf 作为文本阅读,则可以使用 pdf2txt 和此功能对其进行点缀:

(defun open-pdf-in-txt (arg)
    (interactive "fpdf: ")
    (shell-command
     (format (concat "pdftotext " (replace-regexp-in-string " " "?\ " arg) " -layout")))
    (find-file (replace-regexp-in-string "pdf" "txt" arg)))
于 2015-10-27T15:11:04.960 回答