Re: [PATCH] emacs: notmuch-search: fix faces
authorAustin Clements <amdragon@MIT.EDU>
Tue, 28 Aug 2012 00:22:15 +0000 (20:22 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:13 +0000 (09:49 -0800)
51/d7401cc27310ee3201f7f8b26426bc21d505d7 [new file with mode: 0644]

diff --git a/51/d7401cc27310ee3201f7f8b26426bc21d505d7 b/51/d7401cc27310ee3201f7f8b26426bc21d505d7
new file mode 100644 (file)
index 0000000..7efc362
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C99FE431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 17:22:20 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id SMHoPbFlRzFJ for <notmuch@notmuchmail.org>;\r
+       Mon, 27 Aug 2012 17:22:20 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU\r
+       [18.7.68.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 09ABE431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 17:22:19 -0700 (PDT)\r
+X-AuditID: 12074424-b7fa06d0000008c2-63-503c0f3a8b35\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 4C.C2.02242.A3F0C305; Mon, 27 Aug 2012 20:22:18 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q7S0MHB8013804; \r
+       Mon, 27 Aug 2012 20:22:18 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7S0MGe2007371\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 27 Aug 2012 20:22:17 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1T69ZP-0001UV-Sw; Mon, 27 Aug 2012 20:22:15 -0400\r
+Date: Mon, 27 Aug 2012 20:22:15 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Michal Nazarewicz <mpn@google.com>\r
+Subject: Re: [PATCH] emacs: notmuch-search: fix faces\r
+Message-ID: <20120828002215.GB11179@mit.edu>\r
+References:\r
+ <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com>\r
+       <87ipc4jcfv.fsf@servo.finestructure.net>        <xa1t3938ue0m.fsf@mina86.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <xa1t3938ue0m.fsf@mina86.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IR4hTV1rXitwkw6PqpZ7Fnn5fFq+997BbX\r
+       b85kdmD2uHuay2PBplKPZ6tuMQcwR3HZpKTmZJalFunbJXBlnP18mLHgCX/FoXsz2RoYr/B0\r
+       MXJySAiYSPxZ388KYYtJXLi3nq2LkYtDSGAfo8SmOSeYIJwNjBI7971lh3BOMkmcWtvGCOEs\r
+       YZSYe2cKI0g/i4CqRMPtB+wgNpuAhsS2/cvB4iICahIX/zxmArGZBSIkpsz4CGYLC5hKzJu5\r
+       mgXE5hXQkfj6egnU7kWMErtvfGeHSAhKnJz5hAWiWUvixr+XQM0cQLa0xPJ/HCBhTqDw/N83\r
+       wHaJCqhITDm5jW0Co9AsJN2zkHTPQuhewMi8ilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdcLzez\r
+       RC81pXQTIyjQ2V1UdjA2H1I6xCjAwajEw/tipXWAEGtiWXFl7iFGSQ4mJVFeQx6bACG+pPyU\r
+       yozE4oz4otKc1OJDjBIczEoivLEvgMp5UxIrq1KL8mFS0hwsSuK811Nu+gsJpCeWpGanphak\r
+       FsFkZTg4lCR4g/mAhgoWpaanVqRl5pQgpJk4OEGG8wANNwGp4S0uSMwtzkyHyJ9iVJQS57UG\r
+       SQiAJDJK8+B6YYnoFaM40CvCvN4gVTzAJAbX/QpoMBPQ4P2KIFcXlyQipKQaGON6xEzT7+rv\r
+       EJZS59z+5c90S05v/assrzNiJTujPvBXTW9WNjRv76i7U9DYu9/GdIlXvdPqOQ6pGfPXLYjs\r
+       tfR70rHH7+yUd0Xf369Sqfsj0rurwrziUOvZh/eD2+W35N22E5/pdrSd5ZDgGQM1Xx/jWtPc\r
+       +DajBAHv81wq8Zsm/n8fZDVfiaU4I9FQi7moOBEA8Kwbzh8DAAA=\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 28 Aug 2012 00:22:20 -0000\r
+\r
+Quoth Michal Nazarewicz on Aug 28 at  1:11 am:\r
+> > On Thu, Aug 23 2012, Michal Nazarewicz <mpn@google.com> wrote:\r
+> >> For some reason the faces do not get applied when 'face property is\r
+> >> used, but they work correctly with 'font-lock-face property.  This\r
+> >> commit changes notmuch-search to use the latter.\r
+> \r
+> Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
+> > Hi, Michal.  Can you say a bit more about what's motivating this?  This\r
+> > feature seems to work fine for me, so I would like to understand what's\r
+> > not working for you.  I'm certainly no expert on emacs font handling,\r
+> > though, so maybe this is the proper thing to do.  Thanks.\r
+> \r
+> I'm not an expert either, but with this patch applied I see colours,\r
+> without this patch, I don't see colours, ie. everything is rendered\r
+> using the default face.\r
+> \r
+> I'm also not entirely sure if that's the correct way of doing things\r
+> since 'face seems to be working in other modes (most notably\r
+> notmuch-show).  By posting, I'm also hoping that someone more\r
+> experienced will maybe take a look to see what's going on here... ;)\r
+> \r
+> For some more info, in notmuch-show mode, I get-text-property of nil for\r
+> both 'face and 'font-lock-face, but in message-mode or in *scratch*\r
+> buffer I'm getting nil for 'font-lock-face but non-nil for 'face.  With\r
+> the patch, I'm getting the same non-nil for both 'face and\r
+> 'font-lock-face; without the patch, I'm getting nil for both.\r
+\r
+This is odd.  Could you give more details about your environment?  In\r
+particular, what Emacs version are you running and might you have any\r
+unusual Emacs packages installed or customizations set?\r
+\r
+The unusual thing about font-lock-face is that it only gets applied if\r
+font-lock is enabled; otherwise it's ignored.  One theory is that the\r
+nil font-lock-face (without your patch) is causing font-lock to\r
+*override* the face property that we set.  I don't think font-lock\r
+usually does that, but perhaps in some situations, it will?\r