Re: [PATCH] emacs: notmuch-search: fix faces
authorMichal Nazarewicz <mpn@google.com>
Tue, 28 Aug 2012 00:51:49 +0000 (02:51 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:13 +0000 (09:49 -0800)
da/9e24963fe5f5720df11b9518c272f51924d3b0 [new file with mode: 0644]

diff --git a/da/9e24963fe5f5720df11b9518c272f51924d3b0 b/da/9e24963fe5f5720df11b9518c272f51924d3b0
new file mode 100644 (file)
index 0000000..7e7f511
--- /dev/null
@@ -0,0 +1,172 @@
+Return-Path: <mpn@google.com>\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 70DCA431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 17:52:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.8\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.8 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       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 p-4Fla5HpsFP for <notmuch@notmuchmail.org>;\r
+       Mon, 27 Aug 2012 17:52:01 -0700 (PDT)\r
+Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com\r
+ [74.125.83.53])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 5A5A7431FB6   for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 17:52:01 -0700\r
+ (PDT)\r
+Received: by eekb47 with SMTP id b47so1379770eek.26\r
+       for <notmuch@notmuchmail.org>; Mon, 27 Aug 2012 17:52:00 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\r
+ s=20120113;\r
+       h=from:to:cc:subject:in-reply-to:organization:references:user-agent\r
+       :x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version        :content-type;\r
+ bh=Z6CIdN4bKt3Y8Tw2efw8SA5Jfi2LZ5f5HavbBOR/jrc=;\r
+       b=N6WQJzWSlxEuYx2Z678qpU/aeHQqKoXanL9ftZabLsso3ScIf0nmgEhJnLFgf/5/7R\r
+       NCqvM6dAlA/PEObFv0nVz9or7AMJ81yy8CLl9XgBOwOnpcC3gJG5qouO20ssR8/SEBdy\r
+       grQbG2dy+Mslboz45cNGJGkM2PghRSZSTZZ9aWmsGgueSrzHNlT7dmSfciecHV10Ue6K\r
+       11KNVAb/fuIBNdFftCy5DilC07Jx9AE1Z7TXSf5gawCHWjPKmtP2gXfQAeLJim3LPnV5\r
+       Az3oZWuNl9bQNFQBlUklRIAouykQKLRG2G2EaJduDJbJ6AnRfLo8590B6Q49FTG8yvmJ    uvVw==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:in-reply-to:organization:references:user-agent\r
+       :x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version\r
+       :content-type:x-gm-message-state;\r
+       bh=Z6CIdN4bKt3Y8Tw2efw8SA5Jfi2LZ5f5HavbBOR/jrc=;\r
+       b=EtlD8u+HHkL8oBq+eBPWNp8Awq36QIxUtQGGZgFEn/kHfTsQk640bXaZOOsaTfJyDc\r
+       xSmNOmdBe7ePTJjNCeuDq7Og9r3aMLhjQ7N1eGX8PcND1P3xxLhpwhZub2iXJxfMz49r\r
+       0cE4qrsl1AQIjdWQwTvm9H1/irgKnQSrjrionTklZS59LozNv8+9MPX1id6F0rK2LXXT\r
+       UVEQTF250jr6PYh4vrGT35Q4gyKwSk28/BECTKzYC5CuNQIikiN00vXzQgmWo0D2HhDe\r
+       CQIB05Xo/BbpaY6eiI9Cl+Ducs1mrNpeZMsYHpZLcKnkL/WNNm0EbvXF22/J1KMxmMvx\r
+       Nh6Q==\r
+Received: by 10.14.202.71 with SMTP id c47mr532248eeo.42.1346115120217;\r
+       Mon, 27 Aug 2012 17:52:00 -0700 (PDT)\r
+Received: by 10.14.202.71 with SMTP id c47mr532236eeo.42.1346115120076;\r
+       Mon, 27 Aug 2012 17:52:00 -0700 (PDT)\r
+Received: from mpn-glaptop ([2620:0:105f:5:f2de:f1ff:fe35:1a72])\r
+       by mx.google.com with ESMTPS id 45sm56577867eeb.8.2012.08.27.17.51.57\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 27 Aug 2012 17:51:58 -0700 (PDT)\r
+From: Michal Nazarewicz <mpn@google.com>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH] emacs: notmuch-search: fix faces\r
+In-Reply-To: <20120828002215.GB11179@mit.edu>\r
+Organization: Google Inc\r
+References:\r
+ <83882f4c8de5317e0184dc091a197b2341e5f015.1345725028.git.mina86@mina86.com>\r
+       <87ipc4jcfv.fsf@servo.finestructure.net>        <xa1t3938ue0m.fsf@mina86.com>\r
+ <20120828002215.GB11179@mit.edu>\r
+User-Agent: Notmuch/0.14+2~g416b120 (http://notmuchmail.org) Emacs/24.2.50.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd;       KFrfMCylc}gc??'U2j,!8%xdD\r
+Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC\r
+X-PGP: 50751FF4\r
+X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4\r
+Date: Tue, 28 Aug 2012 02:51:49 +0200\r
+Message-ID: <xa1twr0ju9cq.fsf@mina86.com>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/mixed; boundary="=-=-="\r
+X-Gm-Message-State: ALoCoQk10MTOjvLSwMVhHcJtDKK2arIWzpcHwXrTUMyOVRDUfmPbBKlFhEcDSGhrP+IyrDlgSrxiumczyC8ij+kWSLnD8v3q34x5z+IxDcYQG1u4+VKEiZAZvDiFPCEIq9oEwBVGeGAccwbgKvGycAYy0QbTXIhNy5ZWx7vjhdoQnkHPSKBew6Ym48JX5Ga+FDs+gnC6U+9ycRVfhbbgpBIxW9npWz5FgA==\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:52:03 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\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
+>>=20\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
+>>=20\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: =E2=80=9CGNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu) of 2012-08=\r
+-21\r
+on mpn-glaptop=E2=80=9D.\r
+\r
+I don't think I have any =E2=80=9Cunusual=E2=80=9D packages, but I do have =\r
+quite a bit\r
+of customization, which you might find at\r
+<https://github.com/mina86/dot-files/blob/master/dot-emacs>.\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
+--=20\r
+Best regards,                                         _     _\r
+.o. | Liege of Serenely Enlightened Majesty of      o' \,=3D./ `o\r
+..o | Computer Science,  Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz   =\r
+ (o o)\r
+ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--\r
+--=-=-=\r
+Content-Type: multipart/signed; boundary="==-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+\r
+--==-=-=\r
+Content-Type: text/plain\r
+\r
+\r
+--==-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iQIcBAEBAgAGBQJQPBYlAAoJECBgQBJQdR/0EJ0P/38g1ch0y6r7rKRZwXS3r+9a\r
+T0JEQorWG7BLW7M3HIc+0WWWkX1hMBVcELcRwnTP1UfZjd/eBlPfpjlaID5Ridpd\r
+dMcWQuiSO+w6gJ2CBxOhu+c68uyh2N9aiJQkymEZ1/tRTdkq5mS26QWUaiR9KFpe\r
+aKXnXLhYKzttDwQrEv+YL9pbPm3Onu+SJfLpUMmyU2Sx9j/0TmXkT4YajAuWqnlW\r
+xQUNdNHT9/uMCWNhHpDUnp9TkCoN+txT8P42GPEYN7oLBq+UF8RpRELLGvBmMUa2\r
+PMmJlBrNQ7hZzubSs365nxRn9AZ7AwdTibygCkxqLGXGOb7csebSQrlIxELwySIR\r
+oqrEM2VBX8rNWiNFKK3I4xSoiwEwh2qBOJzK/nD9I7/FeEDzfuwPJYG70f2Qg/YY\r
+KALuplvmjp9i8tu4N/70x5wuxI3SLgtwJFLkn4EBB6uYXAzRWdOEqintLaXB4/JT\r
+cqNIrVmxnlldKiKXsEIhZSuoDK1IlxIXjliBItRE3WFKNB726YIVN/W3VADpbQfQ\r
+87abX7Xb9a/HwbgQXetc8XQPpWJHCSCaa8aQsbPNSbb5PJXqD2OyUUBdzsOPEqC6\r
+xmHHTb+fDfSyxs7CmQGGQN4cUkEPElzSBv6U/xmKpVbgmpNo+huhDSSw18ABBYGK\r
+a/QlQXI25Gpxvdre5Z8u\r
+=oFrd\r
+-----END PGP SIGNATURE-----\r
+--==-=-=--\r
+\r
+--=-=-=--\r