From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Kotta Newsgroups: gmane.emacs.bugs Subject: bug#23810: avoid.el: mouse-avoidance-ignore-p does not ignore file-notify events Date: Mon, 20 Jun 2016 12:41:36 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11377ab0a0ea4f0535b939b0 X-Trace: ger.gmane.org 1466445483 2713 80.91.229.3 (20 Jun 2016 17:58:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 17:58:03 +0000 (UTC) To: 23810@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 19:57:55 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bF3Rx-0000qu-0k for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 19:57:29 +0200 Original-Received: from localhost ([::1]:45419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3Rw-0001Dd-8o for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2016 13:57:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3E0-0004lD-Ca for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:43:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF3Dy-00033w-9x for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:43:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3Dy-00033s-72 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bF3Dy-00074C-02 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonathan Kotta Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146644455127125 (code B ref -1); Mon, 20 Jun 2016 17:43:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jun 2016 17:42:31 +0000 Original-Received: from localhost ([127.0.0.1]:47973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF3DT-00073Q-1M for submit@debbugs.gnu.org; Mon, 20 Jun 2016 13:42:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF3DR-00073E-Mk for submit@debbugs.gnu.org; Mon, 20 Jun 2016 13:42:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF3DL-0002tM-CN for submit@debbugs.gnu.org; Mon, 20 Jun 2016 13:42:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3DL-0002tI-8j for submit@debbugs.gnu.org; Mon, 20 Jun 2016 13:42:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3DI-0004O3-PR for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:42:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF3DH-0002t4-M2 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:42:20 -0400 Original-Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:34705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF3DH-0002t0-9m for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2016 13:42:19 -0400 Original-Received: by mail-pf0-x233.google.com with SMTP id h14so40988374pfe.1 for ; Mon, 20 Jun 2016 10:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=sRP/qBSDJ0rvLE8zQ06ceTPGv7fM+2ZiGd1EU+ucJFs=; b=jbBLuozq0Kq0BQh+wALWJftdl4YhvoM3y+ODXlvhiwqmjPTb2I8ZLhR7stBdmTijLr BbqaXIrBIfBMYf5D+oiUVwq82Q7qijN+71iZUk1qrbPozyFKST6GXJsvrAzUH19Y4qq2 wwSgxGgNWjQyUTTFJdIE2qEDbWs2tapOSWgJ76SQ3FweB06p+J5ndQiDxt9iFqfrr1Ki 4AMS8FVO8JIfx9QhNRIZoZWDijOuY8QHh4pVYjtXZY/rB4yB8oEpak9Y4L1OcIcPvqCG xPkNyP2hDy7hB6/o+bA0Kib+YmE28ScS/H+jN7b55RSLfTkqwNFa40dT2XHBMtyrDtyS DZOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=sRP/qBSDJ0rvLE8zQ06ceTPGv7fM+2ZiGd1EU+ucJFs=; b=jsBzFtwgiGOHBbkJadwdJ+1tTm6fmIMZA4QuRR+4y0p/tKiMNhbaAUP/S2SASMZHvM aGkCWP0uFh0aBx5gkjylPn+0owEofjGYFVbjTscD2rxiBgB3lNMpnvSqbRwXKfekQ1ZN WO9o1ZqXAynBSrsDRoVk6smcLyP81YAQHxsSrHGU5B2PxRvbjdNQQNihp4FW76PzeVzZ 5oWoGAktuWw4cZ6S9qJxnrkW0gW2iy7ocZ/UJi50/4mR6YcUb5zGD1RrU0DXTgOw1AFh DMOdDiYpFfk40bBERd84GlsUL074Tg+TLes8CJWdhAX4cBH1R7oZJYcFbnPYUCXXJe1T GdnQ== X-Gm-Message-State: ALyK8tIHkXedUkRxVLqy31uO5RQi4zDNYq7xsMrMPO+qLGGmCs2wtMvkcrjf9GNrgLiweBQp1BpEsTjS6xe2jA== X-Received: by 10.98.102.133 with SMTP id s5mr22548702pfj.75.1466444535620; Mon, 20 Jun 2016 10:42:15 -0700 (PDT) Original-Received: by 10.66.216.35 with HTTP; Mon, 20 Jun 2016 10:41:36 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119848 Archived-At: --001a11377ab0a0ea4f0535b939b0 Content-Type: text/plain; charset=UTF-8 I use mpd and ncmpcpp. mpd allows sending sound data to a fifo, and ncmpcpp can read from that fifo and do sound visualizations with the data. So when mpd is playing, it is constantly writing to the fifo and generating file-notify events. I'm not entirely sure why Emacs is receiving these events, but it is, and it causes mouse avoidance to kick in without typing. I can't reproduce the the problem reliably, but it occurs regularly. The attached patch fixes it for me, and it just makes sense for mouse-avoidance-ignore-p to ignore file-notify events. I'm not sure if there are additional types of events that it should also ignore; I couldn't find an exhaustive list of all the event types. diff --git a/lisp/avoid.el b/lisp/avoid.el index 3d43539..e42e08a 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -335,7 +335,7 @@ redefine this function to suit your own tastes." (let ((modifiers (event-modifiers (car last-input-event)))) (or (memq (car last-input-event) '(mouse-movement scroll-bar-movement - select-window focus-out)) + select-window focus-out file-notify)) (memq 'click modifiers) (memq 'double modifiers) (memq 'triple modifiers) -- Thanks, Jonathan Kotta Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law. --001a11377ab0a0ea4f0535b939b0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I use mpd and ncmpcpp. =C2=A0mpd allows sending sound= data to a fifo, and ncmpcpp can read from that fifo and do sound visualiza= tions with the data.=C2=A0 So when mpd is playing, it is constantly writing= to the fifo and generating file-notify events.=C2=A0 I'm not entirely = sure why Emacs is receiving these events, but it is, and it causes mouse av= oidance to kick in without typing.=C2=A0 I can't reproduce the the prob= lem reliably, but it occurs regularly.=C2=A0 The attached patch fixes it fo= r me, and it just makes sense for mouse-avoidance-ignore-p to ignore file-n= otify events.=C2=A0 I'm not sure if there are additional types of event= s that it should also ignore; I couldn't find an exhaustive list of all= the event types.

diff --git a/lisp/avoid.el b= /lisp/avoid.el
index 3d43539..e42e08a 100644
-= -- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -335,7 +335,7= @@ redefine this function to suit your own tastes."
=C2=A0<= span class=3D"" style=3D"white-space:pre"> =C2=A0 =C2=A0 (let ((mod= ifiers (event-modifiers (car last-input-event))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (or (memq (= car last-input-event)
=C2=A0 '(mouse-movement scroll-bar-movement
- =C2=A0 select-window focus-= out))
+ =C2= =A0 select-window focus-out file-notify))
=C2=A0 =C2=A0 (memq 'click modifiers)
=C2=A0 =C2=A0 (me= mq 'double modifiers)
=C2=A0 =C2=A0 (memq 'triple modifiers)

--
Thanks,

Jonathan Kotta

= Hofstadter's Law:
=C2=A0 =C2=A0 It always takes longer than you expe= ct, even
=C2=A0 =C2=A0 when you take into account Hofstadter's Law.<= /div>
--001a11377ab0a0ea4f0535b939b0--