* disabling doc-view mode
@ 2009-12-04 7:54 Tim X
2009-12-04 8:03 ` Klaus Straubinger
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Tim X @ 2009-12-04 7:54 UTC (permalink / raw)
To: help-gnu-emacs
Does anyone know how to disable/stop doc-view mode from attempting to
convert files when you are in dired and you hit view-file on a ps, pdf,
file? I seem to remember there was a variable you could set to disable
doc-view mode, but I cna't find it and there is nothing in the manual
about disabling it.
I'm running emacs 23 from CVS.
thanks,
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2009-12-04 7:54 disabling doc-view mode Tim X
@ 2009-12-04 8:03 ` Klaus Straubinger
2009-12-04 11:33 ` Tim X
2009-12-04 13:37 ` Tassilo Horn
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 13+ messages in thread
From: Klaus Straubinger @ 2009-12-04 8:03 UTC (permalink / raw)
To: help-gnu-emacs
Tim X <timx@nospam.dev.null> wrote:
> Does anyone know how to disable/stop doc-view mode from attempting to
> convert files when you are in dired and you hit view-file on a ps, pdf,
> file?
(rassq-delete-all #'doc-view-mode auto-mode-alist) did help for me,
at least in Emacs 23.1. This rather radical solution disables all
automatic choices of doc-view-mode, i.e., also for normal file opening.
--
Klaus Straubinger
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2009-12-04 8:03 ` Klaus Straubinger
@ 2009-12-04 11:33 ` Tim X
0 siblings, 0 replies; 13+ messages in thread
From: Tim X @ 2009-12-04 11:33 UTC (permalink / raw)
To: help-gnu-emacs
Klaus Straubinger <KSNetz@UseNet.ArcorNews.DE> writes:
> Tim X <timx@nospam.dev.null> wrote:
>
>> Does anyone know how to disable/stop doc-view mode from attempting to
>> convert files when you are in dired and you hit view-file on a ps, pdf,
>> file?
>
> (rassq-delete-all #'doc-view-mode auto-mode-alist) did help for me,
> at least in Emacs 23.1. This rather radical solution disables all
> automatic choices of doc-view-mode, i.e., also for normal file opening.
Thanks Klaus. that was all I had come up with as well. Seems it may be
the way to go if no other suggestions come up.
thanks.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2009-12-04 7:54 disabling doc-view mode Tim X
2009-12-04 8:03 ` Klaus Straubinger
@ 2009-12-04 13:37 ` Tassilo Horn
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 13+ messages in thread
From: Tassilo Horn @ 2009-12-04 13:37 UTC (permalink / raw)
To: help-gnu-emacs
Tim X <timx@nospam.dev.null> writes:
> Does anyone know how to disable/stop doc-view mode from attempting to
> convert files when you are in dired and you hit view-file on a ps, pdf,
> file?
I'm a bit curious. Which mode would you expect when trying to view an
ps/pdf/dvi file in emacs?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>]
* Re: disabling doc-view mode
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
@ 2009-12-04 14:48 ` Klaus Straubinger
2009-12-04 19:05 ` Stefan Monnier
2009-12-04 22:18 ` Tim X
2012-09-28 3:04 ` martensjd
2 siblings, 1 reply; 13+ messages in thread
From: Klaus Straubinger @ 2009-12-04 14:48 UTC (permalink / raw)
To: help-gnu-emacs
Tassilo Horn <tassilo@member.fsf.org> wrote:
> Tim X <timx@nospam.dev.null> writes:
>
>> Does anyone know how to disable/stop doc-view mode from attempting to
>> convert files when you are in dired and you hit view-file on a ps, pdf,
>> file?
>
> I'm a bit curious. Which mode would you expect when trying to view an
> ps/pdf/dvi file in emacs?
For PostScript, I would expect ps-mode, of course:
| (ps-mode)
|
| Major mode for editing PostScript with GNU Emacs.
Unfortunately, there are no specialized modes for editing PDF and DVI
files, so I would expect that a default mode for viewing binary files
is chosen.
--
Klaus Straubinger
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2009-12-04 14:48 ` Klaus Straubinger
@ 2009-12-04 19:05 ` Stefan Monnier
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2009-12-04 19:05 UTC (permalink / raw)
To: help-gnu-emacs
>>> Does anyone know how to disable/stop doc-view mode from attempting to
>>> convert files when you are in dired and you hit view-file on a ps, pdf,
>>> file?
>> I'm a bit curious. Which mode would you expect when trying to view an
>> ps/pdf/dvi file in Emacs?
> For PostScript, I would expect ps-mode, of course:
> | (ps-mode)
> | Major mode for editing PostScript with GNU Emacs.
I don't know about you, but that's what I get by default (and I can
then view it with doc-view via C-c C-c).
> Unfortunately, there are no specialized modes for editing PDF and DVI
> files, so I would expect that a default mode for viewing binary files
> is chosen.
You could use find-file-literally for that. Or of course
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . fundamental-mode))
(add-to-list 'auto-mode-alist '("\\.dvi\\'" . fundamental-mode))
-- Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
2009-12-04 14:48 ` Klaus Straubinger
@ 2009-12-04 22:18 ` Tim X
2012-09-28 3:04 ` martensjd
2 siblings, 0 replies; 13+ messages in thread
From: Tim X @ 2009-12-04 22:18 UTC (permalink / raw)
To: help-gnu-emacs
Tassilo Horn <tassilo@member.fsf.org> writes:
> Tim X <timx@nospam.dev.null> writes:
>
>> Does anyone know how to disable/stop doc-view mode from attempting to
>> convert files when you are in dired and you hit view-file on a ps, pdf,
>> file?
>
> I'm a bit curious. Which mode would you expect when trying to view an
> ps/pdf/dvi file in emacs?
>
I have my own conversion mode which I've been running for the past 9
years. The image rendering of files is of no use to me - I need the
files converted into plain text. Unfortunately, the two are treading on
each others toes. I know that I would probably be able to do something
with doc-view mode to give me what I want, but the mode I've written
also handles doc, docx, xls and ppt, plus integrates with browse-url so
that if I try to view-file on any of these types, it gives me a text
rendering that I can use. It is also a lot faster than doc-view.
I need it in text because I use emacspeak and it won't work with images.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
2009-12-04 14:48 ` Klaus Straubinger
2009-12-04 22:18 ` Tim X
@ 2012-09-28 3:04 ` martensjd
2012-09-28 7:40 ` Eli Zaretskii
` (2 more replies)
2 siblings, 3 replies; 13+ messages in thread
From: martensjd @ 2012-09-28 3:04 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: help-gnu-emacs
PS & PDF are text files, so I expect my text editor to open them as text files. I want to see the ASCII.
On Friday, December 4, 2009 8:37:38 AM UTC-5, Tassilo Horn wrote:
> Tim X <timx@nospam.dev.null> writes:
>
> > Does anyone know how to disable/stop doc-view mode from attempting to
> > convert files when you are in dired and you hit view-file on a ps, pdf,
> > file?
>
> I'm a bit curious. Which mode would you expect when trying to view an
> ps/pdf/dvi file in emacs?
>
> Bye,
> Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2012-09-28 3:04 ` martensjd
@ 2012-09-28 7:40 ` Eli Zaretskii
2012-09-28 8:44 ` Peter Dyballa
[not found] ` <mailman.9913.1348821910.855.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2012-09-28 7:40 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 27 Sep 2012 20:04:31 -0700 (PDT)
> From: martensjd@gmail.com
> Cc: help-gnu-emacs@gnu.org
>
> PS & PDF are text files, so I expect my text editor to open them as text files. I want to see the ASCII.
If they are text files, then how come Notepad or nedit don't show them
as text?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2012-09-28 3:04 ` martensjd
2012-09-28 7:40 ` Eli Zaretskii
@ 2012-09-28 8:44 ` Peter Dyballa
[not found] ` <mailman.9913.1348821910.855.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 13+ messages in thread
From: Peter Dyballa @ 2012-09-28 8:44 UTC (permalink / raw)
To: martensjd; +Cc: help-gnu-emacs
Am 28.09.2012 um 05:04 schrieb martensjd@gmail.com:
> PS & PDF are text files, so I expect my text editor to open them as text files. I want to see the ASCII.
Try something like:
(delete '("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
(Remove types you don't want to be touched by this customisation!)
Anyway, with C-c you can switch back to "ASCII" (and forth) and when you're fast enough (or your computer is slow) you can stop doc-view-mode from doing the conversion.
--
Greetings
Pete
»¿ʇı̣ əsnqɐ ʇ,uɐɔ noʎ ɟı̣
ɓuı̣ɥʇʎuɐ sı̣ pooɓ ʇɐɥʍ«
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.9913.1348821910.855.help-gnu-emacs@gnu.org>]
* Re: disabling doc-view mode
[not found] ` <mailman.9913.1348821910.855.help-gnu-emacs@gnu.org>
@ 2012-09-29 17:09 ` Stefan Monnier
2012-09-29 21:11 ` Peter Dyballa
2012-10-19 3:18 ` Kevin Rodgers
0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2012-09-29 17:09 UTC (permalink / raw)
To: help-gnu-emacs
> (delete '("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
This is pretty brittle. Rather than try to "remove behavior" it's often
easier to add behavior:
(add-to-list 'auto-mode-alist '("\\.ps\\'" . ps-mode))
You can also use M-x find-file-literally RET. Or of course use C-c C-c
to switch from doc-view-mode to the "other" mode (ps-mode,
fundamental-mode, ...).
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2012-09-29 17:09 ` Stefan Monnier
@ 2012-09-29 21:11 ` Peter Dyballa
2012-10-19 3:18 ` Kevin Rodgers
1 sibling, 0 replies; 13+ messages in thread
From: Peter Dyballa @ 2012-09-29 21:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
Am 29.09.2012 um 19:09 schrieb Stefan Monnier:
>> (delete '("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
>
> This is pretty brittle. Rather than try to "remove behavior" it's often
> easier to add behavior:
>
> (add-to-list 'auto-mode-alist '("\\.ps\\'" . ps-mode))
GNU Emacs 24.2.50 already has:
("\\.[eE]?[pP][sS]\\'" . ps-mode)
("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
GNU Emacs 23.4 already has:
("\\.[eE]?[pP][sS]\\'" . ps-mode)
("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
So it seems to me that Marten has something customised that PS files are opened in doc-view-mode…
--
Greetings
Pete
Hard Disk, n.:
A device that allows users to delete vast quantities of data with simple mnemonic commands.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: disabling doc-view mode
2012-09-29 17:09 ` Stefan Monnier
2012-09-29 21:11 ` Peter Dyballa
@ 2012-10-19 3:18 ` Kevin Rodgers
1 sibling, 0 replies; 13+ messages in thread
From: Kevin Rodgers @ 2012-10-19 3:18 UTC (permalink / raw)
To: help-gnu-emacs
On 9/29/12 11:09 AM, Stefan Monnier wrote:
>> (delete '("\\.\\(?:PDF\\|DVI\\|pdf\\|dvi\\)\\'" . doc-view-mode)
>
> This is pretty brittle. Rather than try to "remove behavior" it's often
> easier to add behavior:
>
> (add-to-list 'auto-mode-alist '("\\.ps\\'" . ps-mode))
Or:
(setq auto-mode-alist
(delq (rassq 'doc-view-mode auto-mode-alist) auto-mode-alist))
> You can also use M-x find-file-literally RET. Or of course use C-c C-c
> to switch from doc-view-mode to the "other" mode (ps-mode,
> fundamental-mode, ...).
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-19 3:18 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-04 7:54 disabling doc-view mode Tim X
2009-12-04 8:03 ` Klaus Straubinger
2009-12-04 11:33 ` Tim X
2009-12-04 13:37 ` Tassilo Horn
[not found] ` <mailman.12187.1259933898.2239.help-gnu-emacs@gnu.org>
2009-12-04 14:48 ` Klaus Straubinger
2009-12-04 19:05 ` Stefan Monnier
2009-12-04 22:18 ` Tim X
2012-09-28 3:04 ` martensjd
2012-09-28 7:40 ` Eli Zaretskii
2012-09-28 8:44 ` Peter Dyballa
[not found] ` <mailman.9913.1348821910.855.help-gnu-emacs@gnu.org>
2012-09-29 17:09 ` Stefan Monnier
2012-09-29 21:11 ` Peter Dyballa
2012-10-19 3:18 ` Kevin Rodgers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).