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

diff --git a/b2/510800747f54e9135cb0194bfc5b3bf3a92c88 b/b2/510800747f54e9135cb0194bfc5b3bf3a92c88
new file mode 100644 (file)
index 0000000..344a631
--- /dev/null
@@ -0,0 +1,128 @@
+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 480D4431FBC\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 19:19:22 -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 fF72-gr0aVq7 for <notmuch@notmuchmail.org>;\r
+       Mon, 27 Aug 2012 19:19:21 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+       [18.9.25.14])\r
+       by olra.theworths.org (Postfix) with ESMTP id 9AD5D431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 19:19:21 -0700 (PDT)\r
+X-AuditID: 1209190e-b7fc36d00000399b-ca-503c2aa8f34d\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id DD.2F.14747.8AA2C305; Mon, 27 Aug 2012 22:19:20 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q7S2JJFn028900; \r
+       Mon, 27 Aug 2012 22:19:20 -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 q7S2JHPt019763\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 27 Aug 2012 22:19:18 -0400 (EDT)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1T6BOf-0001ha-MC; Mon, 27 Aug 2012 22:19:17 -0400\r
+Date: Mon, 27 Aug 2012 22:19:17 -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: <20120828021917.GC11179@mit.edu>\r
+References:\r
+ <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com>\r
+       <87ipc4jcfv.fsf@servo.finestructure.net>        <xa1t3938ue0m.fsf@mina86.com>\r
+ <20120828002215.GB11179@mit.edu>      <xa1twr0ju9cq.fsf@mina86.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <xa1twr0ju9cq.fsf@mina86.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprDKsWRmVeSWpSXmKPExsUixCmqrLtCyybA4PBWEYtX3/vYLa7fnMns\r
+       wOSxYFOpx7NVt5gDmKK4bFJSczLLUov07RK4Mg48uMtScF+44unuacwNjO/4uxg5OSQETCT+\r
+       X+pihrDFJC7cW8/WxcjFISSwj1Hixpm1LBDOBkaJ6bfOMEE4J5kkmq4cgsosYZSYOWkZO0g/\r
+       i4CqxLKvj1lBbDYBDYlt+5czgtgiAmoSF/88ZgKxmQWkJb79bgazhQVMJebNXM0CYvMK6Ehc\r
+       vLgXasNTRonNs74xQiQEJU7OfMIC0awu8WfeJaBjOcAGLf/HARGWl2jeOhvsB04BLYlDT5eA\r
+       3SAqoCIx5eQ2tgmMwrOQTJqFZNIshEmzkExawMiyilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdY\r
+       LzezRC81pXQTIzgSJPl2MH49qHSIUYCDUYmH98VK6wAh1sSy4srcQ4ySHExKoryT1WwChPiS\r
+       8lMqMxKLM+KLSnNSiw8xSnAwK4nwsggC5XhTEiurUovyYVLSHCxK4rxXUm76CwmkJ5akZqem\r
+       FqQWwWRlODiUJHgVgREvJFiUmp5akZaZU4KQZuLgBBnOAzT8gybI8OKCxNzizHSI/ClGRSlx\r
+       3j8gCQGQREZpHlwvLFG9YhQHekWYlx1kBQ8wycF1vwIazAQ0eL+iNcjgkkSElFQD43zDyqDG\r
+       3fEWOoWMTst/Vn6tOGwap6m2ynzHsnWLZ74uucKRYDhL5s88x0PfphV8n/EgJ7R/TSHbLyF+\r
+       gSct0dqPPnT8/LqtpNru44Xcg9qLQ+QYPyw7UbL/d0jpo4sxKfFNi9eEWllKVWm8emyYf6dv\r
+       pebXLzYf3s98yGOmv9//4CIp5pXH7imxFGckGmoxFxUnAgCFc9zQLwMAAA==\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 02:19:22 -0000\r
+\r
+Quoth Michal Nazarewicz on Aug 28 at  2:51 am:\r
+> > Quoth Michal Nazarewicz on Aug 28 at  1:11 am:\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
+> Austin Clements <amdragon@MIT.EDU> writes:\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
+> I'm running Emacs compiled from a week old bzr head, emacs-version\r
+> reports: “GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu) of 2012-08-21\r
+> on mpn-glaptop”.\r
+> \r
+> I don't think I have any “unusual” packages, but I do have quite a bit\r
+> of customization, which you might find at\r
+> <https://github.com/mina86/dot-files/blob/master/dot-emacs>.\r
+\r
+I think the culprit is your "Show blanks and FIXME"\r
+font-lock-mode-hook.\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
+> \r
+> Ha!  That could be the cause.  I've disabled global-font-lock-mode, and\r
+> the colours appeared.  Getting property returns non-nil for 'face and\r
+> nil for 'font-lock-face.  When I enable font-lock-mode the property seem\r
+> to disappear and disabling font-lock-mode again does not help.\r
+\r
+It's possible we should use font-lock-face.  I'm not sure.  Poking\r
+around the standard elisp, it looks like some things use 'face and\r
+some things use 'font-lock-face.  I think 'face is more common, but\r
+it's hard to grep for.\r