Re: Refering to current message headers in mutt macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Heinz,

On Sun, Aug 12, 2012 at 11:29:37PM +0200, Heinz Diehl wrote:
> Hei,
> 
> On 12.08.2012, Suvayu Ali wrote: 
> 
> > I am trying to write a mutt macro where I need to refer to a header from
> > the current message.  The use case is something like this:
> [....]
> 
> I'm not quite shure what you want mutt to do in this case. Functions
> as e.g. "limit" can match on specific content of a message-id (~i),
> but I doubt you can extract the current message-id via pure mutt
> functionality (please correct me if I'm wrong).
> 

No I think you are correct; I was asking hoping that there might be a
way/hack known to other that would allow me to get that information.

> You could use a short python or perl-script to extract the message-id,
> e.g. something like this
> 
>  perl -ne '/^Message-Id:\s+(.*)/; print "$1\n";'
> 

How do I say, run that command on the current message (or pipe it)
inside the macro definition?

I am using a mutt fork with notmuch search integrtion.  This macro is to
search for all messages matching the same subject as the current
message.  E.g. I want something like the following as the macro:

"<vfolder-from-query>subject:\"`<shell-cmd> <cur-msg-file>`\"&limit=threads\n"

or,

"<vfolder-from-query>subject:\"`<pipe-cur-msg>|<shell-cmd>`\"&limit=threads\n"

In my case I have a sed oneliner as <shell-cmd>.  I hope that clarifies
what I'm attempting better.

Thanks a lot,

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux