Gnus development mailing list
 help / color / mirror / Atom feed
From: Lloyd Zusman <ljz@asfast.com>
Subject: How to do something a bit complicated with inline decoding?
Date: Wed, 17 Oct 2001 21:38:51 -0400	[thread overview]
Message-ID: <m2vghdlob8.fsf@asfast.com> (raw)

I'd like to do something a bit complicated with inline decoding of
message parts, and I'm wondering if Oort might already have some or
all of my desired functionality:

I sometimes receive messages, each of whose parts are mime encoded,
with the first part being the text/html version of the person's
message (yes, this comes from some Micro$oft mail client).

I have the following in my .gnus.el file to force text/html to never
be automatically displayed or encoded:

  (setq mm-discouraged-alternatives
        '("text/html"
          "text/richtext"))
  (setq mm-inline-override-types mm-discouraged-alternatives)
  (setq mm-automatic-display (remove "text/html" mm-automatic-display))

With this setup, I can type `1 b' in message buffers like I described
above in order to get a prompt asking me where I'd like to save the
html.  In most cases, this is exactly what I want.

However, in one particular groups, I want to be able to hit a key
sequence that will pipe this message part through a command which will
do a non-graphic formatting of the message.

I know how to do this:  I enter the following command ...

  1 K | w3m -T text/html

The "w3m" command does what I want, and the screen now shows the
non-graphic-formatted version of the html part.

However, if immediately thereafter, I type 'r' to reply to the
message, the formatted text goes away, and the resulting buffer is
empty.

What I'd like to be able to do is this:

Create a special way to "treat" an article that does the following
when I invoke the key sequence bound to this special treatment
command:

1. For all parts for which there is a known decoding mechansim
   EXCEPT text/html, just invoke that decoding mechanism.

2. For all text/html parts numbered <n> do this ...

     <n> K | w3m -T text/html

   ... and make sure that the resultant text appears in the buffer.

After this treatment, if I reply to the message, the text resulting
from the non-graphic-formatted html will appear quoted in the buffer,
so I can write a reply to it.

I could use the "hammer and tongs" approach and pound out the elisp
code I need, but before I do, does anyone know of any existing Oort
functionality that might be able to help me?

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com



             reply	other threads:[~2001-10-18  1:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18  1:38 Lloyd Zusman [this message]
2001-10-18  7:17 ` Kai Großjohann
2001-10-18 11:00   ` Lloyd Zusman
2001-10-18 12:30     ` Colin Marquardt
2001-10-18 15:54     ` Kai Großjohann
2001-10-18 23:53       ` Lloyd Zusman
2001-10-19 10:44         ` Lloyd Zusman
2001-10-19 13:07           ` Kai Großjohann
2001-10-19 23:51             ` Lloyd Zusman
2001-10-20 10:34             ` Raymond Scholz

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2vghdlob8.fsf@asfast.com \
    --to=ljz@asfast.com \
    /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 NNTP newsgroup(s).