From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EE58E431FBC for ; Sat, 16 Jan 2010 12:50:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.762 X-Spam-Level: X-Spam-Status: No, score=-1.762 tagged_above=-999 required=5 tests=[AWL=-1.763, BAYES_50=0.001] autolearn=ham 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 m0SsE2X1zEaW for ; Sat, 16 Jan 2010 12:50:05 -0800 (PST) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 24EAF431FAE for ; Sat, 16 Jan 2010 12:50:05 -0800 (PST) Received: from servo.finestructure.net (lair.fifthhorseman.net [216.254.116.241]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o0GKnwX6024902 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Sat, 16 Jan 2010 15:50:03 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1NWFal-0006ra-V9 for notmuch@notmuchmail.org; Sat, 16 Jan 2010 15:49:55 -0500 Date: Sat, 16 Jan 2010 15:49:55 -0500 From: Jameson Rollins To: Notmuch Mail Message-ID: <20100116204955.GA858@finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7 Subject: proposal for more streamlined mail flow in notmuch 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: Sat, 16 Jan 2010 20:50:06 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I would like to put forth here a proposal for a couple of changes to notmuch that I believe will considerably streamline message handling and new message flow through notmuch. Notmuch is still new and I believe it hasn't quite figured out the best way to handle message flow in the new mail handling paradigm that it is working. This is a proposal to fix that. I believe that most people are syncing their mail from remote IMAP or POP servers to local maildirs (via offlineimap for instance), and that most people's IMAP servers have limited storage capacity. This practically means that people can not keep all of their mail in a single directory. However, notmuch currently basically assumes that this is what is happening. In order to keep synced maildirs from growing out of hand, messages need to be either deleted or moved out of the "inbox" where they initially show up. This is why it was so important for notmuch to get support for deletion/renaming/moving of messages. However, we still need to get notmuch to fundamentally understand this flow (mail comes into inbox, and is then moved elsewhere), and provide the functions to easily facilitate this flow for users. To this end, here is how I believe the notmuch flow should look: - New messages are delivered into a maildir "inbox". When notmuch new is run, these new messages are tagged 'inbox' and 'unread'. - When a user views a message with their reader, the 'unread' tag is automatically removed, the maildir S flag is added and the message is moved from inbox/new to inbox/cur. - If the user wishes to delete a message, a 'delete' tag is added to the message. If the user does a "purge", all messages tagged 'delete' are erased from disk and/or a "delete hook" is run. - If the user wishes to archive a message the 'inbox' tag is removed and the messages is actually moved from the inbox maildir into an archive maildir and/or an "archive hook" is run. To fascilitate this, two new functions should be implemented at the notmuch CLI level, so that things don't get fractured by different mail reader implementations: notmuch purge delete all 'delete' tagged messages, and/or execute "delete hooks" notmuch archive remove 'inbox' flags from messages and move messages an archive maildir, and/or execute "archive hooks" I believe this is a simple, intuitive flow, that will be easy to understand and work with by pretty much all users, but is still very nicely extensible for advanced users. For instance, a delete hook might move the message to a trash instead of deleting it outright, or an "archive hook" could filter archived messages into folders. Hooks could also be used to do nothing to messages other than just modifying the tags (which would completely mimic the current notmuch behavior). The config file could be kept very simple (only two hooks would need to be defined), without having to move to some crazy script-based config scheme (like lua) that is overly complicated and very hard for new users to understand. It would also great simplify the mail readers themselves (like the emacs UI), because it would greatly reduce the number of commands (ie. essentially just "view", "delete", "archive", or "search"). What do folks think of this proposal? I am convinced that this flow is simple, would be intuitive to new users, and extensible such that it could provide the functionality that anyone could desire. I would be curious to hear of anyone interested in using notmuch who thinks they could *not* achieve the mail flow that they desire with this scheme. Any and all feedback on this proposal is welcome. If people think this flow is a good idea, I would be psyched to start fleshing it out. jamie. --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: attachment -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLUiZxAAoJEO00zqvie6q8JFEP+wWXuxzRnsbpF3Usdo5H7Z9y GYO0HZ1CXqmp7YeyxEXJRNAL+UgldbOIKE/fkMDwEuKo4U4ebZmODDBPNNVZtkyw EPl6YErNqOW1O4AUcv/QdMAb8nK46a9gUg5H91zNJaSAU10auDE5HXLoTFkF8wBe QVlkbGWWD9YWN1abkVhRNNMB/A5Utq65Ecarwm+RMObbIL/7puSjoGqaxQM/44hQ jRqcCyRCnRsgXS4cLMUdUPwnC9reIrMY6VYCaOIFcPHCV0yjZfcJfX+bkRglpJzB LV4aED92XwCXM7XPCqLJlJhB+la/+h3o+h0sYu8EASUPe09Pg5zczc7kOq5IBGAd 5jRJhjqUlGFuYmazQ6CJG0D9lfO9+S/95QItRIs3uCgsbciervxYCB6XrpCUNVNB IrqqIrJwdOixN3/uxk0jTuwTQBOLQnNuTJ4egy++ZESuUiIUJ2L7XB3jKfWvBp0k SjcjNmQxQPQSlQMhhKvOBH8M+2OrgbsTek0MfBL3yO2TBR8dszzErIO0PZS27bq6 5JEWpgYHOBZeuXQYHJ8zjuSTOnzjAJagRdtz+jXQcwmQtL+hpoGEdvZSqdjw+SHq 1wlYNHg90OLlUgndi3lXRRph0Xhe5dGfK0K29AcLvKvzmp7pj9TuhBXus5FsqQUr glNfFz2kRsznf8Cocgsh =wI3m -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--