GNU bug report logs - #22537
25.1.50; cursor-sensor-mode strangeness

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Tue, 2 Feb 2016 21:21:02 UTC

Severity: normal

Found in version 25.1.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Helmut Eller <eller.helmut <at> gmail.com>
To: 22537 <at> debbugs.gnu.org
Subject: bug#22537: 25.1.50; cursor-sensor-mode strangeness
Date: Tue, 02 Feb 2016 22:20:44 +0100
When executing the example below with: emacs -Q -nw -l test.el
Emacs prints
   "result: ((1 2 entered) (5 6 left))"
I would expect this instead:
   ((1 2 entered) (2 3 left) (4 5 entered) (5 6 left))

(progn
  (defvar test-result '())

  (defun test-sensor (_ pos entered/left)
    (push (list pos (point) entered/left) test-result))

  (defun test ()
    (interactive)
    (setq test-result '())
    (with-current-buffer (get-buffer-create "test")
      (erase-buffer)
      (insert "x")
      (insert (propertize "a" 'cursor-sensor-functions (list #'test-sensor)))
      (insert "y")
      (insert (propertize "b" 'cursor-sensor-functions (list #'test-sensor)))
      (insert "z")
      (cursor-sensor-mode 1)
      (save-selected-window
	(let ((win (display-buffer (current-buffer))))
	  (select-window win)
	  (goto-char (point-min)))
	(while (not (eobp))
	  (redisplay t)
	  (forward-char))
	(redisplay t)))
    (message "result: %S" (reverse test-result)))

  (test))

In GNU Emacs 25.1.50.3 (i686-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2016-01-29 built on ix
Repository revision: 487bd7aedf9bbbf0b939b653912253fbeb7d16b9
System Description:	Debian GNU/Linux 8.0 (jessie)

Configured using:
 'configure --with-jpeg=no --with-gif=no --with-tiff=no'

Configured features:
XPM PNG RSVG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix




This bug report was last modified 4 years and 170 days ago.

Previous Next


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