From: Tassilo Horn <tassilo@member.fsf.org>
To: "Roland Winkler" <Roland.Winkler@physik.uni-erlangen.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Viewing PDFs as text?
Date: Tue, 27 Jan 2009 10:33:10 +0100 [thread overview]
Message-ID: <87eiypum95.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <18814.14582.709582.561692@tfkp04.physik.uni-erlangen.de> (Roland Winkler's message of "Mon, 26 Jan 2009 23:28:06 +0100")
"Roland Winkler" <Roland.Winkler@physik.uni-erlangen.de> writes:
> On Mon Jan 26 2009 Tassilo Horn wrote:
>> Samuel Wales <samologist@gmail.com> writes:
>>
>> >> `C-c C-t' once to get the pure text contents, right? ;-)
>> >
>> > Please explain? This works for the 3 use cases of w3m, ido, and org
>> > invocations?
>>
>> No, no. Only for pdf/ps/dvi files with emacs 23. There you can do
>>
>> C-x C-f /path/to/file RET
>>
>> which openes the file with doc-view, and `C-c C-t' will open a buffer
>> with the plain text contents then.
>
> Somehow I am missing the point. How is this supposed to work from
> within something like emacs-w3m when I have only a tty?
Emacs-w3m issues
(find-file "file-or-url")
and if it is a PDF/DVI/PS, it'll be opened with doc-view. If you are on
a tty then you cannot see the image but the pdf contents, which is not
really useful. But with C-c C-t you'll get a new buffer with just the
plain text contents.
> Currently, to the best of my knowledge, emacs-w3m doesn't know what to
> do with pdf files when emacs 23 is running in a tty. I still don't
> see why doc-view should not handle this, even if it gives only a
> minimalistic set of features. Of course, one could incorporate such a
> feature also into emacs-w3m itself. But that appears to be the wrong
> place to me. (The next package dealing with pdf files similar to
> emacs-w3m would have to reinvent the wheel.)
The right thing to to would be to modify `auto-mode-alist' and
`find-file' to allow the former to contain predicates, like:
(if window-system
'doc-view-mode
'externally)
where externally would mean use the systems default external
application.
Then this behavior is centralized and not each mode which needs some
feature has to handle it itself.
Bye,
Tassilo
next prev parent reply other threads:[~2009-01-27 9:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 20:52 Viewing PDFs as text? Alan
2008-03-10 22:59 ` Peter Dyballa
[not found] ` <mailman.8684.1205189951.18990.help-gnu-emacs@gnu.org>
2008-03-11 3:42 ` Roland Winkler
2008-03-11 7:45 ` Tassilo Horn
[not found] ` <mailman.8699.1205221811.18990.help-gnu-emacs@gnu.org>
2008-03-11 13:11 ` Roland Winkler
2008-03-12 13:45 ` Tassilo Horn
2008-03-13 3:37 ` Bastien
2008-03-13 9:29 ` Tassilo Horn
2008-03-13 10:09 ` Bastien
2008-03-13 10:30 ` Tassilo Horn
2008-03-13 18:32 ` Tassilo Horn
2008-03-13 18:45 ` Bastien Guerry
2008-03-13 11:49 ` Emacs 23 and msb.el Guy Durrieu
2008-11-06 6:36 ` Emacs 23: strange character display Guy Durrieu
2008-11-06 7:48 ` Paul R
2008-11-06 13:12 ` Guy Durrieu
[not found] ` <mailman.8756.1205329519.18990.help-gnu-emacs@gnu.org>
2008-03-12 15:38 ` Viewing PDFs as text? Roland Winkler
2008-03-18 22:47 ` Roland Winkler
2008-03-19 10:09 ` Tassilo Horn
2008-03-19 14:48 ` Roland Winkler
2008-03-19 21:08 ` Tassilo Horn
[not found] ` <mailman.9221.1205960921.18990.help-gnu-emacs@gnu.org>
2008-03-19 23:54 ` Roland Winkler
2008-03-20 20:25 ` Tassilo Horn
2009-01-26 0:05 ` Roland Winkler
[not found] ` <87eiyqpjg1.fsf@thinkpad.tsdh.de>
2009-01-26 19:14 ` Samuel Wales
2009-01-26 19:48 ` Tassilo Horn
2009-01-26 19:52 ` Samuel Wales
2009-01-26 20:37 ` Tassilo Horn
2009-01-26 20:47 ` Samuel Wales
2009-01-27 9:11 ` Tassilo Horn
2009-01-26 22:28 ` Roland Winkler
2009-01-27 9:33 ` Tassilo Horn [this message]
2009-01-26 22:28 ` Drew Adams
2009-01-27 9:10 ` Tassilo Horn
2008-03-11 7:43 ` Tassilo Horn
2008-03-11 8:07 ` Tim X
2008-03-20 6:19 ` Alan
2008-03-20 8:50 ` Tim X
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eiypum95.fsf@thinkpad.tsdh.de \
--to=tassilo@member.fsf.org \
--cc=Roland.Winkler@physik.uni-erlangen.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).