From: Mark Walters Date: Tue, 28 Jan 2014 21:28:09 +0000 (+0000) Subject: Re: [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice 'mm-shr X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7b2f3e7632fa760e75c97c6bdec27780283a53f;p=notmuch-archives.git Re: [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice 'mm-shr --- diff --git a/ba/5efb6ff45831d96d0e5d42c11b67581413954f b/ba/5efb6ff45831d96d0e5d42c11b67581413954f new file mode 100644 index 000000000..90d989d11 --- /dev/null +++ b/ba/5efb6ff45831d96d0e5d42c11b67581413954f @@ -0,0 +1,113 @@ +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 98C9E431FBF + for ; Tue, 28 Jan 2014 13:31:16 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, 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 4onoLDJoZCpz for ; + Tue, 28 Jan 2014 13:31:09 -0800 (PST) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4E972431FBD + for ; Tue, 28 Jan 2014 13:31:09 -0800 (PST) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1W8GFJ-0004IO-Lz; Tue, 28 Jan 2014 21:31:04 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1W8GEB-0004kw-Bx; Tue, 28 Jan 2014 21:29:51 +0000 +From: Mark Walters +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice + 'mm-shr +In-Reply-To: <1390854732-7501-1-git-send-email-tomi.ollila@iki.fi> +References: <1390854732-7501-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.15.2+484~gfb59956 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 28 Jan 2014 21:28:09 +0000 +Message-ID: <87ha8n94pi.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: f18867dbd04050039e566b9b2650eaab (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: tomi.ollila@iki.fi +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: Tue, 28 Jan 2014 21:31:16 -0000 + + +Hi + +This LGTM (but untested) + + +Best wishes + +Mark + +On Mon, 27 Jan 2014, Tomi Ollila wrote: +> Imitated from "Enabling advice" in Emacs lisp manual... +> +> ad-disable-advice by itself only changes the enable flag for a +> piece of advice. To make the change take effect in the +> advised definition, the advice needs to be activated again. +> --- +> emacs/notmuch-lib.el | 3 ++- +> 1 file changed, 2 insertions(+), 1 deletion(-) +> +> diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +> index e6e9f97..fa35fa9 100644 +> --- a/emacs/notmuch-lib.el +> +++ b/emacs/notmuch-lib.el +> @@ -531,7 +531,8 @@ the given type." +> (if (>= emacs-major-version 24) +> (defadvice mm-shr (before load-gnus-arts activate) +> (require 'gnus-art nil t) +> - (ad-disable-advice 'mm-shr 'before 'load-gnus-arts))) +> + (ad-disable-advice 'mm-shr 'before 'load-gnus-arts) +> + (ad-activate 'mm-shr))) +> +> (defun notmuch-mm-display-part-inline (msg part nth content-type process-crypto) +> "Use the mm-decode/mm-view functions to display a part in the +> -- +> 1.8.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch