* viewing `application/octet-stream' MIME parts
@ 2011-09-20 20:06 Peter Münster
2011-09-20 20:16 ` Adam Sjøgren
2011-09-20 23:05 ` Katsumi Yamaoka
0 siblings, 2 replies; 7+ messages in thread
From: Peter Münster @ 2011-09-20 20:06 UTC (permalink / raw)
To: ding
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hello,
How can I view such MIME parts in-line?
The manual says:
If builtin viewers can not display the object, Gnus resorts to
external viewers in the ‘mailcap’ files.
So I created a ~/.mailcap file (just for testing):
--8<---------------cut here---------------start------------->8---
application/pdf; pdftotext %s -; copiousoutput # no problem here
application/octet-stream; pdftotext %s -; copiousoutput # does not work
--8<---------------cut here---------------end--------------->8---
When a pdf attachment has the content type `application/pdf', there is
no problem, but if it's `application/octet-stream', then emacs wants to
save the file (`Save MIME part to ...'), when pressing RET.
Please find attached 2 pdf files, one with content type
`application/pdf' and the other with `application/octet-stream' as
example.
TIA for any help!
--
Peter
[-- Attachment #2: test file 1 --]
[-- Type: application/pdf, Size: 5433 bytes --]
[-- Attachment #3: test file 2 --]
[-- Type: application/octet-stream, Size: 5433 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-20 20:06 viewing `application/octet-stream' MIME parts Peter Münster
@ 2011-09-20 20:16 ` Adam Sjøgren
2011-09-20 21:05 ` Peter Münster
2011-09-20 23:05 ` Katsumi Yamaoka
1 sibling, 1 reply; 7+ messages in thread
From: Adam Sjøgren @ 2011-09-20 20:16 UTC (permalink / raw)
To: ding
On Tue, 20 Sep 2011 22:06:38 +0200, Peter wrote:
> When a pdf attachment has the content type `application/pdf', there is
> no problem, but if it's `application/octet-stream', then emacs wants to
> save the file (`Save MIME part to ...'), when pressing RET.
I usually use "View interactively (v)" and tell Gnus what viewer to use,
or use "View as type (t)", where Gnus often guesses the type correctly.
It happens seldom enough that I use the mouse and right-click on the
attachment, I'm afraid.
:-),
Adam
--
"You make a fair point. Knowing when not to say Adam Sjøgren
anything is not something the lazyweb had asjo@koldfront.dk
historically been good at."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-20 20:16 ` Adam Sjøgren
@ 2011-09-20 21:05 ` Peter Münster
2011-09-20 22:21 ` Adam Sjøgren
0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2011-09-20 21:05 UTC (permalink / raw)
To: ding
On Tue, Sep 20 2011, Adam Sjøgren wrote:
> I usually use "View interactively (v)" and tell Gnus what viewer to
> use,
Did you try it? When I enter "pdftotext %s -", nothing happens
> or use "View as type (t)", where Gnus often guesses the type correctly.
Indeed, this works. But IMO, Gnus should use the mailcap entry for
application/octet-stream just the same way as any other entry.
So the question is, why doesn't Gnus use this mailcap entry?
Nevertheless, thanks for the "View as type", it's a nice workaround!
> It happens seldom enough that I use the mouse and right-click on the
> attachment, I'm afraid.
For me it happens never, always TAB and RET...
(the mouse is too far away)
;)
--
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-20 21:05 ` Peter Münster
@ 2011-09-20 22:21 ` Adam Sjøgren
2011-09-21 7:50 ` Peter Münster
0 siblings, 1 reply; 7+ messages in thread
From: Adam Sjøgren @ 2011-09-20 22:21 UTC (permalink / raw)
To: ding
On Tue, 20 Sep 2011 23:05:41 +0200, Peter wrote:
> On Tue, Sep 20 2011, Adam Sjøgren wrote:
>> I usually use "View interactively (v)" and tell Gnus what viewer to
>> use,
> Did you try it? When I enter "pdftotext %s -", nothing happens
I just entered "evince" at the "Viewer:"-prompt and saw a PDF with
"Hello world!" in it in the Evince-window that opened.
>> or use "View as type (t)", where Gnus often guesses the type
>> correctly.
> Indeed, this works. But IMO, Gnus should use the mailcap entry for
> application/octet-stream just the same way as any other entry.
That would be nice. On the other hand, the sender _did_ say that this
was just some arbitrary octets...
Best regards,
Adam
--
"You make a fair point. Knowing when not to say Adam Sjøgren
anything is not something the lazyweb had asjo@koldfront.dk
historically been good at."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-20 20:06 viewing `application/octet-stream' MIME parts Peter Münster
2011-09-20 20:16 ` Adam Sjøgren
@ 2011-09-20 23:05 ` Katsumi Yamaoka
1 sibling, 0 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2011-09-20 23:05 UTC (permalink / raw)
To: ding
pmlists@free.fr (Peter Münster) wrote:
> How can I view such MIME parts in-line?
[...]
> [5. test file 2 --- application/octet-stream; test.pdf]...
Try `t' on the button and you will be prompted for another MIME
type (it will likely default to application/pdf).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-20 22:21 ` Adam Sjøgren
@ 2011-09-21 7:50 ` Peter Münster
2011-09-21 7:59 ` Adam Sjøgren
0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2011-09-21 7:50 UTC (permalink / raw)
To: ding
On Wed, Sep 21 2011, Adam Sjøgren wrote:
>> Did you try it? When I enter "pdftotext %s -", nothing happens
>
> I just entered "evince" at the "Viewer:"-prompt and saw a PDF with
> "Hello world!" in it in the Evince-window that opened.
Indeed, but I wanted it inline as text ...
> That would be nice. On the other hand, the sender _did_ say that this
> was just some arbitrary octets...
The sender just uses the "attach-file" function in his buggy MUA, and
the MUA does it wrong... :(
But anyway, I can always filter the arbitrary octets through a command
in my mailcap entry.
So my opinion is still: "RET" for viewing the MIME part using the
mailcap and "o" for saving it, and no exception for
application/octet-stream.
--
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: viewing `application/octet-stream' MIME parts
2011-09-21 7:50 ` Peter Münster
@ 2011-09-21 7:59 ` Adam Sjøgren
0 siblings, 0 replies; 7+ messages in thread
From: Adam Sjøgren @ 2011-09-21 7:59 UTC (permalink / raw)
To: ding
On Wed, 21 Sep 2011 09:50:58 +0200, Peter wrote:
> On Wed, Sep 21 2011, Adam Sjøgren wrote:
>>> Did you try it? When I enter "pdftotext %s -", nothing happens
>>
>> I just entered "evince" at the "Viewer:"-prompt and saw a PDF with
>> "Hello world!" in it in the Evince-window that opened.
> Indeed, but I wanted it inline as text ...
Ah, sorry, I missed the "in-line" part.
>> That would be nice. On the other hand, the sender _did_ say that this
>> was just some arbitrary octets...
> The sender just uses the "attach-file" function in his buggy MUA, and
> the MUA does it wrong... :(
Yeah, buggy programs suck.
Best regards,
Adam
--
"You make a fair point. Knowing when not to say Adam Sjøgren
anything is not something the lazyweb had asjo@koldfront.dk
historically been good at."
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-09-21 7:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 20:06 viewing `application/octet-stream' MIME parts Peter Münster
2011-09-20 20:16 ` Adam Sjøgren
2011-09-20 21:05 ` Peter Münster
2011-09-20 22:21 ` Adam Sjøgren
2011-09-21 7:50 ` Peter Münster
2011-09-21 7:59 ` Adam Sjøgren
2011-09-20 23:05 ` Katsumi Yamaoka
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 NNTP newsgroup(s).