<<< Date Index >>>     <<< Thread Index >>>

Include message attributes in print_command?



I use Mutt on Linux, and use enscript to print to my cups-pdf printer:
  set print_command="enscript --highlight=mail -P ToPDF"

This produces a PDF named Enscript_Output.pdf in ~/PDF when I print.

However, "Enscript_Output" isn't very descriptive, and if I print one message, then print another, the file gets overwritten. I'd like to be able to put the subject line and date in the filename.

cups-pdf uses the document title to create the filename, so if I do:
  set print_command="enscript --highlight=mail -P ToPDF --title Foo"
I get Foo.pdf instead.

So all I need to do is to get Mutt to pass the message subject and date to enscript, but can't find any way to do this.

Is there a way to do that short of patching mutt?

If not, could someone who has worked on mutt's source give an opinion on how hard it would be to support the index format expandos in print_command? Then I could add "--title '%s %D'" to my print_command.

Ed

Attachment: signature.txt
Description: Digital signature