unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [drew.adams@oracle.com: RE: moving overlay loses its priority?]
@ 2006-08-14 19:21 Richard Stallman
  2006-08-20 16:40 ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2006-08-14 19:21 UTC (permalink / raw)


Would someone please DTRT and ack?

------- Start of forwarded message -------
From: "Drew Adams" <drew.adams@oracle.com>
To: "Emacs-Pretest-Bug" <emacs-pretest-bug@gnu.org>
Date: Sat, 12 Aug 2006 18:03:34 -0700
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0018_01C6BE39.A0B7C810"
In-Reply-To: <EIENLHALHGIMHGDOLMIMAEHLCKAA.drew.adams@oracle.com>
Subject: RE: moving overlay loses its priority?
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

This is a multi-part message in MIME format.

- ------=_NextPart_000_0018_01C6BE39.A0B7C810
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Sorry again. In Emacs 20 -q, the tracking works everywhere, but, for some
reason, when tracking, the highlit character is in inverse video (red
foreground on black background). This is true whether over text or a link.
When you first click, before moving the mouse, the highlighting is normal
(red background). I don't know if this info will help find the bug in the
Emacs 22 code or not.

And, in my own setup, where I use a Cyan background for face `highlight',
tracking works OK in both Emacs 20 and 22. I'm not sure why - I've
customized other things as well in my setup, so don't worry about this case.

The point is that tracking over links does not seem to work right in vanilla
Emacs 22 (i.e. with option -Q). The original link mouse-face highlighting
takes priority. Thx.

>  -----Original Message-----
> From: 	Drew Adams [mailto:drew.adams@oracle.com] 
> Sent:	Saturday, August 12, 2006 5:42 PM
> To:	Emacs-Pretest-Bug
> Subject:	RE: moving overlay loses its priority?
> 
> Sorry for forgetting to add this:
> 
> #1 is true also for Emacs 20: the mouse-face text property is inhibited
> over the entire link by applying the overlay to just one character in the
> link.
> 
> #2, however, is not a problem in Emacs 20. This is the main reason I
> reported a bug: the tracking doesn't work in a link. In Emacs 20, it works
> perfectly, even within a link.
> 
> Thx - Drew
> 
> 	 -----Original Message-----
> 	From: 	Drew Adams [mailto:drew.adams@oracle.com] 
> 	Sent:	Saturday, August 12, 2006 5:34 PM
> 	To:	Emacs-Pretest-Bug
> 	Subject:	moving overlay loses its priority?
> 
> 	I'm not sure this is a bug. It might be user ignorance.
> 
> 	I have an overlay that has priority 1000000. It has both a face and
> a
> 	mouse-face property. When I place it over a face, it shows up. When
> I
> 	place it over a mouse-face (e.g. a link in Info), it shows up also
> 	(takes precedence over the link mouse-face), but I notice two
> things,
> 	which I don't understand:
> 
> 	1. If applied to just part of some text that has a mouse-face text
> 	   property, it takes precedence over the entire string of text with
> 	   that property, not just over the part that has the overlay.
> 
> 	2. If I move the overlay slightly, then it no longer has precedence
> -
> 	   the text's mouse-face shows again.
> 
> 	Recipe:
> 
> 	1. emacs -Q
> 	2. Load the code below.
> 	3. C-h i, and enter some Info manual.
> 
> 	4. Press and hold mouse-2 on some text in the buffer. You'll see
> that
> 	   as long as mouse-2 remains pressed, the red overlay is shown over
> 	   the yank-position character. Even if you move the mouse, as long
> as
> 	   mouse-2 remains pressed, the overlay moves with the mouse
> position.
> 
> 	5. Press and hold mouse-2 over an Info link. You should see the same
> 	   behavior as with text, because the overlay has identical face and
> 	   mouse-face properties.
> 
> 	What you in fact see is this:
> 
> 	1. The overlay shows on the yank-position character when you first
> 	   press mouse-2, but the entire link mouse-face highlighting
> 	   disappears. That is, there is no highlighting on the link, except
> 	   for the red mouse-2 highlighting of the yank position. I don't
> 	   understand why this happens.
> 
> 	2. If you move the mouse within the link, keeping mouse-2 pressed,
> the
> 	   text's mouse-face comes back over the entire link - there is no
> 	   tracking of the yank position with the red mouse-face overlay.
> 
> 	The code for mouse-flash-position and mouse-flash-posn-track was
> 	inspired from mouse-drag-region and mouse-drag-track, respectively.
> I
> 	don't think there is anything in their code that would cause this
> 	behavior, but I'm not 100% sure.
> 
> 	Is this a bug? If not, can you perhaps point out my
> misunderstanding?
> 	Thx.
> 
> 	-------------8<--------------------------
> 
> 	(global-set-key [down-mouse-2] 'mouse-flash-position)
> 
> 	(defface mouse-flash-position '((t (:background "Red")))
> 	  "*Face used to highlight mouse position temporarily."
> 	  :group 'mouse)
> 
> 	(defconst mouse-flash-posn-overlay
> 	    ;; Create and immediately delete, to get "overlay in no buffer".
> 	  (let ((ol (make-overlay (point-min) (point-min))))
> 	    (delete-overlay ol)
> 	    (overlay-put ol 'face 'mouse-flash-position)
> 	    (overlay-put ol 'mouse-face 'mouse-flash-position)
> 	    (overlay-put ol 'priority 1000000)
> 	    ol)
> 	  "Overlay to highlight current mouse position.")
> 
> 	(defun mouse-move-flash-posn-overlay (ol start end)
> 	  "Move `mouse-flash-posn-overlay' to position END.
> 	START is the position of the start of the current drag operation."
> 	  (unless (= start end)
> 	    ;; Go to START first, so that when we move to END, if it's in
> the middle
> 	    ;; of intangible text, point jumps in the direction away from
> START.
> 	    ;; Don't do it if START=END, otherwise a single click risks
> selecting
> 	    ;; a region if it's on intangible text.  This exception was
> originally
> 	    ;; only applied on entry to mouse-drag-region, which had the
> problem
> 	    ;; that a tiny move during a single-click would cause the
> intangible
> 	    ;; text to be selected.
> 	    (goto-char start)
> 	    (goto-char end)
> 	    (setq end (point)))
> 	  (move-overlay ol end (min (point-max) (1+ end))))
> 
> 	;; Inspired from `mouse-drag-region'.
> 	;;;###autoload
> 	(defun mouse-flash-position (start-event)
> 	  "Highlight the mouse position as you drag the mouse.
> 	This must be bound to a button-down mouse event.  If you bind this
> to
> 	`down-mouse-2', and `mouse-2' is bound to `mouse-yank-at-click' (the
> 	default), then the yank occurs just before the highlighted
> character.
> 
> 	If you want to prevent the `mouse-2' up-button yank from taking
> place,
> 	perhaps because you changed your mind, you can press and hold `C-g'
> 	while releasing the mouse button (press `mouse-2'; drag; press
> `C-g';
> 	release `mouse-2'; release `C-g')."
> 	  (interactive "e")
> 	  (run-hooks 'mouse-leave-buffer-hook)  ; Let temporary modes such
> as isearch turn off.
> 	  (mouse-flash-posn-track start-event))
> 
> 	(defun mouse-flash-posn-track (start-event)
> 	  "Track mouse drags by highlighting the mouse position"
> 	  (mouse-minibuffer-check start-event)
> 	  (let* ((original-window (selected-window))
> 	         (echo-keystrokes 0)
> 		 (start-posn (event-start start-event))
> 		 (start-point (posn-point start-posn))
> 		 (start-window (posn-window start-posn))
> 		 (start-window-start (window-start start-window))
> 		 (start-hscroll (window-hscroll start-window))
> 		 (bounds (window-edges start-window))
> 		 (make-cursor-line-fully-visible nil)
> 		 (top (nth 1 bounds))
> 		 (bottom (if (window-minibuffer-p start-window)
> 			     (nth 3 bounds)
> 			   (1- (nth 3 bounds))))) ; 1-: Don't count the mode
> line.
> 	    (mouse-move-flash-posn-overlay mouse-flash-posn-overlay
> start-point start-point)
> 	    (overlay-put mouse-flash-posn-overlay 'window start-window)
> 	    (deactivate-mark)
> 	    (unwind-protect
> 	         (let (event end end-point last-end-point)
> 	           (track-mouse
> 	             (while (progn (setq event (read-event))
> 	                           (or (mouse-movement-p event)
> 	                               (memq (car-safe event) '(switch-frame
> select-window))))
> 	               (unless (memq (car-safe event) '(switch-frame
> select-window))
> 	                 (setq end (event-end event)
> 	                       end-point (posn-point end))
> 	                 (when (numberp end-point) (setq last-end-point
> end-point))
> 	                 (cond
> 	                   ((and (eq (posn-window end) start-window) ;
> Moving within original window.
> 	                         (integer-or-marker-p end-point))
> 	                    (mouse-move-flash-posn-overlay
> mouse-flash-posn-overlay
> 	                                                   start-point
> end-point))
> 	                   (t
> 	                    (let ((mouse-row (cddr (mouse-position))))
> 	                      (cond
> 	                        ((null mouse-row))
> 	                        ((< mouse-row top)
> 	                         (mouse-scroll-subr start-window (-
> mouse-row top)
> 	                                            mouse-flash-posn-overlay
> start-point))
> 	                        ((>= mouse-row bottom)
> 	                         (mouse-scroll-subr start-window (1+ (-
> mouse-row bottom))
> 	                                            mouse-flash-posn-overlay
> start-point)))))))))
> 	           ;; In case we did not get a mouse-motion event for the
> final move of
> 	           ;; the mouse before a drag event, pretend that we did get
> one.
> 	           (when (and (memq 'drag (event-modifiers (car-safe
> event)))
> 	                      (setq end (event-end event)  end-point
> (posn-point end))
> 	                      (eq (posn-window end) start-window)
> 	                      (integer-or-marker-p end-point))
> 	             (mouse-move-flash-posn-overlay mouse-flash-posn-overlay
> start-point end-point))
> 	           (when (consp event)          ; Handle the terminating
> event.
> 	             (let ((fun (key-binding (vector (car event)))))
> 	               ;; Run the binding of the terminating up-event, if
> possible.
> 	               (let* ((stop-point (if (numberp (posn-point
> (event-end event)))
> 	                                      (posn-point (event-end event))
> 	                                    last-end-point))
> 	                      (drag-end (if (and stop-point (< stop-point
> start-point))
> 	                                    (overlay-start
> mouse-flash-posn-overlay)
> 	                                  (overlay-end
> mouse-flash-posn-overlay)))
> 	                      (drag-start (- (+ (overlay-end
> mouse-flash-posn-overlay)
> 	                                        (overlay-start
> mouse-flash-posn-overlay))
> 	                                     drag-end))
> 	                      last-command this-command)
> 	                 (delete-overlay mouse-flash-posn-overlay)
> 	                 (when (and (= start-hscroll (window-hscroll
> start-window))
> 	                            (or end-point
> 	                                (= (window-start start-window)
> start-window-start)))
> 	                   (push event unread-command-events))))))
> 	      (delete-overlay mouse-flash-posn-overlay))))
> 
> 	-------------8<--------------------------
> 
> 
> 
> 
> 
> 	In GNU Emacs 22.0.50.1 (i386-msvc-nt5.1.2600)
> 	 of 2006-07-19 on BOS-CTHEWLAP2
> 	X server distributor `Microsoft Corp.', version 5.1.2600
> 	configured using `configure --with-msvc (12.00)'
> 
> 	Important settings:
> 	  value of $LC_ALL: nil
> 	  value of $LC_COLLATE: nil
> 	  value of $LC_CTYPE: nil
> 	  value of $LC_MESSAGES: nil
> 	  value of $LC_MONETARY: nil
> 	  value of $LC_NUMERIC: nil
> 	  value of $LC_TIME: nil
> 	  value of $LANG: ENU
> 	  locale-coding-system: cp1252
> 	  default-enable-multibyte-characters: t
> 
> 	Major mode: Info
> 
> 	Minor modes in effect:
> 	  encoded-kbd-mode: t
> 	  tooltip-mode: t
> 	  tool-bar-mode: t
> 	  mouse-wheel-mode: t
> 	  menu-bar-mode: t
> 	  file-name-shadow-mode: t
> 	  global-font-lock-mode: t
> 	  font-lock-mode: t
> 	  blink-cursor-mode: t
> 	  unify-8859-on-encoding-mode: t
> 	  utf-translate-cjk-mode: t
> 	  auto-compression-mode: t
> 	  line-number-mode: t
> 
> 	Recent input:
> 	<mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> <mouse-1> 
> 	<mouse-1> <mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
> 	<help-echo> <down-mouse-1> <down-mouse-1> <mouse-1> 
> 	C-x 1 u <help-echo> <down-mouse-1> <mouse-1> C-x b 
> 	<return> M-x r e v e r t - b u <return> y e s <return> 
> 	C-M-x C-h i <help-echo> <down-mouse-2> <help-echo> 
> 	<help-echo> <help-echo> <help-echo> <help-echo> C-g 
> 	C-g <C-drag-mouse-2> C-g C-g C-g C-g C-g C-g C-g C-g 
> 	C-g C-g C-g C-g <help-echo> <help-echo> <help-echo> 
> 	<down-mouse-2> <help-echo> C-g <C-drag-mouse-2> C-g 
> 	C-g C-g C-g <help-echo> C-g <help-echo> C-g <help-echo> 
> 	C-g C-g C-g C-g C-g C-g C-g C-g C-g C-g C-g <help-echo> 
> 	<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
> 	<menu-bar> <help-menu> <report-emacs-bug>
> 
> 	Recent messages:
> 	Resetting customization items...done
> 	Creating customization setup...done
> 	Loading info...done
> 	Composing main Info directory...done
> 	Mark set
> 	mouse-flash-position
> 	Quit [32 times]
> 	mouse-flash-posn-overlay
> 	Quit [32 times]
> 	Loading emacsbug...done

- ------=_NextPart_000_0018_01C6BE39.A0B7C810
Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="winmail.dat"

eJ8+IiIBAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIg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9M
TUlNQ0VITENLQUEuZHJldy5hZGFtc0BvcmFjbGUuY29tPgAAAAADAAYQgftXbQMABxDVIQAAAwAQ
EAAAAAADABEQAAAAAB4ACBABAAAAZQAAAFNPUlJZQUdBSU5JTkVNQUNTMjAtUSxUSEVUUkFDS0lO
R1dPUktTRVZFUllXSEVSRSxCVVQsRk9SU09NRVJFQVNPTixXSEVOVFJBQ0tJTkcsVEhFSElHSExJ
VENIQVJBQ1RFUkkAAAAAkSg=

- ------=_NextPart_000_0018_01C6BE39.A0B7C810
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

- ------=_NextPart_000_0018_01C6BE39.A0B7C810--
------- End of forwarded message -------

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

* Re: [drew.adams@oracle.com: RE: moving overlay loses its priority?]
  2006-08-14 19:21 [drew.adams@oracle.com: RE: moving overlay loses its priority?] Richard Stallman
@ 2006-08-20 16:40 ` Chong Yidong
  2006-08-20 18:04   ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2006-08-20 16:40 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Would someone please DTRT and ack?

The original bug report is to complicated to work with, but the basic
problem (as noted by Kim Storm) is that inside a `track-mouse' form,
`read-event' is not returning mouse motion events if there is a
`help-echo' text property present (NOT `mouse-face' as mistakenly
stated in a previous thread).

I suspect the problem lies in note_mouse_movement in xterm.c, and that
it is related to the "tooltip frame" problems in that code that we
dealt with about a year ago.

Here is a simple way to reproduce the problem.

;; F2 to create the test buffer, then F3 to report mouse movements
(global-set-key [f2] 'test-mouse-track)
(global-set-key [f3] 'report-mouse-movements)

(defun test-mouse-track ()
  (interactive)
  (with-output-to-temp-buffer "Foo"
    (set-buffer "Foo")
    (erase-buffer)
    (insert (propertize "Mouse tracking is stuck here"
			'help-echo "mouse-2: select this buffer"))))

(defun report-mouse-movements ()
  (interactive)
  (let (done read)
    (track-mouse
      (while (not done)
	(setq read (read-event))
	(if (eq (car-safe read) 'mouse-1)
	    (setq done t)
	  (message "%s" (prin1-to-string read)))))))

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

* Re: [drew.adams@oracle.com: RE: moving overlay loses its priority?]
  2006-08-20 16:40 ` Chong Yidong
@ 2006-08-20 18:04   ` Chong Yidong
  2006-08-20 21:05     ` Kim F. Storm
  2006-08-21 11:13     ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Chong Yidong @ 2006-08-20 18:04 UTC (permalink / raw)


> The basic problem (as noted by Kim Storm) is that inside a
> `track-mouse' form, `read-event' is not returning mouse motion
> events if there is a `help-echo' text property present (NOT
> `mouse-face' as mistakenly stated in a previous thread).

I found the problem.  show_help_echo calls mouse-fixup-help-message,
which calls mouse-pixel-position, which calls XTmouse_position, whose
side-effect is to clear the mouse_moved flags of every frame.  The
documentation of XTmouse_position says that this is "so we can wait
for the next mouse movement", but it causes a bug if we are in the
middle of tracking the mouse.

I've checked in a fix into show_help_echo.  Now, when we are tracking
the mouse, we save the mouse_moved flag and restore it after the call
to mouse-fixup-help-message.

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

* Re: [drew.adams@oracle.com: RE: moving overlay loses its priority?]
  2006-08-20 18:04   ` Chong Yidong
@ 2006-08-20 21:05     ` Kim F. Storm
  2006-08-21 11:13     ` Richard Stallman
  1 sibling, 0 replies; 5+ messages in thread
From: Kim F. Storm @ 2006-08-20 21:05 UTC (permalink / raw)
  Cc: rms, emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

>> The basic problem (as noted by Kim Storm) is that inside a
>> `track-mouse' form, `read-event' is not returning mouse motion
>> events if there is a `help-echo' text property present (NOT
>> `mouse-face' as mistakenly stated in a previous thread).
>
> I found the problem.  show_help_echo calls mouse-fixup-help-message,
> which calls mouse-pixel-position, which calls XTmouse_position, whose
> side-effect is to clear the mouse_moved flags of every frame.  The
> documentation of XTmouse_position says that this is "so we can wait
> for the next mouse movement", but it causes a bug if we are in the
> middle of tracking the mouse.
>
> I've checked in a fix into show_help_echo.  Now, when we are tracking
> the mouse, we save the mouse_moved flag and restore it after the call
> to mouse-fixup-help-message.

Great.  Thanks for fixing this.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: [drew.adams@oracle.com: RE: moving overlay loses its priority?]
  2006-08-20 18:04   ` Chong Yidong
  2006-08-20 21:05     ` Kim F. Storm
@ 2006-08-21 11:13     ` Richard Stallman
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2006-08-21 11:13 UTC (permalink / raw)
  Cc: emacs-devel

    I've checked in a fix into show_help_echo.  Now, when we are tracking
    the mouse, we save the mouse_moved flag and restore it after the call
    to mouse-fixup-help-message.

Thanks for fixing this.

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

end of thread, other threads:[~2006-08-21 11:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-14 19:21 [drew.adams@oracle.com: RE: moving overlay loses its priority?] Richard Stallman
2006-08-20 16:40 ` Chong Yidong
2006-08-20 18:04   ` Chong Yidong
2006-08-20 21:05     ` Kim F. Storm
2006-08-21 11:13     ` Richard Stallman

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).