Re: Viewing both text and image

2002-07-16 Thread John P Verel

This also works, using ee as the client to view graphic images:

Mailcap entries

image/gif; ~/bin/spawn ee %s
image/jpg; ~/bin/spawn ee %s
image/jpeg; ~/bin/spawn ee %s

~/bin/spawn is the following script:

#!/bin/sh
cp $2 $2.tmp
($1 $2.tmp;rm -f $2.tmp) 

John
On 07/15/02 14:25 -0700, Gary Johnson wrote:
 On Mon, Jul 15, 2002 at 01:41:57PM -0700, Jim Osborn wrote:
  I'm on a list where most of the traffic consists of a paragraph or two
  of text and an accompanying chart as an image attachment.  I really
  need to be able to see the image as I read the text, and it'd be nice
  to be able to do that within Mutt.  I haven't figured out how to get
  the image to xv without going into the ``v'' attachment menu, which
  hides the text part of the mail.




Re: Viewing both text and image

2002-07-16 Thread David Champion

* On 2002.07.15, in [EMAIL PROTECTED],
*   Jim Osborn [EMAIL PROTECTED] wrote:
 to be able to do that within Mutt.  I haven't figured out how to get
 the image to xv without going into the ``v'' attachment menu, which
 hides the text part of the mail.

I'll assume that the other postings describing how to run a viewer
asynchronously work well.

To make this happen without entering the attachments menu, you'll also
need to set an autoview for the image type you're dealing with:
auto_view image/jpeg
for example.

However, that will make mutt view all JPEGs automatically -- not
necessarily what you want. You could try tricks with message-hooks --
for example:

message-hook .   unauto_view image/jpeg
message-hook ~f list   auto_view image/jpeg

Or you could set up a macro that does auto_view, then displays the
message, then unauto_views. This won't have the overhead of executing
hooks for every message you read, but it would require you to recall and
use a different keystroke.

Or you could play with changing the MIME type of the image, either
through procmail or using (again) message-hooks. This would allow you to
get what you want on these messages particularly, without necessarily
running the image viewer asynchronously on other message with JPEG
attachments.

As usual, there are arguable advantages to any approach.

-- 
 -D.Fresh fruit enriches everyone.  Takes the thirst
 ENSA, NSIT out of everyday time.  A pure whiff of oxygen,
 University of Chicago  painting over a monochrome world in primary colors.
 [EMAIL PROTECTED]   We all know that.  It's why everyone loves fruit.



Viewing both text and image

2002-07-15 Thread Jim Osborn

I'm on a list where most of the traffic consists of a paragraph or two
of text and an accompanying chart as an image attachment.  I really
need to be able to see the image as I read the text, and it'd be nice
to be able to do that within Mutt.  I haven't figured out how to get
the image to xv without going into the ``v'' attachment menu, which
hides the text part of the mail.

Is there a way to view two attachments simultaneously, or some other
trick to do this job?  I tried tagging both the text and the image in
the attachment menu and doing ;enter but that only selected the one
attachment with the cursor on it.

TIA,

Jim




Re: Viewing both text and image

2002-07-15 Thread Gary Johnson

On Mon, Jul 15, 2002 at 01:41:57PM -0700, Jim Osborn wrote:
 I'm on a list where most of the traffic consists of a paragraph or two
 of text and an accompanying chart as an image attachment.  I really
 need to be able to see the image as I read the text, and it'd be nice
 to be able to do that within Mutt.  I haven't figured out how to get
 the image to xv without going into the ``v'' attachment menu, which
 hides the text part of the mail.

The way I handle this is to use a mailcap entry for image/* that runs xv
in the background.  Then I can launch xv from the attachment menu and
immediately return to reading the message text while still viewing the
image.  Here's my mailcap entry:

image/*; mutt_bgrun xv %s; test=RunningX

A simpler approach would be to just use something like this:

image/*; xv %s  sleep 5

where the sleep time is set to give xv enough time to load the image
before mutt overwrites it.  You can get mutt_bgrun from my web page,

http://www.spocom.com/users/gjohnson/mutt/mutt_bgrun

HTH,
Gary

-- 
Gary Johnson   | Agilent Technologies
[EMAIL PROTECTED]   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |