all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: 22537@debbugs.gnu.org
Subject: bug#22537: 25.1.50; cursor-sensor-mode strangeness
Date: Tue, 02 Feb 2016 22:20:44 +0100	[thread overview]
Message-ID: <m2egcuyfkj.fsf@gmail.com> (raw)

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





             reply	other threads:[~2016-02-02 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 21:20 Helmut Eller [this message]
2020-12-03  9:49 ` bug#22537: 25.1.50; cursor-sensor-mode strangeness Lars Ingebrigtsen

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=m2egcuyfkj.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=22537@debbugs.gnu.org \
    /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.