From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13718: [patch] prevents hl-line from overriding highlight-mode Date: Fri, 15 Feb 2013 12:30:48 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360970188 2064 80.91.229.3 (15 Feb 2013 23:16:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2013 23:16:28 +0000 (UTC) Cc: 13718@debbugs.gnu.org To: Fei Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 16 00:16:50 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6UWN-0005hB-HZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Feb 2013 00:16:47 +0100 Original-Received: from localhost ([::1]:38221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6UW3-0000gh-RG for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Feb 2013 18:16:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6UVz-0000gR-Ts for bug-gnu-emacs@gnu.org; Fri, 15 Feb 2013 18:16:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6UVy-0000qf-NU for bug-gnu-emacs@gnu.org; Fri, 15 Feb 2013 18:16:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6P83-0008EK-1N for bug-gnu-emacs@gnu.org; Fri, 15 Feb 2013 12:31:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U6P8j-0005MF-Mt for bug-gnu-emacs@gnu.org; Fri, 15 Feb 2013 12:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Feb 2013 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13718-submit@debbugs.gnu.org id=B13718.136094949620558 (code B ref 13718); Fri, 15 Feb 2013 17:32:01 +0000 Original-Received: (at 13718) by debbugs.gnu.org; 15 Feb 2013 17:31:36 +0000 Original-Received: from localhost ([127.0.0.1]:57890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6P8K-0005LX-2u for submit@debbugs.gnu.org; Fri, 15 Feb 2013 12:31:36 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32667) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U6P8I-0005LQ-DH for 13718@debbugs.gnu.org; Fri, 15 Feb 2013 12:31:35 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxKjI/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kLodwBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFFxKjI/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kLodwBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="1513903" Original-Received: from 69-196-168-200.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.200]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Feb 2013 12:30:49 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 96F526F8CF; Fri, 15 Feb 2013 12:30:48 -0500 (EST) In-Reply-To: (Fei's message of "Fri, 15 Feb 2013 11:15:10 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71360 Archived-At: >> hl-line seems to leave its overlay's priority unspecified (good!), which >> means that it should take precedence over overlays which are larger >> (e.g. span multiple lines) while smaller overlays within the current >> line should take precedence over it. > That's actually a reasonable alternative to my hard-coded solution, > but the problem is that it doesn't seem to work in every case: when I > open a file that has syntax highlighting (e.g. Bash or Python) and > then use highlight-phrase/regexp, the global-hl-line will have higher > priority than the highlight, no matter what the size of the highlight > is. If I do the same thing in text-mode, the problem does not occur. > (This was tested on 24.2.1-i386-mingw-nt6.1.7601 without any custom > configuration.) That's a different issue: in most major modes, font-lock will be enable, in which case hi-lock uses it, which implies that hi-lock will use text-properties instead of overlays. And text-properties always have lower priority than overlays. Problem is: in such a case, not only you do have a problem, but your patch should make no difference, so overlays always take priority over text-properties, no matter the value of the `priority' property. IOW, are you sure your patch fixes the problem for you? Stefan