[PATCH v2] emacs: Fix display of highlighted line in notmuch-search
authorMichal Sojka <sojka@os.inf.tu-dresden.de>
Tue, 14 Feb 2012 17:09:47 +0000 (18:09 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:28 +0000 (09:44 -0800)
65/9a96ad0eaedb70f9954c1e8759a209208abfa1 [new file with mode: 0644]

diff --git a/65/9a96ad0eaedb70f9954c1e8759a209208abfa1 b/65/9a96ad0eaedb70f9954c1e8759a209208abfa1
new file mode 100644 (file)
index 0000000..2599fbc
--- /dev/null
@@ -0,0 +1,113 @@
+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 18EA5431FBC\r
+       for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 09:10:17 -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 izw-zVCDOD-M for <notmuch@notmuchmail.org>;\r
+       Tue, 14 Feb 2012 09:10:16 -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 4D0D1431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 14 Feb 2012 09:10:16 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.4])\r
+       by max.feld.cvut.cz (Postfix) with ESMTP id 45AE53CFE81;\r
+       Tue, 14 Feb 2012 18:10:15 +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 bHZU3-R4mE6N; Tue, 14 Feb 2012 18:10:11 +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 4D3303CFE77;\r
+       Tue, 14 Feb 2012 18:10:11 +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 3B7A9660968;\r
+       Tue, 14 Feb 2012 18:10:11 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.77)\r
+       (envelope-from <sojkam1@fel.cvut.cz>)\r
+       id 1RxLtK-0001fk-Uu; Tue, 14 Feb 2012 18:10:10 +0100\r
+From: Michal Sojka <sojka@os.inf.tu-dresden.de>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2] emacs: Fix display of highlighted line in notmuch-search\r
+Date: Tue, 14 Feb 2012 18:09:47 +0100\r
+Message-Id: <1329239387-6300-1-git-send-email-sojka@os.inf.tu-dresden.de>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <87mx8lpd5o.fsf@nikula.org>\r
+References: <87mx8lpd5o.fsf@nikula.org>\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 17:10:17 -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