From: Austin Clements Date: Tue, 28 Jan 2014 22:35:51 +0000 (+1900) 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=8cbc94be8ddc247dee88dad44a00ef75b162cb1f;p=notmuch-archives.git Re: [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice 'mm-shr --- diff --git a/9f/7a71107e675cbdc13df6417ff59c4d8463a5ec b/9f/7a71107e675cbdc13df6417ff59c4d8463a5ec new file mode 100644 index 000000000..f730961d9 --- /dev/null +++ b/9f/7a71107e675cbdc13df6417ff59c4d8463a5ec @@ -0,0 +1,117 @@ +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 11631431FBF + for ; Tue, 28 Jan 2014 14:36:12 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 bBAIleMNM1cZ for ; + Tue, 28 Jan 2014 14:36:03 -0800 (PST) +Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu + [18.9.25.14]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 94DC4431FBD + for ; Tue, 28 Jan 2014 14:36:03 -0800 (PST) +X-AuditID: 1209190e-f79ee6d000000c40-5f-52e830d20609 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id 9E.E7.03136.2D038E25; Tue, 28 Jan 2014 17:36:02 -0500 (EST) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s0SMa0xp007923; + Tue, 28 Jan 2014 17:36:01 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s0SMZwc9014540 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Tue, 28 Jan 2014 17:36:00 -0500 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1W8HG5-0001YW-74; Tue, 28 Jan 2014 17:35:57 -0500 +From: Austin Clements +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.17~rc2+14~g06f47e0 (http://notmuchmail.org) Emacs/23.4.1 + (i486-pc-linux-gnu) +Date: Tue, 28 Jan 2014 17:35:51 -0500 +Message-ID: <87ob2vn394.fsf@awakening.csail.mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsUixG6nrnvJ4EWQQf9NbYvrN2cyW7xZOY/V + gcnj8NeFLB7PVt1iDmCK4rJJSc3JLEst0rdL4MrYv/Qye8E/zoqr15YxNzB2cXQxcnJICJhI + nJp9kRHCFpO4cG89WxcjF4eQwGwmiZWNW6GcjYwSez+dZ4RwTjNJzP7eyQLhLGGUaFp9igWk + n01AQ2Lb/uVgs0QEbCWuLDnJ2sXIwcEMNLd9XghIWFggWKLpzlywEk4BJ4m223fZQUqEBBwl + Tr+QAAmLCiRJnJ76mxXEZhFQldh0/zlYOS/Qpcc7tjJB2IISJ2c+AdvKLKAlcePfS6YJjIKz + kKRmIUktYGRaxSibklulm5uYmVOcmqxbnJyYl5dapGusl5tZopeaUrqJERSonJJ8Oxi/HlQ6 + xCjAwajEwxtw/nmQEGtiWXFl7iFGSQ4mJVHe5XIvgoT4kvJTKjMSizPii0pzUosPMUpwMCuJ + 8E6XBMrxpiRWVqUW5cOkpDlYlMR5b3LYBwkJpCeWpGanphakFsFkZTg4lCR4r+oDNQoWpaan + VqRl5pQgpJk4OEGG8wANfwlSw1tckJhbnJkOkT/FqCglzmsGkhAASWSU5sH1whLJK0ZxoFeE + ebeCVPEAkxBc9yugwUxAg1fuewIyuCQRISXVwKjQPWXt2XvHSqMXXfy6I2rOrcBJjQVPNYzq + mRPqdscsXHbdLKtLtWb+xZajfcvrJqx7vq3CP7bYJtRi9j+WzSoKYYKlW2Xy/9x3PMAbURE/ + 3UdzneQxY+3oWh8L7gpVxeL5B/lW6zIapq5Z16w2ZcNFkYq47/O/+rZkBhnJfjL78Kd5Y4/O + BSWW4oxEQy3mouJEALKeWM//AgAA +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 22:36:12 -0000 + +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. + +Oops, looks like this was my fault. + +This fix LGTM. + +> --- +> 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