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 5CE8B431FD0 for ; Fri, 20 May 2011 03:47:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.976 X-Spam-Level: * X-Spam-Status: No, score=1.976 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLYTO=2.775, RCVD_IN_DNSWL_LOW=-0.7] 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 m5c5CR-eG3-G for ; Fri, 20 May 2011 03:47:28 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 20D3E431FB6 for ; Fri, 20 May 2011 03:47:27 -0700 (PDT) Received: by wwi36 with SMTP id 36so3164655wwi.2 for ; Fri, 20 May 2011 03:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:subject:from:to:reply-to:date:message-id :user-agent:content-transfer-encoding:mime-version:content-type; bh=GLBOEhqegePBBCrwzqJJwdWmKQy3cxQaoxBFkgnqdNk=; b=necW+FN7uP4zpusx8mMXgUWorBGX0zHoOhSmt2U8KVHRYKS4dct4+6mhWqBc3OUiMB lmppivfrlbMUYtKqgRFaG/SCrj/+L0SZ6T9NUnqqGRMi25MiIfPFvmeYmL8tfup1M9Wn AlcANxG/Dtt6KPMwX6mhA97G19NxViMysx87Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:reply-to:date:message-id:user-agent :content-transfer-encoding:mime-version:content-type; b=GU47ajyedW5z8kuu4Uhv/JSLnwJDKEUbz1cVkHUpRSVVgYdkMNARXnMJJui14X6B+O Ra9ycymrZHq/a2eyjRjSXovHlUI8MC9qzC4+LFS0weTTnkkn9vtTPjPW7EpIZrpXHfKn ygGIl5RW4W2wsipTaHebfN/S81Nt776s3/c3E= Received: by 10.216.69.21 with SMTP id m21mr491823wed.4.1305888446069; Fri, 20 May 2011 03:47:26 -0700 (PDT) Received: from localhost (dhcp-90-080.inf.ed.ac.uk [129.215.90.80]) by mx.google.com with ESMTPS id bd8sm2196435wbb.31.2011.05.20.03.47.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2011 03:47:24 -0700 (PDT) Subject: a python terminal gui? From: Patrick Totzke To: notmuch-list Date: Fri, 20 May 2011 11:47:41 +0100 Message-Id: <1305888097-sup-2343@optimusprime> User-Agent: Sup/git Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-1305888461-517614-26690-4998-2-="; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Patrick Totzke 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, 20 May 2011 10:47:29 -0000 --=-1305888461-517614-26690-4998-2-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, First of all, Thanks to everybody involved in the project. Using notmuch = is good fun and I totally agree that the spin-off/rewrite of sup is a great = idea. However, as a vim user I feel that the one thing that's truly missing is = a = maintainable, feature-rich commandline GUI. Let's change that. I'm aware of existing proposed guis: vala-notmuch, notsomuch, I have also= seen = a minimal non-oop python gui that doesn't use the python bindings and who= se name = I forgot. This is a proposal for a terminal gui, written in python. Currently, it is more a sketch of a framework, so let me explain the key = ideas here: * I use python because I personally am heavily biased in the python vs. r= uby discussion: I've been working with python for a while and have never used ruby anyw= here else than = for my sup-mail config. I find rubys syntax highly unintuitive, had (an= d still have) problems to install/work with up-to-date ruby-gems on my ubuntu system.= Also, I read somewhere=E2=84=A2 that sup is based on a email library th= at is no longer maintained. I know these are only my personal, non representative and maybe uninfor= med impressions, but I have the feeling that I'm not alone here. On the other hand, cnotmuch and all other libs I (plan to) use in this = project were easy_installed without any problems. * I want a gui that looks and feels like sup, without the ugly parts. * use libraries wherever possible. Therefore, instead of programming raw curses, I go for the urwid toolkit: It's a bit like gtk= , you create a bunch of widgets and put them together in a tree-like stru= cture and the library handles redrawing the screen and redirecting key presse= s etc. I'm aware of some arguments against urwid (PEP8 compatibility, slow py3= k awareness), but consider the advantages: - no boring and error-prone ncurses hacking - possibly multiple frontends (curses, web) - correct display of unicode chars - a lot of ready-made widgets are available (textboxes, selectable lis= ts). There's even an additional widget-lib called urwid-sat that defines widgets for p= assword inputs etc. - ready made colour theming for mono/16/256 colours. = one might also look around for a mutt/abook contact lib You can find the code at here: https://github.com/pazz/notmuch-gui = Obviously, there is a lot that's missing, but I think having this framewo= rk makes it easier for anyone to contribute. For example, to be able to display mails, one could code a urwid.Widget that can display a given email.message.Mess= age. That widget will then be used in a widget that displays a whole notmuch.t= hread which we could put inside a new buffer class that extends my ng.buffer.Bu= ffer So far, there are only two modi (ng.buffer.Buffer subclasses): a bufferlist and one to display thread search results. I consider all of this to be a proof-of-concept, any part of this proposa= l is up for discussion. I'd be interested in any feedback whatsoever, and h= appy to delegate work to anybody willing to contribute. I'm aware that the cod= e is not pretty, probably not the sleekest oop design and non-conforming = with a lot of conventions. Hit me :) Cheers, /pazz --=-1305888461-517614-26690-4998-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3WRs0ACgkQlDQDZ9fWxaoVlQCcCE2Yibg1tiLZ5atytcJhsJHS SRkAoL+1TBtrucv3YN9xyjllBIf0Hmc+ =B+xg -----END PGP SIGNATURE----- --=-1305888461-517614-26690-4998-2-=--