GNU bug report logs -
#4854
23.1.50; before-string overlay and show-paren-mode
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Mon, 2 Nov 2009 15:35:04 UTC
Severity: minor
Tags: notabug
Done: Stephen Berman <stephen.berman <at> gmx.net>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 4854 <at> emacsbugs.donarmstrong.com (full text, mbox):
Here's a slightly simpler test, which has partly different behavior from
the one I previously posted.
1. emacs -Q
2. eval this:
(defun my-test ()
(interactive)
(unless (let ((ovlist (overlays-in (1- (point)) (1+ (point)))))
(when ovlist (overlay-get (car ovlist) 'before-string)))
(let ((ov (make-overlay (point) (point) nil)))
(overlay-put ov 'before-string "* "))))
3. eval this:
(global-set-key "\C-cy" 'my-test)
4. Insert the string "(test)" into a buffer, put the cursor on `('.
5. Type `C-c y' and/or `M-x my-test' any number of times: the overlay is
added once only due to `unless', i.e. this is displayed:
* (test)
6. Enable show-paren-mode
7. With the cursor still on `(', type `C-c y' repeatedly
=> each repetition adds an overlay, e.g. after three repetitions this is
displayed (starting from the preceding display):
* * * * (test)
8. With the cursor still on `(' and show-paren-mode still enabled, type
`M-x my-test' repeatedly
=> no overlays are added, i.e. the display remains unchanged
These two things seem very strange: (i) enabling show-paren-mode and
getting the show-paren overlay somehow nullifies the unless test; (ii)
this effect only happens when the command is invoked via a key sequence.
The result after step 7 seems to be a reproducible heisenbug, in that
stepping through my-test (called by typing `C-c y') with edebug does not
result in more than one overlay being added. Also, unlike in my OP with
narrowing, with the above my-test, typing and deleting a self-inserting
character does not prevent repetitions of `C-c y' from adding more
overlays.
If anyone has any idea what's going on here, or how to debug it, I'd be
grateful.
Steve Berman
This bug report was last modified 9 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.