From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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