[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4896: DocView: Continuous mode
From: |
Juri Linkov |
Subject: |
bug#4896: DocView: Continuous mode |
Date: |
Wed, 16 Dec 2009 11:23:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (x86_64-pc-linux-gnu) |
>> Maybe we should switch off view-mode in doc-view-mode explicitly? IMO
>> doc-view-mode is THE view-mode for PDF/DVI/PS files...
>
> Thanks. It seems your fix doesn't work. The reason is that
> `after-find-file' calls `view-mode-enter' *after* calling
> `doc-view-mode' via `normal-mode'.
>
> However, adding the following line to the end of `doc-view-mode'
> seems to work (because `after-find-file' checks for `view-read-only'
> before calling `view-mode-enter'):
>
> (set (make-local-variable 'view-read-only) nil)
This still doesn't work in all cases. Typing `v' on a PDF file in Dired
activates View-mode (I type RET in Dired when the intention is to *edit*
the file, and type `v' when the intention is to *view* the file).
Doc-view-mode has no chance to disable view-mode, because view-file
(called from dired-view-file) at first visits the file with
find-file-noselect that enables doc-view-mode, and after that
view-file enables view-mode.
View-file doesn't enable view-mode only when the property `mode-class' is
`special'. Actually lisp/doc-view.el already contains the necessary line,
but it is commented out:
;; (put 'doc-view-mode 'mode-class 'special)
I wonder what was the reason for commenting this out?
--
Juri Linkov
http://www.jurta.org/emacs/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#4896: DocView: Continuous mode,
Juri Linkov <=