unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)
@ 2014-03-09 18:41 Drew Adams
  2014-03-10  2:56 ` Stefan Monnier
  2014-03-11 17:12 ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Drew Adams @ 2014-03-09 18:41 UTC (permalink / raw)
  To: 16975


In a new session, with my setup, I did C-h v post-command-hook.  That
showed this as the value:

(global-font-lock-mode-check-buffers 1on1-change-cursor-on-input-method
1on1-change-cursor-on-overwrite/read-only 1on1-fit-minibuffer-frame)

Then I did this:

M-: (remove-hook 'post-command-hook '1on1-change-cursor-on-input-method)

And I got this backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  redisplay--update-region-highlight(#<window 10 on *Help*>)
  mapc(redisplay--update-region-highlight (#<window 10 on *Help*> #<window 8 on drews-lisp-20>))
  #[...
  funcall(#[...
  redisplay--update-region-highlights(t)
  apply(redisplay--update-region-highlights t)
  #[...
  redisplay_internal\ \(C\ function\)()

However, trying to reproduce that in another new session, I was unable
to repro it.  HTH - if not, feel free to close the bug.



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-03-04 on ODIEONE
Bzr revision: 116662 kbrown@cornell.edu-20140304190249-6s13s5bwn3un3hfe
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' 'CPPFLAGS=-DGC_MCHECK=1 -Ic:/Devel/emacs/include'
 LDFLAGS=-Lc:/Devel/emacs/lib'





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)
  2014-03-09 18:41 bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil) Drew Adams
@ 2014-03-10  2:56 ` Stefan Monnier
  2014-03-11 17:12 ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2014-03-10  2:56 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16975

I've seen the above bug as well (tho don't have a recipe for it yet
either).  Not sure exactly where it's coming from, but I have a few
potential culprits lined up.


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)
  2014-03-09 18:41 bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil) Drew Adams
  2014-03-10  2:56 ` Stefan Monnier
@ 2014-03-11 17:12 ` Stefan Monnier
  2014-03-11 17:24   ` Drew Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-03-11 17:12 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16975

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   redisplay--update-region-highlight(#<window 10 on *Help*>)

I installed the patch below, which fixes problems that can cause
the above.  Of course, those problems may come from elsewhere as well,
so please try it out and tell me if you still bump into the problem with
this patch applied.


        Stefan


--- lisp/simple.el	2014-03-06 04:11:08 +0000
+++ lisp/simple.el	2014-03-11 16:56:06 +0000
@@ -4415,14 +4415,18 @@
 store it in a Lisp variable.  Example:
 
    (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
-
-  (set-marker (mark-marker) pos (current-buffer))
   (if pos
-      (activate-mark 'no-tmm)
+      (progn
+        (set-marker (mark-marker) pos (current-buffer))
+        (activate-mark 'no-tmm))
     ;; Normally we never clear mark-active except in Transient Mark mode.
     ;; But when we actually clear out the mark value too, we must
     ;; clear mark-active in any mode.
-    (deactivate-mark t)))
+    (deactivate-mark t)
+    ;; `deactivate-mark' sometimes leaves mark-active non-nil, but
+    ;; it should never be nil if the mark is nil.
+    (setq mark-active nil)
+    (set-marker (mark-marker) nil)))
 
 (defcustom use-empty-active-region nil
   "Whether \"region-aware\" commands should act on empty regions.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)
  2014-03-11 17:12 ` Stefan Monnier
@ 2014-03-11 17:24   ` Drew Adams
  2014-03-12 14:15     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2014-03-11 17:24 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 16975

> I installed the patch below, which fixes problems that can cause
> the above.  Of course, those problems may come from elsewhere as well,
> so please try it out and tell me if you still bump into the problem with
> this patch applied.

Thanks for working on this.  I have seen this only once.  I doubt that
I will see it again, with or without your patch.  IOW, if I don't see
it again we will not know whether that might have been the case even
without your patch.

I suggest that you just apply your patch to the product now, if it
seems reasonable to you.  Someone can file a new bug report if it
turns out that the patch either does not solve this problem or
introduces new problems.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil)
  2014-03-11 17:24   ` Drew Adams
@ 2014-03-12 14:15     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2014-03-12 14:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16975

> I suggest that you just apply your patch to the product now, if it

As mentioned in the message you quote: "I installed the patch below".

> seems reasonable to you.  Someone can file a new bug report if it
> turns out that the patch either does not solve this problem or
> introduces new problems.

I'm just asking you to use the patch until you "update your Emacs".
So that if you see the error again, we'll know it's still out there.


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-12 14:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-09 18:41 bug#16975: 24.3.50; redisplay--update-region-highlight: (wrong-type-argument number-or-marker-p nil) Drew Adams
2014-03-10  2:56 ` Stefan Monnier
2014-03-11 17:12 ` Stefan Monnier
2014-03-11 17:24   ` Drew Adams
2014-03-12 14:15     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).