GNU bug report logs - #17324
24.3.90; (wrong-type-argument number-or-marker-p nil) in redisplay--update-region-highlight

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Wed, 23 Apr 2014 11:55:01 UTC

Severity: normal

Found in version 24.3.90

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 17324-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 17324-done <at> debbugs.gnu.org
Subject: Re: bug#17324: 24.3.90;
 (wrong-type-argument number-or-marker-p nil) in
 redisplay--update-region-highlight
Date: Wed, 23 Apr 2014 08:54:18 -0400
> I got the following error (but I can't reproduce it in a fresh session) :
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   min(2623 nil)
[...]
>   redisplay--update-region-highlight(#<window 3 on *Backtrace*>)

I've been tracking down this problem for a while now, but can't seem to
find its source.  So I installed the patch below to work around it for now.


        Stefan


--- lisp/simple.el	2014-04-12 19:20:44 +0000
+++ lisp/simple.el	2014-04-23 12:50:59 +0000
@@ -4495,7 +4495,12 @@
 mode is enabled.  Usually, such commands should use
 `use-region-p' instead of this function, because `use-region-p'
 also checks the value of `use-empty-active-region'."
-  (and transient-mark-mode mark-active))
+  (and transient-mark-mode mark-active
+       ;; FIXME: Somehow we sometimes end up with mark-active non-nil but
+       ;; without the mark being set (e.g. bug#17324).  We really should fix
+       ;; that problem, but in the mean time, let's make sure we don't say the
+       ;; region is active when there's no mark.
+       (mark)))
 
 
 (defvar redisplay-unhighlight-region-function




This bug report was last modified 11 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.