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