From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
To: 17234@debbugs.gnu.org
Subject: bug#17234: 24.3.50; overlay priority : cons cells make an error in ediff
Date: Thu, 10 Apr 2014 11:36:38 +0200 [thread overview]
Message-ID: <878urdmvr0.fsf@yahoo.fr> (raw)
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 <monnier@iro.umontreal.ca>
> 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 <theonewiththeevillook@yahoo.fr>
+
+ * vc/ediff-init.el (ediff-highest-priority): Don't make an error
+ if overlay priority is a cons.
+
2014-04-09 Dmitry Gutov <dgutov@yandex.ru>
* 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.
next reply other threads:[~2014-04-10 9:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 9:36 Nicolas Richard [this message]
2014-04-10 19:17 ` bug#17234: 24.3.50; overlay priority : cons cells make an error in ediff Stefan Monnier
2014-04-11 0:56 ` Glenn Morris
2014-04-11 12:30 ` Stefan Monnier
2014-04-11 13:08 ` Eli Zaretskii
2014-04-11 15:56 ` Stefan Monnier
2014-04-11 16:31 ` Glenn Morris
2014-04-11 20:06 ` Stefan Monnier
2014-04-11 20:22 ` Glenn Morris
2014-04-15 16:55 ` Stefan Monnier
2014-04-11 17:12 ` Eli Zaretskii
2014-04-11 20:07 ` Stefan Monnier
2014-04-21 13:47 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878urdmvr0.fsf@yahoo.fr \
--to=theonewiththeevillook@yahoo.fr \
--cc=17234@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.