bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4896: Doc-view-mode with View-mode


From: Stefan Monnier
Subject: bug#4896: Doc-view-mode with View-mode
Date: Mon, 01 Feb 2010 21:45:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

>>> (set (make-local-variable 'view-read-only) nil)
>> This still doesn't work in all cases.

No, but it's still a correct setting.

> Stefan, do you remember why you commented out this line?
> When `doc-view-mode' has this `mode-class' property, then
> viewing a PDF file from Dired doesn't activates View-mode.

Because I think that mode-class is for buffers whose content is
generated from a process or something like that, not from files.
Things like dired, pcl-cvs, ibuffer, shell-mode, compilation-mode, ...

> (And setting `view-read-only' to nil is not necessary anymore.)

Why not?

> Also I discovered another case: visiting a PDF file from a tar archive
> activates View-mode, because `tar-extract' tries to mimic `view-file'
> but ignores the `mode-class' property.  The patch below fixes this bug
> for tar-mode.el by duplicating more code from `view-file'.

> After feature freeze this duplicate code could be moved
> from `view-file' to `view-buffer'.

I think the right solution should be to let the major mode say
explicitly that it is mutually-exclusive with view-mode.  And it should
be a dynamic property: it should only apply when the ps/pdf/dvi document
is displayed as an image, not when it's displayed as text.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]