all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 17324-done@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <jwv38h4gqny.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87fvl49sib.fsf@geodiff-mac3.ulb.ac.be> (Nicolas Richard's message of "Wed, 23 Apr 2014 13:54:58 +0200")

> 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





      reply	other threads:[~2014-04-23 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23 11:54 bug#17324: 24.3.90; (wrong-type-argument number-or-marker-p nil) in redisplay--update-region-highlight Nicolas Richard
2014-04-23 12:54 ` Stefan Monnier [this message]

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=jwv38h4gqny.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17324-done@debbugs.gnu.org \
    --cc=theonewiththeevillook@yahoo.fr \
    /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.