Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 30C5B431FB6 for ; Fri, 28 Jan 2011 13:01:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id li9hH6BWYZiE for ; Fri, 28 Jan 2011 13:01:11 -0800 (PST) Received: from mail4.ucc.ie (mail4.ucc.ie [143.239.1.34]) by olra.theworths.org (Postfix) with ESMTP id 67501431FB5 for ; Fri, 28 Jan 2011 13:01:11 -0800 (PST) Received: from msstf091.ucc.ie (msstf091.ucc.ie [143.239.76.91]) by mail4.ucc.ie (8.13.8/8.13.8) with ESMTP id p0SKx7lw014490; Fri, 28 Jan 2011 21:00:16 GMT Received: by msstf091.ucc.ie (Postfix, from userid 1000) id DF904A2793; Fri, 28 Jan 2011 20:59:06 +0000 (GMT) From: Andreas Amann To: Jesse Rosenthal , notmuch@notmuchmail.org Subject: Re: A tool for printing from notmuch In-Reply-To: References: User-Agent: Notmuch/0.5-16-gceb5a1c (http://notmuchmail.org) Emacs/24.0.50.1 (x86_64-unknown-linux-gnu) Date: Fri, 28 Jan 2011 20:59:06 +0000 Message-ID: <87y664pwx1.fsf@msstf091.ucc.ie> MIME-Version: 1.0 Content-Type: text/plain X-MD-NoSA: yes X-Scanned-By: MIMEDefang 2.68 on 143.239.1.34 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 21:01:12 -0000 Dear Jesse, > Printing from notmuch is a bit of a pain. Muttprint doesn't really help > much, because it can't handle multiparts well, doesn't know what to do > with html, and will print out pages of base64 if you have > attachments. And more often than not, what I need to print is an HTML > email (a bus ticket or something). > > A solution I've been working on for my own use is here: > > http://commonmeasure.org/~jkr/notmuchprint Thanks, that sounds great! I have been waiting for something like this ... Unfortunately I could not get it to work with python2.7: Traceback (most recent call last): File "/home/amann/local/bin/notmuchprint", line 284, in main(config) File "/home/amann/local/bin/notmuchprint", line 238, in main VIEW_IN_BROWSER = config.getboolean('DEFAULT', 'view_in_browser') File "/usr/lib/python2.7/ConfigParser.py", line 360, in getboolean v = self.get(section, option) File "/usr/lib/python2.7/ConfigParser.py", line 581, in get return self._interpolate(section, option, value, d) File "/usr/lib/python2.7/ConfigParser.py", line 621, in _interpolate if value and "%(" in value: TypeError: argument of type 'bool' is not iterable is this a known problem, or am I missing something obvious? Next I commented out the offending line via VIEW_IN_BROWSER = False however still no luck: Traceback (most recent call last): File "/home/amann/local/bin/notmuchprint", line 284, in main(config) File "/home/amann/local/bin/notmuchprint", line 263, in main nm_msg = NotmuchMsg(msgid, config) File "/home/amann/local/bin/notmuchprint", line 58, in __init__ self.json_thread = json.loads(json_string) File "/usr/lib/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 360, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 378, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Any hints? Andreas