From: Ethan Glasser-Camp Date: Sun, 18 Nov 2012 22:59:53 +0000 (+1900) Subject: Re: [PATCH v2] emacs: display tags in notmuch-show with links X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=abd1addf661a69b1c53f70bd55a67f0a9a745f18;p=notmuch-archives.git Re: [PATCH v2] emacs: display tags in notmuch-show with links --- diff --git a/13/85e2305923560f8b9d1d0a397f27f3b1fba7a6 b/13/85e2305923560f8b9d1d0a397f27f3b1fba7a6 new file mode 100644 index 000000000..a622d4dfb --- /dev/null +++ b/13/85e2305923560f8b9d1d0a397f27f3b1fba7a6 @@ -0,0 +1,114 @@ +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 60229431FBD + for ; Sun, 18 Nov 2012 15:00:06 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.7 +X-Spam-Level: * +X-Spam-Status: No, score=1.7 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, 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 SY03khlxczFR for ; + Sun, 18 Nov 2012 15:00:05 -0800 (PST) +Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com + [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C4A5A431FB6 + for ; Sun, 18 Nov 2012 15:00:05 -0800 (PST) +Received: by mail-qc0-f181.google.com with SMTP id x40so3185640qcp.26 + for ; Sun, 18 Nov 2012 15:00:05 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=2iuaq6ZGivbAjHj5/Qtapp3pwZe/gm77MPCyAH89V6A=; + b=s3ijgm4kw0k731WVArLcdPcsyZPdRivr/VzCDFVqahCYYRZ1QlbwtOCwCuC/WONqU8 + sdnoRU82BsOCjC9ByzOougiMQ43vEjBa+apMS/IRxLDZponpD/b094i+EkFkTQx+88Xe + myWnKV9tJxDI54i3ypc0n4SQXHD9tvAy6QNi/j5AyuiqG4ov46w4yvMs3h2uFpLTWgxH + vw0aF4OI1jDn++pVOR9i3SVi1nqloQ2MlrqkyTLwWD1bXqFE2FP4uMJMeH6618gohsZc + 8ZM6JvaDrYYSX9/29i88zULqfQyjZiRq3kxL8zYV7/3N27XzIUstUUviqgXIi0z2Muzi + nNOQ== +Received: by 10.224.33.135 with SMTP id h7mr9992221qad.26.1353279605199; + Sun, 18 Nov 2012 15:00:05 -0800 (PST) +Received: from smtp.gmail.com ([66.114.71.21]) + by mx.google.com with ESMTPS id r13sm5186843qaa.20.2012.11.18.14.59.55 + (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 18 Nov 2012 15:00:03 -0800 (PST) +From: Ethan Glasser-Camp +To: Damien Cassou , + notmuch mailing list +Subject: Re: [PATCH v2] emacs: display tags in notmuch-show with links +In-Reply-To: <1353266322-20318-1-git-send-email-damien.cassou@gmail.com> +References: <1353266322-20318-1-git-send-email-damien.cassou@gmail.com> +User-Agent: Notmuch/0.14+45~g6ea9330 (http://notmuchmail.org) Emacs/24.1.1 + (x86_64-pc-linux-gnu) +Date: Sun, 18 Nov 2012 17:59:53 -0500 +Message-ID: <87ip921pqu.fsf@betacantrips.com> +MIME-Version: 1.0 +Content-Type: text/plain +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: Sun, 18 Nov 2012 23:00:06 -0000 + +Damien Cassou writes: + +> This patch obsoletes +> id:1352565719-12397-1-git-send-email-damien.cassou@gmail.com +> +> [PATCH 1/4] emacs: Add a thread's tags to emacs header-line +> [PATCH 2/4] emacs: Make tags in header-line clickable +> [PATCH 3/4] emacs: Make tags that appear in `notmuch-show' clickable +> [PATCH 4/4] emacs: Add unit-tests for clickable tags in notmuch-show +> +> This patch makes clickable all tags that appear in notmuch-show +> buffers. Each tag is a link to open a new notmuch-search buffer for +> this tag. Additionally, the buffer's header-line now shows the +> thread's tags (clickable only if the `header-button' library is loaded +> or loadable). + +Looks fine to me. Let me just get the notes from my bikeshed, in case +you get asked to roll another version :) + +- You might want to use #' on lambdas. + +- It bothers me how similar notmuch-tagger-{body,header}-button-action + are. I thought it might be better to unify them by seeing what type + the button argument was. Here's my (untested) approach which you might + find prettier or uglier. + +(notmuch-tagger-all-button-get (button attrib) + "Utility function to do button-get on different kinds of buttons." + (cond + ((integer-or-marker-p button) + (button-get button attrib)) + ((and (featurep 'header-button) + (listp button)) + (header-button-get button attrib)) + (t (error "unknown type of button %s" button)) + +- The comment for notmuch-tagger-make-body-link reads that it will work + "everywhere except in the header-line". Does this mean mode-line, menu + bar, or what? How about just "won't work in the header-line"? + +- In patch 3: + + +If tags the result of this function is to be used within the + +I think this should just read "If the result". + +Ethan