From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.bugs Subject: bug#17234: 24.3.50; overlay priority : cons cells make an error in ediff Date: Thu, 10 Apr 2014 11:36:38 +0200 Message-ID: <878urdmvr0.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1397122707 16514 80.91.229.3 (10 Apr 2014 09:38:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2014 09:38:27 +0000 (UTC) To: 17234@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 10 11:38:20 2014 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 1WYBR4-00024j-QZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Apr 2014 11:38:19 +0200 Original-Received: from localhost ([::1]:49956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBR4-0006fC-3W for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Apr 2014 05:38:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBQu-0006dQ-2B for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:38:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYBQo-00042D-W4 for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:38:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBQo-00041h-Sl for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WYBQo-0004S8-I7 for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Apr 2014 09:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17234 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139712262617030 (code B ref -1); Thu, 10 Apr 2014 09:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Apr 2014 09:37:06 +0000 Original-Received: from localhost ([127.0.0.1]:39586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WYBPt-0004Qb-Hj for submit@debbugs.gnu.org; Thu, 10 Apr 2014 05:37:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57359) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WYBPr-0004Q4-89 for submit@debbugs.gnu.org; Thu, 10 Apr 2014 05:37:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYBPg-00028w-Vl for submit@debbugs.gnu.org; Thu, 10 Apr 2014 05:36:57 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBPg-00028p-RP for submit@debbugs.gnu.org; Thu, 10 Apr 2014 05:36:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBPb-0006QO-Rm for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:36:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYBPV-00025i-SF for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:36:47 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:42961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYBPV-00025M-My for bug-gnu-emacs@gnu.org; Thu, 10 Apr 2014 05:36:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwGAJxlRlOkD3Xv/2dsb2JhbABZrxiCWgGYBXSDPRcNNAFgh2cBAxGaJI9ummABh2AXh2eEbII2hCIElnaBaIY8hjeFT4MyOw Original-Received: from wifi-nat239.ulb.ac.be (HELO LDLC-portable) ([164.15.117.239]) by smtp.ulb.ac.be with ESMTP; 10 Apr 2014 11:36:39 +0200 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:87922 Archived-At: Steps to reproduce from -Q : M-x ediff-regions-wordwise RET RET ; selects scratch buf RET ; ditto C-SPC C-n C-M-c ; select first line of scratch buffer C-n C-SPC C-n C-M-c ; select second line of scratch buffer n ; go to next difference That makes an error > Wrong type argument: number-or-marker-p, (nil . 100) in function ediff-highest-priority, which comes from commit > cdb3fff3f588caeed50cbb5b64c09bce0a0b31e3 > Author: Stefan Monnier > Date: Sun Mar 23 18:30:47 2014 -0400 > * lisp/simple.el (redisplay-highlight-region-function): Increase priority of > overlay to make sure boundaries are visible. > * src/buffer.c (struct sortvec): Add field `spriority'. > (compare_overlays): Use it. > (sort_overlays): Set it. where the notion of the "priority" of an overlay was changed : it can now be a cons cell (which holds a priority and a secondary priority). The changelog mentions bug#15899 but I saw nothing in that (very long) thread mentionning the fix. At (info "(elisp) Overlay Properties") however it is said that the priority "should be a non-negative integer". Also, and that's where the error comes from, ediff-init.el relies on the priority being either nil or an integer, in function ediff-highest-priority. For this I can suggest a fix (see patch below) but I don't know what lispref should say about the change. In GNU Emacs 24.3.50.6 (i686-pc-linux-gnu, GTK+ Version 2.24.20) of 2014-04-09 on LDLC-portable Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54ac144..3ed0195 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-04-10 Nicolas Richard + + * vc/ediff-init.el (ediff-highest-priority): Don't make an error + if overlay priority is a cons. + 2014-04-09 Dmitry Gutov * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more Modified lisp/vc/ediff-init.el diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 000fdb9..110dc63 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -1352,7 +1352,12 @@ this variable represents.") (null (ediff-overlay-get ovr 'ediff)) (null (ediff-overlay-get ovr 'ediff-diff-num))) ;; use the overlay priority or 0 - (or (ediff-overlay-get ovr 'priority) 0) + (let ((priority (ediff-overlay-get ovr 'priority))) + (cond ((integerp priority) + priority) + ((consp priority) + (or (car priority) (cdr priority))) + (t 0))) 0)) ovr-list)))))))) -- Nico.