[PATCH] emacs: Fix display of highlighted line in notmuch-show
authorMichal Sojka <sojka@os.inf.tu-dresden.de>
Tue, 14 Feb 2012 10:24:16 +0000 (11:24 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:27 +0000 (09:44 -0800)
6a/a8b3c9b48d7584d411beb1ae8c8b105e082e8b [new file with mode: 0644]

diff --git a/6a/a8b3c9b48d7584d411beb1ae8c8b105e082e8b b/6a/a8b3c9b48d7584d411beb1ae8c8b105e082e8b
new file mode 100644 (file)
index 0000000..a3b2239
--- /dev/null
@@ -0,0 +1,111 @@
+Return-Path: <sojkam1@fel.cvut.cz>\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 32024431FBD\r
+       for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 02:24:35 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 AOlpawa2db-K for <notmuch@notmuchmail.org>;\r
+       Tue, 14 Feb 2012 02:24:34 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+       by olra.theworths.org (Postfix) with ESMTP id 60A88431FBC\r
+       for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 02:24:34 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 9BDA619F3396;\r
+       Tue, 14 Feb 2012 11:24:33 +0100 (CET)\r
+X-Virus-Scanned: IMAP AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+       by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
+       port 10044)\r
+       with ESMTP id HnVfJXc53yqW; Tue, 14 Feb 2012 11:24:29 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 6E5DD3CFE77;\r
+       Tue, 14 Feb 2012 11:24:29 +0100 (CET)\r
+Received: from steelpick.2x.cz (unknown [141.76.49.23])\r
+       (Authenticated sender: sojkam1)\r
+       by imap.feld.cvut.cz (Postfix) with ESMTPSA id 64BB3660968;\r
+       Tue, 14 Feb 2012 11:24:29 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.77)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1RxFYj-0006i3-4A; Tue, 14 Feb 2012 11:24:29 +0100\r
+From: Michal Sojka <sojka@os.inf.tu-dresden.de>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs: Fix display of highlighted line in notmuch-show\r
+Date: Tue, 14 Feb 2012 11:24:16 +0100\r
+Message-Id: <1329215056-25753-1-git-send-email-sojka@os.inf.tu-dresden.de>\r
+X-Mailer: git-send-email 1.7.7.3\r
+Cc: Michal Sojka <sojka@os.inf.tu-dresden.de>\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, 14 Feb 2012 10:24:35 -0000\r
+\r
+When notmuch-search-line-faces is used to set background color in search\r
+results, the highlight of the current line is not always displayed\r
+correctly. This patch fixes that by increasing the priority property of\r
+the highlight overlay.\r
+---\r
+ emacs/notmuch.el |   15 +++++++++++----\r
+ 1 files changed, 11 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 5b4f1c5..f851c6f 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -249,10 +249,17 @@ For a mouse binding, return nil."\r
+       (set-buffer-modified-p nil)\r
+       (view-buffer (current-buffer) 'kill-buffer-if-not-modified))))\r
+ \r
+-(defcustom notmuch-search-hook '(hl-line-mode)\r
++(require 'hl-line)\r
++\r
++(defun notmuch-hl-line-mode ()\r
++  (prog1 (hl-line-mode)\r
++    (when hl-line-overlay\r
++      (overlay-put hl-line-overlay 'priority 1))))\r
++\r
++(defcustom notmuch-search-hook '(notmuch-hl-line-mode)\r
+   "List of functions to call when notmuch displays the search results."\r
+   :type 'hook\r
+-  :options '(hl-line-mode)\r
++  :options '(notmuch-hl-line-mode)\r
+   :group 'notmuch-search\r
+   :group 'notmuch-hooks)\r
+ \r
+@@ -567,7 +574,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".\r
+ the messages that are about to be tagged"\r
+ \r
+   :type 'hook\r
+-  :options '(hl-line-mode)\r
++  :options '(notmuch-hl-line-mode)\r
+   :group 'notmuch-hooks)\r
+ \r
+ (defcustom notmuch-after-tag-hook nil\r
+@@ -578,7 +585,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".\r
+ 'query' will be a string containing the search query that determines\r
+ the messages that were tagged"\r
+   :type 'hook\r
+-  :options '(hl-line-mode)\r
++  :options '(notmuch-hl-line-mode)\r
+   :group 'notmuch-hooks)\r
+ \r
+ (defun notmuch-search-set-tags (tags)\r
+-- \r
+1.7.7.3\r
+\r