* bug#17324: 24.3.90; (wrong-type-argument number-or-marker-p nil) in redisplay--update-region-highlight
@ 2014-04-23 11:54 Nicolas Richard
2014-04-23 12:54 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Richard @ 2014-04-23 11:54 UTC (permalink / raw)
To: 17324
Hi,
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)
(let* ((pt (window-point window)) (mark (mark)) (start (min pt mark)) (end (max pt mark)) (new (funcall redisplay-highlight-region-function start end window rol))) (if (equal new rol) nil (set-window-parameter window (quote internal-region-overlay) new)))
(if (not (region-active-p)) (funcall redisplay-unhighlight-region-function rol) (let* ((pt (window-point window)) (mark (mark)) (start (min pt mark)) (end (max pt mark)) (new (funcall redisplay-highlight-region-function start end window rol))) (if (equal new rol) nil (set-window-parameter window (quote internal-region-overlay) new))))
(let ((rol (window-parameter window (quote internal-region-overlay)))) (if (not (region-active-p)) (funcall redisplay-unhighlight-region-function rol) (let* ((pt (window-point window)) (mark (mark)) (start (min pt mark)) (end (max pt mark)) (new (funcall redisplay-highlight-region-function start end window rol))) (if (equal new rol) nil (set-window-parameter window (quote internal-region-overlay) new)))))
(save-current-buffer (set-buffer (window-buffer window)) (let ((rol (window-parameter window (quote internal-region-overlay)))) (if (not (region-active-p)) (funcall redisplay-unhighlight-region-function rol) (let* ((pt (window-point window)) (mark (mark)) (start (min pt mark)) (end (max pt mark)) (new (funcall redisplay-highlight-region-function start end window rol))) (if (equal new rol) nil (set-window-parameter window (quote internal-region-overlay) new))))))
redisplay--update-region-highlight(#<window 3 on *Backtrace*>)
#[0 "\300\242\204\n.\303\304 !\207\300\242<\204.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#17324: 24.3.90; (wrong-type-argument number-or-marker-p nil) in redisplay--update-region-highlight
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
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-04-23 12:54 UTC (permalink / raw)
To: Nicolas Richard; +Cc: 17324-done
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-23 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.