From: John Magolske <listmail@b79.net>
To: ding@gnus.org
Cc: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: writing a function that pipes the html mime part to an external script
Date: Fri, 20 Jan 2017 10:24:21 -0800 [thread overview]
Message-ID: <87bmv1h9nu.fsf@b79.net> (raw)
In-Reply-To: <8760l9aabr.fsf@linux-m68k.org> (Andreas Schwab's message of "Fri, 20 Jan 2017 18:51:52 +0100")
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Jan 20 2017, John Magolske <listmail@b79.net> wrote:
>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>> On Jan 19 2017, John Magolske <listmail@b79.net> wrote:
>>>
>>>> and everything works as intended. But I'd like to do away with that last
>>>> step of having to manually enter the shell command, somehow placing that
>>>> "~/bin/pipe_to_tmp" directly into a function that could be mapped to a
>>>> key binding. I've been messing around with mm-pipe-part but haven't
>>>> found a way to do this. Any suggestions?
>>>
>>> Write a function that calls mm-pipe-part directly.
>>
>> This is where I'm stuck... I believe there should be something like
>>
>> (mm-pipe-part HANDLE "~/bin/pipe_to_tmp")
>>
>> in the function, but I can't figure out exactly what should go in the
>> place of HANDLE here.
>
> The same that gnus-article-part-wrapper would pass.
So it looks like gnus-article-part-wrapper passes the "N-th MIME handle"
and only that argument:
(gnus-article-part-wrapper N FUNCTION &optional NO-HANDLE INTERACTIVE)
Call FUNCTION on MIME part N.
Unless NO-HANDLE, call FUNCTION with N-th MIME handle as its only
argument. If INTERACTIVE, call FUNCTION interactively.
so I can do something like
(gnus-article-part-wrapper 1 'mm-pipe-part)
which still requires manual input to the minibuffer of the command I
want the mime part piped to. This obviously doesn't work:
(mm-pipe-part 1 "~/bin/pipe_to_tmp")
I guess I'm still foggy on exactly how to call HANDLE and how HANDLE is
named.
> Or pass gnus-article-part-wrapper a function that calls mm-pipe-part
> like above.
That's what I'll probably try next, but was hoping for a way to call
HANDLE in (mm-pipe-part HANDLE "~/bin/pipe_to_tmp") to make for a more
simple function. Also, I'd like to get a clearer idea about what HANDLE
is here, how it's named, called, etc.
John
--
John Magolske
http://b79.net/contact
next prev parent reply other threads:[~2017-01-20 18:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 6:59 John Magolske
2017-01-20 10:41 ` Andreas Schwab
2017-01-20 15:56 ` John Magolske
2017-01-20 17:51 ` Andreas Schwab
2017-01-20 18:24 ` John Magolske [this message]
2017-02-02 8:33 ` John Magolske
2017-01-20 18:07 ` Eric Abrahamsen
2017-01-20 20:04 ` John Magolske
2017-01-20 20:34 ` Eric Abrahamsen
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=87bmv1h9nu.fsf@b79.net \
--to=listmail@b79.net \
--cc=ding@gnus.org \
--cc=schwab@linux-m68k.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 NNTP newsgroup(s).