blog/content/post/2007/09/01/2007-09-01-00000600.md

4.4 KiB
Raw Blame History

title author date url wordtwit_post_info categories
Doc-Viewモード kazu634 2007-09-01 /2007/09/01/_644/
O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:3205;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}
Emacs

 Emacsを使い始めて、段々とその便利さがわかってきた。現在はLaTeXで修論を書いているのですが、LaTeXの打ち込みとコンパイルまでを一括して処理してくれています。

 そんな感じで便利さを体感していると、なんとEmacsでPDFを閲覧できることを知りました。使ってみると、Windowsでは使えない文字で作業用ファイルを書き込もうとしていて、PDFが閲覧できませんでした(..;)どうにかならんのかと検索していたら、すでに他の人も作者の人に指摘済みでした(→doc-view.el — View PDF/PostStript/DVI files in Emacs:

[ Crosspost & Followup-To: gnu.emacs.help ]

On Wed, Aug 22 2007, Tassilo Horn wrote:

> (defcustom doc-view-cache-directory “/tmp/doc-view”

Maybe use `temporary-file-directory or `make-temp-name.

>   “The base directory, where the PNG imoges will be saved.”
                                       images

> (defun doc-view-file-name-to-directory-name (file)
>   “Return the directory where the png files of FILE should be saved.
>
> Ita a subdirectory of `doc-view-cache-directory.”
>   (concat (directory-file-name doc-view-cache-directory)
>           “/”
>           (replace-regexp-in-string “/” “!” file)))

Probably not portable, I think.  Windows users may set the directory
to “c: ooar”.  Maybe you could do like the package formerly knows
as `tumme.el does it.  Ah, its `image-dired.el now:
`image-dired-thumb-name.

> (defun doc-view-convert-file (file)
[…]
>   (let* *1
>          (png-file (concat dir “/” “page.png”)))

,—-[ (info “(elisp)Directory Names”) ]
|    If you want to use a directory file name in making such a
| combination, you must first convert it to a directory name using
| `file-name-as-directory:
|
|      (concat (file-name-as-directory DIRFILE) RELFILE)
|
| Dont try concatenating a slash by hand, as in
|
|      ;;; Wrong!
|      (concat DIRFILE “/” RELFILE)
|
| because this is not portable.  Always use `file-name-as-directory.
`—-

Bye, Reiner.

 というわけで、もう一度elispを導入してみようと思う。

*1dir (doc-view-file-name-to-directory-name file