From: Felipe Contreras Date: Mon, 23 Apr 2012 01:12:32 +0000 (+0300) Subject: [ANN] New awesome vim plug-in using Ruby bindings X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=381dc13607e07142da974a5c021894a3aaf3e354;p=notmuch-archives.git [ANN] New awesome vim plug-in using Ruby bindings --- diff --git a/44/5a41f979738ba15ca9cd2be168a061b882fa73 b/44/5a41f979738ba15ca9cd2be168a061b882fa73 new file mode 100644 index 000000000..3b1bb1ac9 --- /dev/null +++ b/44/5a41f979738ba15ca9cd2be168a061b882fa73 @@ -0,0 +1,118 @@ +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 9E6CF431FAF + for ; Sun, 22 Apr 2012 18:12:36 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, 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 s0QVcfA7hYDw for ; + Sun, 22 Apr 2012 18:12:36 -0700 (PDT) +Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com + [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + C8D80431FAE for ; Sun, 22 Apr 2012 18:12:35 -0700 + (PDT) +Received: by eekb47 with SMTP id b47so4674690eek.26 + for ; Sun, 22 Apr 2012 18:12:33 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=mime-version:date:message-id:subject:from:to:cc:content-type; + bh=np6CwUjIyos4BE5pSs0+NOVwQbm1Q0WbS8QbS2sPdDs=; + b=UQeH3A7FBI0RypWtkUkaKrt3yossg4ieyjb+jPCXG5TeJFnHLSATPpuZYtcSE4b91F + wj08bpx/QN/MfFnTkTZIJfwuQsyBNoFFiHYd7dAtkXSw7K1BxK5ccgWzZdQicK5TRuHv + IygTi0nPS5Vo6bNZg6ZA5778YpejdIiwh+sooAXSwrywOkhOnmQMVU+ReANFEWsMappQ + MFb5OWXk/u//CBX7j+QbhZaLC8CZttJC2/nXBT5ke9fldQMjucS0N0+wrIH55ZC64OZA + /wfiF8841UPc3Z98MfV/xoAJRReUVoDxzgr3om/Mq11Nx21naB7+kLcYXnkHDHVuwPUF + ytTg== +MIME-Version: 1.0 +Received: by 10.213.32.2 with SMTP id a2mr1078672ebd.39.1335143552891; Sun, 22 + Apr 2012 18:12:32 -0700 (PDT) +Received: by 10.213.103.18 with HTTP; Sun, 22 Apr 2012 18:12:32 -0700 (PDT) +Date: Mon, 23 Apr 2012 04:12:32 +0300 +Message-ID: + +Subject: [ANN] New awesome vim plug-in using Ruby bindings +From: Felipe Contreras +To: notmuch@notmuchmail.org +Content-Type: text/plain; charset=UTF-8 +Cc: Ali Polatel , Bart Trojanowski , + Ryan Harper , Adrian Perez +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: Mon, 23 Apr 2012 01:12:36 -0000 + +Hi, + +I've never been particularly happy with the code of the vim plug-in, +but it sort of did the job, after some fixes, and has been working +great so far for most of my needs even though it's clearly very rough +on the edges. + +However, I'm recently in need of been able to read HTML mails, and +just trying to add that code was a nightmare, so I decided to look for +alternatives, including Anton's Python vim plug-in (which is nice, but +doesn't have support for that), and even learning emacs, to use what +most people here use (but it turns out the HTML messages don't work +correctly there either). I also tried the various mutt+notmuch +options, and none fit the bill. + +So, since I'm a big fan of Ruby, I decided to try my luck writing a +plug-in from scratch. It took me one weekend, but I'm pretty happy +with the result. This plug-in has already essentially all the +functionality of the current one, but it's much, *much* simpler (only +600) lines of code. + +And in addition has many more features: + + * Gradual searches; you don't have to wait for the whole search to finish, + sort of like the 'less' command + * Proper multi-part handling; finds out if there's text/plain, or if + text/html, converts it using elinks + * Extract all attachments + * Open message with mutt (or any external application that can open an mbox) + * More proper UTF-8 handling + * Configurable key mappings + * Much simpler, cleaner, beautiful, and extensible code (only 600 lines!) + +I just added support to reply mails today, and after trying a bit I +got complaints from the vger.kernel.org server, but people using mutt +have had the same complaint, so I don't know, I wouldn't reply totally +on that. *But* you can open the mail with mutt, or any other client +that you want, as a fall-back option (the command to run is +configurable). + +Sure, it depends on the Ruby bindings from notmuch (but those are easy +to compile), and on the 'mail' library from Ruby (easy to install), +but it makes things much, *much* easier. There might be ways to make +certain dependencies optional, and make this, and the current plug-in +converge somehow (maybe even the python one too), but for now I don't +see any reason to look back. + +I can't wait to start using it for real :) + +Enjoy ;) + +https://github.com/felipec/notmuch-vim-ruby + +P.S. I CC'ed a bunch of people that have showed interest in the vim +interface, I hope you don't mind + +-- +Felipe Contreras