From unknown Sun Jun 22 11:34:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10165 <10165@debbugs.gnu.org> To: bug#10165 <10165@debbugs.gnu.org> Subject: Status: [PATCH] Allow setting corner in mouse avoidance mode. Reply-To: bug#10165 <10165@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:34:18 +0000 retitle 10165 [PATCH] Allow setting corner in mouse avoidance mode. reassign 10165 emacs submitter 10165 Thierry Volpiatto severity 10165 wishlist tag 10165 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 00:59:21 2011 Received: (at submit) by debbugs.gnu.org; 30 Nov 2011 05:59:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVdCT-0004vj-9l for submit@debbugs.gnu.org; Wed, 30 Nov 2011 00:59:21 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVdCQ-0004vc-Ff for submit@debbugs.gnu.org; Wed, 30 Nov 2011 00:59:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVdCN-0008R0-EO for submit@debbugs.gnu.org; Wed, 30 Nov 2011 00:59:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:55359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdCM-0008Qt-Vw for submit@debbugs.gnu.org; Wed, 30 Nov 2011 00:59:15 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdCH-00027u-Hs for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 00:59:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVdCG-0008OG-Df for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 00:59:09 -0500 Received: from lo.gmane.org ([80.91.229.12]:59111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdCF-0008Nz-Vz for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 00:59:08 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVdCE-0000vb-LI for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 06:59:06 +0100 Received: from 121.78.88.79.rev.sfr.net ([79.88.78.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 06:59:06 +0100 Received: from thierry.volpiatto by 121.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 06:59:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: [PATCH] Allow setting corner in mouse avoidance mode. Date: Wed, 30 Nov 2011 06:58:54 +0100 Lines: 79 Message-ID: <877h2itald.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 121.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:2HHKZ3ZeXNTJ5pyPlG83Ked5FGE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain > Hi all, > there was nothing except modifying function > `mouse-avoidance-banish-destination' to set in which corner mouse is > banish. > This patch allow setting this through > `mouse-avoidance-banish-destination' user variable like this: > (left . top) or (right . bottom) etc... Thanks. We're in feature freeze---please file this in the bug database so it doesn't get forgotten. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=patch-r118037.patch Content-Description: mouse-avoidance-banish-destination # HG changeset patch # User Thierry Volpiatto # Date 1322632617 -3600 # Node ID 885228e9f341f392fc6886bf2855a66c5bdba6c5 # Parent c511f9c3f7a2cab8b3684b2f1ea4782176988ac6 * lisp/avoid.el: Allow setting in which corner banish move the mouse. (mouse-avoidance-banish-destination): New user variable, a cons pair to specify banish corner position. (mouse-avoidance-banish-destination): Set destination according to mouse-avoidance-banish-destination value. diff --git a/lisp/avoid.el b/lisp/avoid.el --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -115,6 +115,11 @@ :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-destination '(left . top) + "Set the position to which Mouse Avoidance mode `banish' moves the mouse." + :group 'avoid + :type 'list) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,10 +188,18 @@ (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-destination' as you need." + (let* ((pos (loop for v in (window-edges) + for k in '(left top right bottom) + collect (cons k v))) + (side (car mouse-avoidance-banish-destination)) + (up-down (cdr mouse-avoidance-banish-destination)) + (fn (case side + (left '+) + (right '-)))) + (cons (funcall fn (assoc-default side pos) 2) + (assoc-default up-down pos)))) (defun mouse-avoidance-banish-mouse () ;; Put the mouse pointer in the upper-right corner of the current frame. --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 01:05:51 2011 Received: (at submit) by debbugs.gnu.org; 30 Nov 2011 06:05:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVdIl-00055P-9a for submit@debbugs.gnu.org; Wed, 30 Nov 2011 01:05:51 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVdIi-00055H-Iz for submit@debbugs.gnu.org; Wed, 30 Nov 2011 01:05:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVdIg-0001QA-31 for submit@debbugs.gnu.org; Wed, 30 Nov 2011 01:05:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:37243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdIg-0001Q6-1X for submit@debbugs.gnu.org; Wed, 30 Nov 2011 01:05:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:50968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdIe-00030x-R1 for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 01:05:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVdId-0001Po-Le for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 01:05:44 -0500 Received: from lo.gmane.org ([80.91.229.12]:46676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdId-0001Pi-AJ for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 01:05:43 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVdIc-0002Zz-NT for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 07:05:42 +0100 Received: from 121.78.88.79.rev.sfr.net ([79.88.78.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 07:05:42 +0100 Received: from thierry.volpiatto by 121.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 07:05:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Date: Wed, 30 Nov 2011 07:05:29 +0100 Lines: 71 Message-ID: <87y5uyrvpy.fsf@gmail.com> References: <877h2itald.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 121.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:jU52bZvAlDBQPuwwJRY+jHmIXDk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) As a reminder, I will have to put back the original behavior in defcustom, that is to move the mouse by default in the top right corner i.e (defcustom mouse-avoidance-banish-destination '(right . top) Thierry Volpiatto writes: >> Hi all, >> there was nothing except modifying function >> `mouse-avoidance-banish-destination' to set in which corner mouse is >> banish. >> This patch allow setting this through >> `mouse-avoidance-banish-destination' user variable like this: >> (left . top) or (right . bottom) etc... > > Thanks. We're in feature freeze---please file this in the bug database > so it doesn't get forgotten. > > > # HG changeset patch > # User Thierry Volpiatto > # Date 1322632617 -3600 > # Node ID 885228e9f341f392fc6886bf2855a66c5bdba6c5 > # Parent c511f9c3f7a2cab8b3684b2f1ea4782176988ac6 > * lisp/avoid.el: Allow setting in which corner banish move the mouse. > (mouse-avoidance-banish-destination): New user variable, a cons pair to specify banish corner position. > (mouse-avoidance-banish-destination): Set destination according to mouse-avoidance-banish-destination value. > > diff --git a/lisp/avoid.el b/lisp/avoid.el > --- a/lisp/avoid.el > +++ b/lisp/avoid.el > @@ -115,6 +115,11 @@ > :type 'integer > :group 'avoid) > > +(defcustom mouse-avoidance-banish-destination '(left . top) > + "Set the position to which Mouse Avoidance mode `banish' moves the mouse." > + :group 'avoid > + :type 'list) > + > ;; Internal variables > (defvar mouse-avoidance-state nil) > (defvar mouse-avoidance-pointer-shapes nil) > @@ -183,10 +188,18 @@ > > (defun mouse-avoidance-banish-destination () > "The position to which Mouse Avoidance mode `banish' moves the mouse. > -You can redefine this if you want the mouse banished to a different corner." > - (let* ((pos (window-edges))) > - (cons (- (nth 2 pos) 2) > - (nth 1 pos)))) > +If you want the mouse banished to a different corner set > +`mouse-avoidance-banish-destination' as you need." > + (let* ((pos (loop for v in (window-edges) > + for k in '(left top right bottom) > + collect (cons k v))) > + (side (car mouse-avoidance-banish-destination)) > + (up-down (cdr mouse-avoidance-banish-destination)) > + (fn (case side > + (left '+) > + (right '-)))) > + (cons (funcall fn (assoc-default side pos) 2) > + (assoc-default up-down pos)))) > > (defun mouse-avoidance-banish-mouse () > ;; Put the mouse pointer in the upper-right corner of the current frame. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 04:57:52 2011 Received: (at 10165) by debbugs.gnu.org; 30 Nov 2011 09:57:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVgvH-0001xt-VL for submit@debbugs.gnu.org; Wed, 30 Nov 2011 04:57:52 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVgvE-0001xe-Qb for 10165@debbugs.gnu.org; Wed, 30 Nov 2011 04:57:49 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 9DB4C684073; Wed, 30 Nov 2011 01:57:45 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 59886451C558; Wed, 30 Nov 2011 01:57:32 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> Date: Wed, 30 Nov 2011 11:32:32 +0200 In-Reply-To: <877h2itald.fsf@gmail.com> (Thierry Volpiatto's message of "Wed, 30 Nov 2011 06:58:54 +0100") Message-ID: <87pqgaj757.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> there was nothing except modifying function >> `mouse-avoidance-banish-destination' to set in which corner mouse is >> banish. >> This patch allow setting this through >> `mouse-avoidance-banish-destination' user variable like this: >> (left . top) or (right . bottom) etc... FWIW, I have in my .emacs: ;; Move the mouse to the screen corner on any keypress. (when (and (display-mouse-p) (require 'avoid nil t)) ;; Move the mouse to the lower-right corner instead of default upper-right (defun mouse-avoidance-banish-destination () (cons (+ 3 (frame-width)) (- (frame-height) 1))) (mouse-avoidance-mode 'banish)) It would be better to allow users to replace such code with customization. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 05:31:39 2011 Received: (at 10165) by debbugs.gnu.org; 30 Nov 2011 10:31:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVhRy-0002lG-De for submit@debbugs.gnu.org; Wed, 30 Nov 2011 05:31:39 -0500 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVhRv-0002l8-QC for 10165@debbugs.gnu.org; Wed, 30 Nov 2011 05:31:36 -0500 Received: by bkbzt19 with SMTP id zt19so456491bkb.3 for <10165@debbugs.gnu.org>; Wed, 30 Nov 2011 02:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=RWcGUwvb7m/7ZNiLLdAVa70qogkDYuT84nHtXbQ2oic=; b=T6Y/k58X9ac4r4t1FG/Qd94WPDgvQW00y6sxN0eRFj6LtTX6jP/gkqBPDHD5xYfGhL G6IhT0hVPxI5kgRbx2yFaKQMfNwZzlkTCvYgexFdjRogBfAMAh6SVWoQEzpenDBQmo20 gEJvjpe0I8O17Yy/jnMUI1i4HVx/NWy/m/b+8= Received: by 10.205.123.3 with SMTP id gi3mr1615852bkc.112.1322649092331; Wed, 30 Nov 2011 02:31:32 -0800 (PST) Received: from thierry-MM061 (121.78.88.79.rev.sfr.net. [79.88.78.121]) by mx.google.com with ESMTPS id p13sm3073126bkd.4.2011.11.30.02.31.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Nov 2011 02:31:30 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> Date: Wed, 30 Nov 2011 11:31:26 +0100 In-Reply-To: <87pqgaj757.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 30 Nov 2011 11:32:32 +0200") Message-ID: <87liqxj401.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Juri Linkov writes: >>> there was nothing except modifying function >>> `mouse-avoidance-banish-destination' to set in which corner mouse is >>> banish. >>> This patch allow setting this through >>> `mouse-avoidance-banish-destination' user variable like this: >>> (left . top) or (right . bottom) etc... > > FWIW, I have in my .emacs: > > ;; Move the mouse to the screen corner on any keypress. > (when (and (display-mouse-p) (require 'avoid nil t)) > ;; Move the mouse to the lower-right corner instead of default upper-right > (defun mouse-avoidance-banish-destination () > (cons (+ 3 (frame-width)) (- (frame-height) 1))) > (mouse-avoidance-mode 'banish)) > > It would be better to allow users to replace such code with customization. Yes, it is what my patch does: Instead of your code you can just say: (setq mouse-avoidance-banish-destination '(right . bottom)) or of course setting that through customize interface. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 30 12:40:53 2011 Received: (at submit) by debbugs.gnu.org; 30 Nov 2011 17:40:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVo9N-0005PI-KH for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:40:53 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVo9L-0005PB-96 for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:40:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVo9G-0000DD-4V for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:40:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:60706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVo9G-0000D9-37 for submit@debbugs.gnu.org; Wed, 30 Nov 2011 12:40:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVo9F-0003VQ-8A for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 12:40:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVo9E-0000Cd-6d for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 12:40:45 -0500 Received: from lo.gmane.org ([80.91.229.12]:60780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVo9E-0000CO-1N for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 12:40:44 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVo9B-0008Hb-PI for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2011 18:40:41 +0100 Received: from 52.78.88.79.rev.sfr.net ([79.88.78.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 18:40:41 +0100 Received: from thierry.volpiatto by 52.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Nov 2011 18:40:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Date: Wed, 30 Nov 2011 18:40:20 +0100 Lines: 38 Message-ID: <871uspy0e3.fsf@gmail.com> References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 52.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) Cancel-Lock: sha1:JJZOTHt+bhdsk+fJovU9eE92DnE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) Thierry Volpiatto writes: > Juri Linkov writes: > >>>> there was nothing except modifying function >>>> `mouse-avoidance-banish-destination' to set in which corner mouse is >>>> banish. >>>> This patch allow setting this through >>>> `mouse-avoidance-banish-destination' user variable like this: >>>> (left . top) or (right . bottom) etc... >> >> FWIW, I have in my .emacs: >> >> ;; Move the mouse to the screen corner on any keypress. >> (when (and (display-mouse-p) (require 'avoid nil t)) >> ;; Move the mouse to the lower-right corner instead of default upper-right >> (defun mouse-avoidance-banish-destination () >> (cons (+ 3 (frame-width)) (- (frame-height) 1))) >> (mouse-avoidance-mode 'banish)) >> >> It would be better to allow users to replace such code with customization. > Yes, it is what my patch does: > Instead of your code you can just say: > (setq mouse-avoidance-banish-destination '(right . bottom)) > or of course setting that through customize interface. Also, I have added a new user variable to this patch that allow setting the distance from window's edge: (defcustom mouse-avoidance-banish-distance-from-edge 2 "Set the distance from edge of window in Mouse Avoidance mode `banish'." :group 'avoid :type 'integer) -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 02:48:47 2011 Received: (at 10165) by debbugs.gnu.org; 1 Dec 2011 07:48:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW1Nu-0000R2-Qu for submit@debbugs.gnu.org; Thu, 01 Dec 2011 02:48:47 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW1Ns-0000Qw-VW for 10165@debbugs.gnu.org; Thu, 01 Dec 2011 02:48:45 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 1D7B368405F; Wed, 30 Nov 2011 23:48:37 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 00209451C5C7; Wed, 30 Nov 2011 23:48:23 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> Date: Thu, 01 Dec 2011 09:48:10 +0200 In-Reply-To: <871uspy0e3.fsf@gmail.com> (Thierry Volpiatto's message of "Wed, 30 Nov 2011 18:40:20 +0100") Message-ID: <87ipm0spfp.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >>> FWIW, I have in my .emacs: >>> >>> ;; Move the mouse to the screen corner on any keypress. >>> (when (and (display-mouse-p) (require 'avoid nil t)) >>> ;; Move the mouse to the lower-right corner instead of default upper-right >>> (defun mouse-avoidance-banish-destination () >>> (cons (+ 3 (frame-width)) (- (frame-height) 1))) >>> (mouse-avoidance-mode 'banish)) >>> >>> It would be better to allow users to replace such code with customization. >> Yes, it is what my patch does: >> Instead of your code you can just say: >> (setq mouse-avoidance-banish-destination '(right . bottom)) >> or of course setting that through customize interface. > > Also, I have added a new user variable to this patch that allow setting > the distance from window's edge: > > (defcustom mouse-avoidance-banish-distance-from-edge 2 > "Set the distance from edge of window in Mouse Avoidance mode `banish'." > :group 'avoid > :type 'integer) Thanks, but in my settings the distance is relative to frame's edge instead of window's edge. Is it possible to express this setting with a user variable? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 01 03:45:25 2011 Received: (at 10165) by debbugs.gnu.org; 1 Dec 2011 08:45:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW2Gi-0001lN-Ty for submit@debbugs.gnu.org; Thu, 01 Dec 2011 03:45:25 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RW2Gh-0001lD-3P for 10165@debbugs.gnu.org; Thu, 01 Dec 2011 03:45:23 -0500 Received: by eear51 with SMTP id r51so1041850eea.3 for <10165@debbugs.gnu.org>; Thu, 01 Dec 2011 00:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=txG51UmPJ32gkZZuBLtqZPSKhyEl3MTljjh/hCziOhQ=; b=AkcBUuKdfbaRC/JbQ3IMt0maLmRq8tXQ55Fy9cKABeKz6OL8xL12wdms/WVm72ZulV X0LI/MFXrLaGZDwYXh08iOhhscNoPjwyVweS+hJPDkdRJo5mnrzE9ViC4BXMT0nIZoIF TIFC1iwXM8qLemsNDkVLUXSjMDFEmaPKJG4h0= Received: by 10.14.12.141 with SMTP id 13mr801277eez.37.1322729114213; Thu, 01 Dec 2011 00:45:14 -0800 (PST) Received: from thierry-MM061 (52.78.88.79.rev.sfr.net. [79.88.78.52]) by mx.google.com with ESMTPS id 58sm10514412eet.11.2011.12.01.00.45.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Dec 2011 00:45:13 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> Date: Thu, 01 Dec 2011 09:45:09 +0100 In-Reply-To: <87ipm0spfp.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 01 Dec 2011 09:48:10 +0200") Message-ID: <87ty5ksmsq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) Juri Linkov writes: >>>> FWIW, I have in my .emacs: >>>> >>>> ;; Move the mouse to the screen corner on any keypress. >>>> (when (and (display-mouse-p) (require 'avoid nil t)) >>>> ;; Move the mouse to the lower-right corner instead of default upper-right >>>> (defun mouse-avoidance-banish-destination () >>>> (cons (+ 3 (frame-width)) (- (frame-height) 1))) >>>> (mouse-avoidance-mode 'banish)) >>>> >>>> It would be better to allow users to replace such code with customization. >>> Yes, it is what my patch does: >>> Instead of your code you can just say: >>> (setq mouse-avoidance-banish-destination '(right . bottom)) >>> or of course setting that through customize interface. >> >> Also, I have added a new user variable to this patch that allow setting >> the distance from window's edge: >> >> (defcustom mouse-avoidance-banish-distance-from-edge 2 >> "Set the distance from edge of window in Mouse Avoidance mode `banish'." >> :group 'avoid >> :type 'integer) > > Thanks, but in my settings the distance is relative to frame's edge > instead of window's edge. Is it possible to express this setting > with a user variable? Try this: #+BEGIN_SRC lisp (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. If you want the mouse banished to a different corner set `mouse-avoidance-banish-destination' as you need." (let* ((fra-or-win (case (car mouse-avoidance-banish-distance-from-edge) (frame (list 0 0 (frame-width) (frame-height))) (window (window-edges)))) (pos (loop for v in fra-or-win for k in '(left top right bottom) collect (cons k v))) (side (car mouse-avoidance-banish-destination)) (up-down (cdr mouse-avoidance-banish-destination)) (fn (case side (left '+) (right '-)))) (cons (funcall fn (assoc-default side pos) (cdr mouse-avoidance-banish-distance-from-edge)) (assoc-default up-down pos)))) (defcustom mouse-avoidance-banish-destination '(right . top) "Set the position to which Mouse Avoidance mode `banish' moves the mouse." :group 'avoid :type 'list) (defcustom mouse-avoidance-banish-distance-from-edge '(window . 3) "Set the distance from edge of window in Mouse Avoidance mode `banish'." :group 'avoid :type 'list) #+END_SRC And to fit your settings: (setq mouse-avoidance-banish-destination '(right . bottom)) (setq mouse-avoidance-banish-distance-from-edge '(frame . 3)) -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 02:30:44 2011 Received: (at 10165) by debbugs.gnu.org; 2 Dec 2011 07:30:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWNZz-0001zO-UO for submit@debbugs.gnu.org; Fri, 02 Dec 2011 02:30:44 -0500 Received: from mail-ww0-f42.google.com ([74.125.82.42]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWNZx-0001zH-VQ for 10165@debbugs.gnu.org; Fri, 02 Dec 2011 02:30:43 -0500 Received: by wgbds13 with SMTP id ds13so503023wgb.3 for <10165@debbugs.gnu.org>; Thu, 01 Dec 2011 23:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=p393ChDRZE6TSxUNKlQIhd+zBI03jaBQ6kYhaOyVEUI=; b=eCYYQoAXthAc4n8IZ68pv80R8DxYB5tFW60voXuxMxF6UsiorUvW3FhUC48ZJWK81r Qd1fuYd0iWlUaaC2OwQImvfeztzad7HnUhqAXY9Grc7y7HQSS+8ClAjfbXUG2WoK7pz6 7pw+2A5QmM9EaVmsF9yiiYYEvpT/WjLlCxTyw= Received: by 10.180.18.165 with SMTP id x5mr7829085wid.24.1322811027823; Thu, 01 Dec 2011 23:30:27 -0800 (PST) Received: from thierry-MM061 (40.78.88.79.rev.sfr.net. [79.88.78.40]) by mx.google.com with ESMTPS id ca18sm2630896wib.13.2011.12.01.23.30.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Dec 2011 23:30:26 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> Date: Fri, 02 Dec 2011 08:30:23 +0100 In-Reply-To: <87ipm0spfp.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 01 Dec 2011 09:48:10 +0200") Message-ID: <874nxj4ei8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain Juri Linkov writes: >>>> FWIW, I have in my .emacs: >>>> >>>> ;; Move the mouse to the screen corner on any keypress. >>>> (when (and (display-mouse-p) (require 'avoid nil t)) >>>> ;; Move the mouse to the lower-right corner instead of default upper-right >>>> (defun mouse-avoidance-banish-destination () >>>> (cons (+ 3 (frame-width)) (- (frame-height) 1))) >>>> (mouse-avoidance-mode 'banish)) >>>> >>>> It would be better to allow users to replace such code with customization. >>> Yes, it is what my patch does: >>> Instead of your code you can just say: >>> (setq mouse-avoidance-banish-destination '(right . bottom)) >>> or of course setting that through customize interface. >> >> Also, I have added a new user variable to this patch that allow setting >> the distance from window's edge: >> >> (defcustom mouse-avoidance-banish-distance-from-edge 2 >> "Set the distance from edge of window in Mouse Avoidance mode `banish'." >> :group 'avoid >> :type 'integer) > > Thanks, but in my settings the distance is relative to frame's edge > instead of window's edge. Is it possible to express this setting > with a user variable? Here the improved version of the patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=Singlepatch-r118037ToTip.patch Content-Description: mouse avoidance banish ##Merge of all patches applied from revision 118094 ## patch-r118037: * lisp/avoid.el: Allow setting in which corner banish move the mouse. ## patch-r118084: * lisp/avoid.el (mouse-avoidance-banish-distance-from-edge): Allow banishing mouse in frame or window corner. ## diff --git a/lisp/avoid.el b/lisp/avoid.el --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -115,6 +115,23 @@ :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-destination '(right . top) + "Position to which Mouse Avoidance mode `banish' moves the mouse. + +Valid possible values can be: +\'(right . top\), \'(left . top\), \'(right . bottom\) or \'(left . bottom\)." + :group 'avoid + :type 'list) + +(defcustom mouse-avoidance-banish-distance-from-edge '(window . 2) + "Distance from edge of window or frame in Mouse Avoidance mode `banish'. + +It is a cons cell where the car can be 'window or 'frame +and the cdr and integer representing the distance +from edge of window or frame." + :group 'avoid + :type 'list) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,10 +200,24 @@ (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) + +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-destination' and +`mouse-avoidance-banish-distance-from-edge' as you need." + (let* ((fra-or-win (case (car mouse-avoidance-banish-distance-from-edge) + (frame (list 0 0 (frame-width) (frame-height))) + (window (window-edges)))) + (pos (loop for v in fra-or-win + for k in '(left top right bottom) + collect (cons k v))) + (side (car mouse-avoidance-banish-destination)) + (up-down (cdr mouse-avoidance-banish-destination)) + (fn (case side + (left '+) + (right '-)))) + (cons (funcall fn (assoc-default side pos 'eq) + (cdr mouse-avoidance-banish-distance-from-edge)) + (assoc-default up-down pos 'eq)))) (defun mouse-avoidance-banish-mouse () ;; Put the mouse pointer in the upper-right corner of the current frame. --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 02:36:55 2011 Received: (at submit) by debbugs.gnu.org; 2 Dec 2011 07:36:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWNfx-00028z-Sc for submit@debbugs.gnu.org; Fri, 02 Dec 2011 02:36:54 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWNfu-00028r-Oi for submit@debbugs.gnu.org; Fri, 02 Dec 2011 02:36:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWNfg-0003oD-HH for submit@debbugs.gnu.org; Fri, 02 Dec 2011 02:36:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:53661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWNfg-0003o2-Fo for submit@debbugs.gnu.org; Fri, 02 Dec 2011 02:36:36 -0500 Received: from eggs.gnu.org ([140.186.70.92]:58136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWNff-0005K4-MA for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2011 02:36:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWNfe-0003no-OR for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2011 02:36:35 -0500 Received: from lo.gmane.org ([80.91.229.12]:43714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWNfe-0003na-JS for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2011 02:36:34 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RWNfc-00073O-2Y for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2011 08:36:32 +0100 Received: from 40.78.88.79.rev.sfr.net ([79.88.78.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Dec 2011 08:36:32 +0100 Received: from thierry.volpiatto by 40.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 02 Dec 2011 08:36:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Date: Fri, 02 Dec 2011 08:36:19 +0100 Lines: 18 Message-ID: <87zkfb2znw.fsf@gmail.com> References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 40.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:vFV5MSZH8+Qdnzze9/tNq93uly8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Thierry Volpiatto writes: > +(defcustom mouse-avoidance-banish-distance-from-edge '(window . 2) > + "Distance from edge of window or frame in Mouse Avoidance mode `banish'. > + > +It is a cons cell where the car can be 'window or 'frame > +and the cdr and integer representing the distance > +from edge of window or frame." > + :group 'avoid > + :type 'list) I used same default value as it is actually, but i think using '(frame . 2) as Juri does is much better. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 05:55:07 2011 Received: (at 10165) by debbugs.gnu.org; 2 Dec 2011 10:55:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWQlm-0007be-Mg for submit@debbugs.gnu.org; Fri, 02 Dec 2011 05:55:07 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWQll-0007bX-6n for 10165@debbugs.gnu.org; Fri, 02 Dec 2011 05:55:05 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 9050A68407A; Fri, 2 Dec 2011 02:54:50 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2DE1D451C5C7; Fri, 2 Dec 2011 02:54:35 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> Date: Fri, 02 Dec 2011 12:52:55 +0200 In-Reply-To: <87zkfb2znw.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 02 Dec 2011 08:36:19 +0100") Message-ID: <87y5uvb5x8.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> +(defcustom mouse-avoidance-banish-distance-from-edge '(window . 2) >> + "Distance from edge of window or frame in Mouse Avoidance mode `banish'. >> + >> +It is a cons cell where the car can be 'window or 'frame >> +and the cdr and integer representing the distance >> +from edge of window or frame." >> + :group 'avoid >> + :type 'list) > > I used same default value as it is actually, but i think using > '(frame . 2) as Juri does is much better. Thanks. What do you think about using the same syntax as for the geometry specification? Like (info "(emacs) Window Size X") describes: {+-}XOFFSET{+-}YOFFSET From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 06:24:57 2011 Received: (at 10165) by debbugs.gnu.org; 2 Dec 2011 11:24:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWREe-0001rU-Be for submit@debbugs.gnu.org; Fri, 02 Dec 2011 06:24:57 -0500 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWREc-0001rM-DY for 10165@debbugs.gnu.org; Fri, 02 Dec 2011 06:24:55 -0500 Received: by bkbzt19 with SMTP id zt19so3618790bkb.3 for <10165@debbugs.gnu.org>; Fri, 02 Dec 2011 03:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=to7mPFok4zUS2UcZjRP+Cz2cgHgMB0ioowDtjZWrP4w=; b=nRzZ9BU7yQ5VUAO3xEAUaaM49QpZBMTRg2Qog5m+KCQbCgniKYBLPvzBjNNUTdS09a nL4xkY14694apRW8V5FvS/wvSTiM0Dn3Ak28xTE+rkbHUhZ81gk/kPTmSZO/MyNO4PTN E/t54LVEmslXqpEWJJqlvynFth/mL1rzf0Wek= Received: by 10.204.10.80 with SMTP id o16mr739347bko.13.1322825079230; Fri, 02 Dec 2011 03:24:39 -0800 (PST) Received: from thierry-MM061 (30.77.197.77.rev.sfr.net. [77.197.77.30]) by mx.google.com with ESMTPS id j9sm17027619bkd.2.2011.12.02.03.24.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Dec 2011 03:24:37 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> Date: Fri, 02 Dec 2011 12:24:34 +0100 In-Reply-To: <87y5uvb5x8.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 02 Dec 2011 12:52:55 +0200") Message-ID: <87wrafusgd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) Juri Linkov writes: >>> +(defcustom mouse-avoidance-banish-distance-from-edge '(window . 2) >>> + "Distance from edge of window or frame in Mouse Avoidance mode `banish'. >>> + >>> +It is a cons cell where the car can be 'window or 'frame >>> +and the cdr and integer representing the distance >>> +from edge of window or frame." >>> + :group 'avoid >>> + :type 'list) >> >> I used same default value as it is actually, but i think using >> '(frame . 2) as Juri does is much better. > > Thanks. What do you think about using the same syntax as for the > geometry specification? You mean using something like: '(frame . "X+Y") > Like (info "(emacs) Window Size X") describes: > > {+-}XOFFSET{+-}YOFFSET -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 12:19:07 2011 Received: (at 10165) by debbugs.gnu.org; 2 Dec 2011 17:19:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWWlM-0002h0-F3 for submit@debbugs.gnu.org; Fri, 02 Dec 2011 12:19:06 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWWlI-0002gJ-Os for 10165@debbugs.gnu.org; Fri, 02 Dec 2011 12:19:01 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 3118468407D; Fri, 2 Dec 2011 09:18:44 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id BC04D451C5F0; Fri, 2 Dec 2011 09:18:29 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> Date: Fri, 02 Dec 2011 19:07:00 +0200 In-Reply-To: <87wrafusgd.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 02 Dec 2011 12:24:34 +0100") Message-ID: <87wraezyvf.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > You mean using something like: > '(frame . "X+Y") Yes, but we also need an edge specification too, like: '(frame top +2 right -1) '(window bottom -2 left +3) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 12:35:56 2011 Received: (at 10165) by debbugs.gnu.org; 2 Dec 2011 17:35:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWX1f-00036Q-F3 for submit@debbugs.gnu.org; Fri, 02 Dec 2011 12:35:56 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWX1d-00036I-Dd for 10165@debbugs.gnu.org; Fri, 02 Dec 2011 12:35:54 -0500 Received: by lahj13 with SMTP id j13so1389739lah.3 for <10165@debbugs.gnu.org>; Fri, 02 Dec 2011 09:35:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=pAMSAww1nAwZ98yN1Z2TLI21073rbDvDyNaeXK0dyBA=; b=O8xHlbtf+SnlHzhPR+ustoiZN4YR1bGX5V2fkK4iUD/c35SEL35QorASXFOytZ8W4P s1KVKbnt2cGruMZXqhiOR+7R9pgiLLqKa9iON5IuV1k6m7Gki2Alb1uV1ueIZaRh9vqR aoFVX8f/8GK+oYC6v9Wznly0RCGMYmMGgyYt8= Received: by 10.152.136.2 with SMTP id pw2mr8729151lab.22.1322847336812; Fri, 02 Dec 2011 09:35:36 -0800 (PST) Received: from thierry-MM061 (30.77.197.77.rev.sfr.net. [77.197.77.30]) by mx.google.com with ESMTPS id pi7sm9210947lab.5.2011.12.02.09.35.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 Dec 2011 09:35:35 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> Date: Fri, 02 Dec 2011 18:35:31 +0100 In-Reply-To: <87wraezyvf.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 02 Dec 2011 19:07:00 +0200") Message-ID: <874nxi7u70.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) Juri Linkov writes: >> You mean using something like: >> '(frame . "X+Y") > > Yes, but we also need an edge specification too, like: > > '(frame top +2 right -1) > > '(window bottom -2 left +3) IIUC we would need only one defcustom, right? We are seriously going out of the corner now. ;-) Such settings maybe interesting for not popping up xfce toolbar at bottom of screen when using Emacs in fullscreen for example. I will try to rework my patch then. Thanks. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 03 03:58:42 2011 Received: (at submit) by debbugs.gnu.org; 3 Dec 2011 08:58:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWlQg-0002F8-Gg for submit@debbugs.gnu.org; Sat, 03 Dec 2011 03:58:42 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWlQd-0002F1-Uz for submit@debbugs.gnu.org; Sat, 03 Dec 2011 03:58:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWlQJ-0007XV-JH for submit@debbugs.gnu.org; Sat, 03 Dec 2011 03:58:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:50799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlQJ-0007XR-Hr for submit@debbugs.gnu.org; Sat, 03 Dec 2011 03:58:19 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlQI-0007pa-Em for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 03:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWlQH-0007X9-8u for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 03:58:18 -0500 Received: from lo.gmane.org ([80.91.229.12]:35318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlQH-0007Wq-0A for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 03:58:17 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RWlQE-00048b-Nr for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 09:58:14 +0100 Received: from 132.78.88.79.rev.sfr.net ([79.88.78.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Dec 2011 09:58:14 +0100 Received: from thierry.volpiatto by 132.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Dec 2011 09:58:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Date: Sat, 03 Dec 2011 09:58:02 +0100 Lines: 113 Message-ID: <877h2eav6t.fsf@gmail.com> References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 132.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:2rNI/wNAFnr9GSVvZcVdlkyXu08= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) --=-=-= Content-Type: text/plain Thierry Volpiatto writes: > I will try to rework my patch then. I use only one user variable now: --8<---------------cut here---------------start------------->8--- (defcustom mouse-avoidance-banish-position '((frame-or-window . frame) (side . right) (side-pos . 3) (top-or-bottom . top) (top-or-bottom-pos . 0)) --8<---------------cut here---------------end--------------->8--- Which allow to set also the vertical position (top-or-bottom-pos). See attached patch. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=Singlepatch-r118037ToTip.patch Content-Description: mouse avoidance banish ##Merge of all patches applied from revision 118111 ## patch-r118037: * lisp/avoid.el: Allow setting in which corner banish move the mouse. ## patch-r118084: * lisp/avoid.el (mouse-avoidance-banish-distance-from-edge): Allow banishing mouse in frame or window corner. ## patch-r118114: * lisp/avoid.el Allow specifying a vertical position when banishing mouse. ## diff --git a/lisp/avoid.el b/lisp/avoid.el --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -115,6 +115,23 @@ :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-position '((frame-or-window . frame) + (side . right) + (side-pos . 3) + (top-or-bottom . top) + (top-or-bottom-pos . 0)) + "Position to which Mouse Avoidance mode `banish' moves the mouse. +An alist where keywords mean: +FRAME-OR-WINDOW: banish the mouse to corner of frame or window. +SIDE: banish the mouse on right or left corner of frame or window. +SIDE-POS: Distance from right or left edge of frame or window. +TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window. +TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." + :group 'avoid + :type '(alist :key-type sexp :value-type sexp) + :options '(frame-or-window side (side-pos integer) + top-or-bottom (top-or-bottom-pos integer))) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,10 +200,40 @@ (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) + +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-position' as you need." + (let* ((fra-or-win (assoc-default + 'frame-or-window + mouse-avoidance-banish-position 'eq)) + (list-values (case fra-or-win + (frame (list 0 0 (frame-width) (frame-height))) + (window (window-edges)))) + (alist (loop for v in list-values + for k in '(left top right bottom) + collect (cons k v))) + (side (assoc-default + 'side + mouse-avoidance-banish-position 'eq)) + (top-or-bottom (assoc-default + 'top-or-bottom + mouse-avoidance-banish-position 'eq)) + (top-or-bottom-dist (assoc-default + 'top-or-bottom-pos + mouse-avoidance-banish-position 'eq)) + (side-fn (case side + (left '+) + (right '-))) + (top-or-bottom-fn (case top-or-bottom + (top '+) + (bottom '-)))) + (cons (funcall side-fn ; -/+ + (assoc-default side alist 'eq) ; right or left + ;; distance from side + (cdr mouse-avoidance-banish-distance-from-edge)) + (funcall top-or-bottom-fn ; -/+ + (assoc-default top-or-bottom alist 'eq) ; top/bottom + top-or-bottom-dist)))) ; distance from top/bottom (defun mouse-avoidance-banish-mouse () ;; Put the mouse pointer in the upper-right corner of the current frame. --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 03 04:26:52 2011 Received: (at submit) by debbugs.gnu.org; 3 Dec 2011 09:26:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWlrv-0002s1-PE for submit@debbugs.gnu.org; Sat, 03 Dec 2011 04:26:52 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RWlrt-0002rv-QB for submit@debbugs.gnu.org; Sat, 03 Dec 2011 04:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWlrZ-0003is-5C for submit@debbugs.gnu.org; Sat, 03 Dec 2011 04:26:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlrZ-0003io-3p for submit@debbugs.gnu.org; Sat, 03 Dec 2011 04:26:29 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlrY-0004Vx-2n for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 04:26:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWlrX-0003iX-7p for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 04:26:28 -0500 Received: from lo.gmane.org ([80.91.229.12]:38942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWlrW-0003iL-QO for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 04:26:27 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RWlrT-0005gD-Fq for bug-gnu-emacs@gnu.org; Sat, 03 Dec 2011 10:26:23 +0100 Received: from 132.78.88.79.rev.sfr.net ([79.88.78.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Dec 2011 10:26:23 +0100 Received: from thierry.volpiatto by 132.78.88.79.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Dec 2011 10:26:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Date: Sat, 03 Dec 2011 10:26:09 +0100 Lines: 50 Message-ID: <87zkfaxaz2.fsf@gmail.com> References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 132.78.88.79.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:nl+LO2j7df7pIg5B7+59HTFbJYc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Use this, as there is an error in precedent patch (still using value of old variable), sorry. --8<---------------cut here---------------start------------->8--- (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. If you want the mouse banished to a different corner set `mouse-avoidance-banish-position' as you need." (let* ((fra-or-win (assoc-default 'frame-or-window mouse-avoidance-banish-position 'eq)) (list-values (case fra-or-win (frame (list 0 0 (frame-width) (frame-height))) (window (window-edges)))) (alist (loop for v in list-values for k in '(left top right bottom) collect (cons k v))) (side (assoc-default 'side mouse-avoidance-banish-position 'eq)) (side-dist (assoc-default 'side-pos mouse-avoidance-banish-position 'eq)) (top-or-bottom (assoc-default 'top-or-bottom mouse-avoidance-banish-position 'eq)) (top-or-bottom-dist (assoc-default 'top-or-bottom-pos mouse-avoidance-banish-position 'eq)) (side-fn (case side (left '+) (right '-))) (top-or-bottom-fn (case top-or-bottom (top '+) (bottom '-)))) (cons (funcall side-fn ; -/+ (assoc-default side alist 'eq) ; right or left side-dist) ; distance from side (funcall top-or-bottom-fn ; -/+ (assoc-default top-or-bottom alist 'eq) ; top/bottom top-or-bottom-dist)))) ; distance from top/bottom --8<---------------cut here---------------end--------------->8--- -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 05:55:25 2011 Received: (at 10165) by debbugs.gnu.org; 5 Dec 2011 10:55:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXWCj-0002Fj-8l for submit@debbugs.gnu.org; Mon, 05 Dec 2011 05:55:25 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXWCg-0002FV-VN for 10165@debbugs.gnu.org; Mon, 05 Dec 2011 05:55:23 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id CCB0D68407E; Mon, 5 Dec 2011 02:54:50 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id CBA82451C684; Mon, 5 Dec 2011 02:54:33 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> Date: Mon, 05 Dec 2011 12:52:59 +0200 In-Reply-To: <87zkfaxaz2.fsf@gmail.com> (Thierry Volpiatto's message of "Sat, 03 Dec 2011 10:26:09 +0100") Message-ID: <87d3c370j8.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) > Use this, as there is an error in precedent patch (still using value of > old variable), sorry. Thanks. I think names like `frame-or-window' and `top-or-bottom-pos' are quite confusing. But fortunately we could avoid them. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 05 13:07:10 2011 Received: (at 10165) by debbugs.gnu.org; 5 Dec 2011 18:07:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXcwY-0006LE-19 for submit@debbugs.gnu.org; Mon, 05 Dec 2011 13:07:10 -0500 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RXcwV-0006L6-JP for 10165@debbugs.gnu.org; Mon, 05 Dec 2011 13:07:08 -0500 Received: by lagw12 with SMTP id w12so930301lag.3 for <10165@debbugs.gnu.org>; Mon, 05 Dec 2011 10:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=uXudG7HzJZATa8qoo4PZyOVUcUN1Xy+XPbnpU/PxGFs=; b=dXV5WMq2HMo+x/Vdsd7Vs9O7ljAVCv+i7uDJAef5IYYywYv1A1I7bgLGzdX5xNtsV+ MvGGHSznwSZHRIqDBe07kqNKsYRTJxCZy11wQif6V+hssIi197WzcWhmhgKER42Guo02 bbPl2lFMrl95Kc4caGkGXQK2Sy5nkwgN/3KEs= Received: by 10.152.134.179 with SMTP id pl19mr6814269lab.13.1323108393510; Mon, 05 Dec 2011 10:06:33 -0800 (PST) Received: from thierry-MM061 (109.78.88.79.rev.sfr.net. [79.88.78.109]) by mx.google.com with ESMTPS id no9sm18447624lab.0.2011.12.05.10.06.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 10:06:31 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> Date: Mon, 05 Dec 2011 19:06:26 +0100 In-Reply-To: <87d3c370j8.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 05 Dec 2011 12:52:59 +0200") Message-ID: <871usilwpp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain Juri Linkov writes: >> Use this, as there is an error in precedent patch (still using value of >> old variable), sorry. > > Thanks. I think names like `frame-or-window' and `top-or-bottom-pos' > are quite confusing. Yes, if you have better names tell me. Also here on last version of patch I am using symbol instead of sexp which is better. > But fortunately we could avoid them. Can you develop this? Find here the last version of patch for review, (more or less what you have actually) I will apply as soon Emacs is no more in feature freeze if no objections. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=Singlepatch-r118037ToTip.patch Content-Description: mouse avoidance banish ##Merge of all patches applied from revision 118117 ## patch-r118037: * lisp/avoid.el: Allow setting in which corner banish move the mouse. ## patch-r118084: * lisp/avoid.el (mouse-avoidance-banish-distance-from-edge): Allow banishing mouse in frame or window corner. ## patch-r118114: * lisp/avoid.el Allow specifying a vertical position when banishing mouse. ## diff --git a/lisp/avoid.el b/lisp/avoid.el --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -115,6 +115,23 @@ :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-position '((frame-or-window . frame) + (side . right) + (side-pos . 3) + (top-or-bottom . top) + (top-or-bottom-pos . 0)) + "Position to which Mouse Avoidance mode `banish' moves the mouse. +An alist where keywords mean: +FRAME-OR-WINDOW: banish the mouse to corner of frame or window. +SIDE: banish the mouse on right or left corner of frame or window. +SIDE-POS: Distance from right or left edge of frame or window. +TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window. +TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." + :group 'avoid + :type '(alist :key-type symbol :value-type symbol) + :options '(frame-or-window side (side-pos integer) + top-or-bottom (top-or-bottom-pos integer))) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,13 +200,45 @@ (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) + +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-position' as you need." + (let* ((fra-or-win (assoc-default + 'frame-or-window + mouse-avoidance-banish-position 'eq)) + (list-values (case fra-or-win + (frame (list 0 0 (frame-width) (frame-height))) + (window (window-edges)))) + (alist (loop for v in list-values + for k in '(left top right bottom) + collect (cons k v))) + (side (assoc-default + 'side + mouse-avoidance-banish-position 'eq)) + (side-dist (assoc-default + 'side-pos + mouse-avoidance-banish-position 'eq)) + (top-or-bottom (assoc-default + 'top-or-bottom + mouse-avoidance-banish-position 'eq)) + (top-or-bottom-dist (assoc-default + 'top-or-bottom-pos + mouse-avoidance-banish-position 'eq)) + (side-fn (case side + (left '+) + (right '-))) + (top-or-bottom-fn (case top-or-bottom + (top '+) + (bottom '-)))) + (cons (funcall side-fn ; -/+ + (assoc-default side alist 'eq) ; right or left + side-dist) ; distance from side + (funcall top-or-bottom-fn ; -/+ + (assoc-default top-or-bottom alist 'eq) ; top/bottom + top-or-bottom-dist)))) ; distance from top/bottom (defun mouse-avoidance-banish-mouse () - ;; Put the mouse pointer in the upper-right corner of the current frame. + "Put the mouse pointer to `mouse-avoidance-banish-position'." (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) (defsubst mouse-avoidance-delta (cur delta dist var min max) --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 12:33:37 2011 Received: (at 10165) by debbugs.gnu.org; 7 Dec 2011 17:33:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLNA-00080y-Mx for submit@debbugs.gnu.org; Wed, 07 Dec 2011 12:33:37 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLN8-00080m-3a for 10165@debbugs.gnu.org; Wed, 07 Dec 2011 12:33:35 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 8E8DF754061; Wed, 7 Dec 2011 09:32:48 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 76C03451C611; Wed, 7 Dec 2011 09:32:29 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> Date: Wed, 07 Dec 2011 19:30:45 +0200 In-Reply-To: <871usilwpp.fsf@gmail.com> (Thierry Volpiatto's message of "Mon, 05 Dec 2011 19:06:26 +0100") Message-ID: <878vmo8f0e.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> Thanks. I think names like `frame-or-window' and `top-or-bottom-pos' >> are quite confusing. > > Yes, if you have better names tell me. I think better names would be similar to geometry specification like in (info "(emacs) Window Size X"). Then we could have such names (with possible values): x-side `left' or `right' y-side `top' or `bottom' x-offset integer (positive, negative or zero) y-offset integer (positive, negative or zero) So for example it would be possible to customize `mouse-avoidance-banish-position' to the following setting: '((frame-or-window . frame) (x-side . right) (x-offset . 3) (y-side . bottom) (y-offset . -1)) Also `frame-or-window' is too long name, but currently I have no idea what a shorter name would be better. >> But fortunately we could avoid them. > > Can you develop this? I think that instead of an alist it would be simpler to use a list with the fixed meaning of each list element. I mean something like: (defcustom mouse-avoidance-banish-position '(frame right 3 bottom -1) :type '(list (choice (const frame :tag "Relative to frame coordinates") (const window :tag "Relative to window coordinates")) (choice (const left :tag "Relative to left edge") (const right :tag "Relative to right edge")) (integer :tag "Horizontal offset") (choice (const top :tag "Relative to top edge") (const bottom :tag "Relative to bottom edge")) (integer :tag "Vertical offset"))) From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 13:05:37 2011 Received: (at 10165) by debbugs.gnu.org; 7 Dec 2011 18:05:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLs9-0000x8-D1 for submit@debbugs.gnu.org; Wed, 07 Dec 2011 13:05:37 -0500 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLs7-0000wz-FY for 10165@debbugs.gnu.org; Wed, 07 Dec 2011 13:05:36 -0500 Received: by bkbzs8 with SMTP id zs8so779740bkb.3 for <10165@debbugs.gnu.org>; Wed, 07 Dec 2011 10:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=J61KHd8Oxk5oPQFdh4BjyXHnuEecETrErlCPKBCu+/g=; b=SaNZrhAlQVjgMpDJ2JA+NpJpOITC8+nEwgMAlWnXA0nbwiv7t0Vza/LhUcHnAF773E XPFB0ekbnyt0jeAjVOBaWMd2I++19gZ3reSaAwrF+APeRETE0QkFArMFPlx2yP4ZaBAi em5GNm53K9ZyLEVxMcGuQfSqqu+aVS2kAG94Q= Received: by 10.181.11.226 with SMTP id el2mr24710568wid.64.1323281089376; Wed, 07 Dec 2011 10:04:49 -0800 (PST) Received: from thierry-MM061 (212.78.88.79.rev.sfr.net. [79.88.78.212]) by mx.google.com with ESMTPS id ca18sm4069527wib.13.2011.12.07.10.04.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Dec 2011 10:04:47 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> Date: Wed, 07 Dec 2011 19:04:43 +0100 In-Reply-To: <878vmo8f0e.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 07 Dec 2011 19:30:45 +0200") Message-ID: <87ty5cs1fo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) Juri Linkov writes: >>> Thanks. I think names like `frame-or-window' and `top-or-bottom-pos' >>> are quite confusing. >> >> Yes, if you have better names tell me. > > I think better names would be similar to geometry specification > like in (info "(emacs) Window Size X"). > > Then we could have such names (with possible values): > > x-side `left' or `right' > y-side `top' or `bottom' > x-offset integer (positive, negative or zero) > y-offset integer (positive, negative or zero) Note that the code I wrote don't require negative arguments. You just set the distance from one edge with a positive argument, doesn't matter if it is right, left top or bottom. > So for example it would be possible to customize > `mouse-avoidance-banish-position' to the following setting: > > '((frame-or-window . frame) > (x-side . right) > (x-offset . 3) > (y-side . bottom) > (y-offset . -1)) Ok for this, except for negative integers. > Also `frame-or-window' is too long name, but currently I have no idea > what a shorter name would be better. > >>> But fortunately we could avoid them. >> >> Can you develop this? > > I think that instead of an alist it would be simpler to use a list > with the fixed meaning of each list element. I mean something like: > > (defcustom mouse-avoidance-banish-position '(frame right 3 bottom -1) > :type '(list (choice (const frame :tag "Relative to frame coordinates") > (const window :tag "Relative to window coordinates")) > (choice (const left :tag "Relative to left edge") > (const right :tag "Relative to right edge")) > (integer :tag "Horizontal offset") > (choice (const top :tag "Relative to top edge") > (const bottom :tag "Relative to bottom edge")) > (integer :tag "Vertical offset"))) I prefer an alist, it is easier to understand. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 14:57:57 2011 Received: (at 10165) by debbugs.gnu.org; 7 Dec 2011 19:57:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYNcq-0003f3-Tj for submit@debbugs.gnu.org; Wed, 07 Dec 2011 14:57:57 -0500 Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYNco-0003eu-4e for 10165@debbugs.gnu.org; Wed, 07 Dec 2011 14:57:55 -0500 Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id 304D6754061; Wed, 7 Dec 2011 11:57:08 -0800 (PST) Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id A21E4451C611; Wed, 7 Dec 2011 11:56:48 -0800 (PST) From: Juri Linkov To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Organization: JURTA References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> Date: Wed, 07 Dec 2011 21:52:04 +0200 In-Reply-To: <87ty5cs1fo.fsf@gmail.com> (Thierry Volpiatto's message of "Wed, 07 Dec 2011 19:04:43 +0100") Message-ID: <87ehwg6utr.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> x-side `left' or `right' >> y-side `top' or `bottom' >> x-offset integer (positive, negative or zero) >> y-offset integer (positive, negative or zero) > > Note that the code I wrote don't require negative arguments. > You just set the distance from one edge with a positive argument, > doesn't matter if it is right, left top or bottom. Sorry, I don't understand. Could you please demonstrate how it would be possible to represent the following setting: (defun mouse-avoidance-banish-destination () (cons (+ 3 (frame-width)) (- (frame-height) 1))) with only positive integer values in `mouse-avoidance-banish-position'? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 01:34:04 2011 Received: (at 10165) by debbugs.gnu.org; 8 Dec 2011 06:34:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYXYS-0004c5-88 for submit@debbugs.gnu.org; Thu, 08 Dec 2011 01:34:04 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYXYP-0004bg-6G for 10165@debbugs.gnu.org; Thu, 08 Dec 2011 01:34:02 -0500 Received: by wgbdq10 with SMTP id dq10so2899242wgb.15 for <10165@debbugs.gnu.org>; Wed, 07 Dec 2011 22:33:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=x/YPaamUePZZYa3nLQrEwDaV7j26NfMBm+mLeIw/wNk=; b=GW4rVEhSUj21D+FegdmqxTc7unQlLwwAxwAAoO2PIWrnB73SHAgqDa7Y+eto0MeUI7 Ywn2UPk3pAu+uySzt7XCyHWATz1XRyNunlJ5V+smbYK8JcFDTGgyQFOqqFMBDMv7eVAl jk+FV3R9My9qXWSTvYB7it1dnERrxJNxUY3JE= Received: by 10.180.107.97 with SMTP id hb1mr2810224wib.18.1323325992846; Wed, 07 Dec 2011 22:33:12 -0800 (PST) Received: from thierry-MM061 (187.211.85.79.rev.sfr.net. [79.85.211.187]) by mx.google.com with ESMTPS id m13sm7270405wbh.0.2011.12.07.22.33.09 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Dec 2011 22:33:11 -0800 (PST) From: Thierry Volpiatto To: Juri Linkov Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> Date: Thu, 08 Dec 2011 07:33:07 +0100 In-Reply-To: <87ehwg6utr.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 07 Dec 2011 21:52:04 +0200") Message-ID: <87pqfzshcs.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Juri Linkov writes: >>> x-side `left' or `right' >>> y-side `top' or `bottom' >>> x-offset integer (positive, negative or zero) >>> y-offset integer (positive, negative or zero) >> >> Note that the code I wrote don't require negative arguments. >> You just set the distance from one edge with a positive argument, >> doesn't matter if it is right, left top or bottom. > > Sorry, I don't understand. Could you please demonstrate how it would be > possible to represent the following setting: > > (defun mouse-avoidance-banish-destination () > (cons (+ 3 (frame-width)) (- (frame-height) 1))) > > with only positive integer values in `mouse-avoidance-banish-position'? Yes you are right, sorry, need to use negative values for such setting. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 15:21:34 2011 Received: (at 10165) by debbugs.gnu.org; 8 Dec 2011 20:21:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYkTF-0008LU-P2 for submit@debbugs.gnu.org; Thu, 08 Dec 2011 15:21:33 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYkTD-0008LN-TW for 10165@debbugs.gnu.org; Thu, 08 Dec 2011 15:21:32 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pB8KKdNF008337; Thu, 8 Dec 2011 15:20:39 -0500 Received: by pastel.home (Postfix, from userid 20848) id 1BCA85938C; Thu, 8 Dec 2011 15:20:39 -0500 (EST) From: Stefan Monnier To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. Message-ID: References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> Date: Thu, 08 Dec 2011 15:20:39 -0500 In-Reply-To: <87pqfzshcs.fsf@gmail.com> (Thierry Volpiatto's message of "Thu, 08 Dec 2011 07:33:07 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4065=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4065> : streams <708921> : uri <1024210> X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 10165 Cc: Juri Linkov , 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) > Yes you are right, sorry, need to use negative values for such setting. I see no problem with that, by the way, Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 16:05:28 2012 Received: (at 10165) by debbugs.gnu.org; 12 Apr 2012 20:05:28 +0000 Received: from localhost ([127.0.0.1]:54890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIQGl-0003JM-Oz for submit@debbugs.gnu.org; Thu, 12 Apr 2012 16:05:28 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:51450) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIQGk-0003JG-Hh for 10165@debbugs.gnu.org; Thu, 12 Apr 2012 16:05:27 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SIQFR-0000Fk-9i; Thu, 12 Apr 2012 22:04:05 +0200 From: Lars Magne Ingebrigtsen To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> X-Now-Playing: His Name Is Alive's _ECLIPX_: "Shadows" Date: Thu, 12 Apr 2012 22:04:04 +0200 In-Reply-To: <87pqfzshcs.fsf@gmail.com> (Thierry Volpiatto's message of "Thu, 08 Dec 2011 07:33:07 +0100") Message-ID: User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SIQFR-0000Fk-9i X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334865845.93046@RUeqEym/3M2RxMF2EIAflA X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10165 Cc: Juri Linkov , 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Thierry Volpiatto writes: > Yes you are right, sorry, need to use negative values for such setting. There were lots of different versions of the patch, but we're now in Emacs 24.2 land, so installing this now would be OK. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 12 17:13:35 2012 Received: (at 10165) by debbugs.gnu.org; 12 Apr 2012 21:13:35 +0000 Received: from localhost ([127.0.0.1]:54942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIRKd-0005hl-7N for submit@debbugs.gnu.org; Thu, 12 Apr 2012 17:13:35 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:38119) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIRKW-0005ha-Gk for 10165@debbugs.gnu.org; Thu, 12 Apr 2012 17:13:29 -0400 Received: by wibhr17 with SMTP id hr17so5068305wib.15 for <10165@debbugs.gnu.org>; Thu, 12 Apr 2012 14:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WookQBZ2vMI9iXHlXtoMFdGhUmH8mctOYKYvy+23QzA=; b=CZozwZqvAZx1mZiCYa5dv9/zyfeV1SaJzaKP0wH0B4D3W5zMblgi7b5hVWfjkP9tQm /MnGyXK45ig/HJIkA0Ro0m13A0HX131ATn4mHrGqzJ8h3Eew53hbbJFmD3V9Xu6tA0bI dk5gPqypy/5iSWTqzrnQaGFfUOpNrtUsaMDScIoZhsl0AWEa+Y9pRhoNve2USDm95bLe 7BDO80NSoxfhS4z2G+OMlqAa3PXasxKy/xTkZywmBYPEX1cvbSixUjFYUID/gqxuOnxu mD0L7QddTfkf2e6Qtmyp5hiWe7bhln/TmcTOR39P0WKX89OOIpA42ev+F1ofdvKAfIlm o8qg== Received: by 10.180.85.70 with SMTP id f6mr19271708wiz.5.1334265129081; Thu, 12 Apr 2012 14:12:09 -0700 (PDT) Received: from thierry-MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id n8sm29759wix.10.2012.04.12.14.12.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Apr 2012 14:12:08 -0700 (PDT) From: Thierry Volpiatto To: Lars Magne Ingebrigtsen Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> Date: Thu, 12 Apr 2012 23:12:04 +0200 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 12 Apr 2012 22:04:04 +0200") Message-ID: <87wr5k1wpn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: Juri Linkov , 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Lars Magne Ingebrigtsen writes: > Thierry Volpiatto writes: > >> Yes you are right, sorry, need to use negative values for such setting. > > There were lots of different versions of the patch, but we're now in > Emacs 24.2 land, so installing this now would be OK. Ok I will install it tomorrow. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=patch-r118474.patch Content-Description: banish mouse # HG changeset patch # User Thierry Volpiatto # Date 1334264470 -7200 # Node ID 3348d7d9ee32577461067f83f3df8f5c9f2106c7 # Parent 6535056f09a7e69005c3ea1402fec39eaa754e5f * lisp/avoid.el Allow customizing position of mouse when banishing. (mouse-avoidance-banish-position): New user variable. (mouse-avoidance-banish-destination): Place mouse pointer according to `mouse-avoidance-banish-position'. diff --git a/lisp/avoid.el b/lisp/avoid.el --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -115,6 +115,23 @@ :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-position '((frame-or-window . frame) + (side . right) + (side-pos . 3) + (top-or-bottom . top) + (top-or-bottom-pos . 0)) + "Position to which Mouse Avoidance mode `banish' moves the mouse. +An alist where keywords mean: +FRAME-OR-WINDOW: banish the mouse to corner of frame or window. +SIDE: banish the mouse on right or left corner of frame or window. +SIDE-POS: Distance from right or left edge of frame or window. +TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window. +TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." + :group 'avoid + :type '(alist :key-type symbol :value-type symbol) + :options '(frame-or-window side (side-pos integer) + top-or-bottom (top-or-bottom-pos integer))) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,13 +200,45 @@ (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) + +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-position' as you need." + (let* ((fra-or-win (assoc-default + 'frame-or-window + mouse-avoidance-banish-position 'eq)) + (list-values (case fra-or-win + (frame (list 0 0 (frame-width) (frame-height))) + (window (window-edges)))) + (alist (loop for v in list-values + for k in '(left top right bottom) + collect (cons k v))) + (side (assoc-default + 'side + mouse-avoidance-banish-position 'eq)) + (side-dist (assoc-default + 'side-pos + mouse-avoidance-banish-position 'eq)) + (top-or-bottom (assoc-default + 'top-or-bottom + mouse-avoidance-banish-position 'eq)) + (top-or-bottom-dist (assoc-default + 'top-or-bottom-pos + mouse-avoidance-banish-position 'eq)) + (side-fn (case side + (left '+) + (right '-))) + (top-or-bottom-fn (case top-or-bottom + (top '+) + (bottom '-)))) + (cons (funcall side-fn ; -/+ + (assoc-default side alist 'eq) ; right or left + side-dist) ; distance from side + (funcall top-or-bottom-fn ; -/+ + (assoc-default top-or-bottom alist 'eq) ; top/bottom + top-or-bottom-dist)))) ; distance from top/bottom (defun mouse-avoidance-banish-mouse () - ;; Put the mouse pointer in the upper-right corner of the current frame. + "Put the mouse pointer to `mouse-avoidance-banish-position'." (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) (defsubst mouse-avoidance-delta (cur delta dist var min max) --=-=-= Content-Type: text/plain -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 11:21:19 2012 Received: (at 10165) by debbugs.gnu.org; 13 Apr 2012 15:21:19 +0000 Received: from localhost ([127.0.0.1]:57463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIiJG-00038V-Pu for submit@debbugs.gnu.org; Fri, 13 Apr 2012 11:21:19 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:36656) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIiJ9-00038H-7o for 10165@debbugs.gnu.org; Fri, 13 Apr 2012 11:21:12 -0400 Received: by werb10 with SMTP id b10so2423225wer.3 for <10165@debbugs.gnu.org>; Fri, 13 Apr 2012 08:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=X6ez6RXkdPetW217qWUrrsgZkCOz3DkoknreadqyMn4=; b=g3Eaz6VYfdGJqcluDAZfGXgS0lVtG4SREZJ5Nt2hezzGoOjaX3FDk1gAyxTpleS2BP wzL1Bm2yocexB0/4AktvqgNWNjwWP8RPg4xFfdxbVB1Ni3XwABNyDkedrGkVBpzs460/ NMSx+cyZdb9rAQlorUwV2QocBckc+eKC3+4YSkv6/gi8QY0F+VrnoclYvtAKpS9Vd4fW 5kXMnoEiu6nughIlJ2noxDzQGZ8Q4J+aFL5816WBuyyPSSp/byMYPuhQPGPyHBXnNUTY NecXRhvAn4pVwJyGa+1eFbyhrbuDzJCXQeNlreoySBAR+Sf0LgcTExc7XLDkuSnfHuvJ A6wQ== Received: by 10.180.92.71 with SMTP id ck7mr5582893wib.21.1334330387645; Fri, 13 Apr 2012 08:19:47 -0700 (PDT) Received: from thierry-MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id 6sm5412238wiz.1.2012.04.13.08.19.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 08:19:46 -0700 (PDT) From: Thierry Volpiatto To: Lars Magne Ingebrigtsen Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> Date: Fri, 13 Apr 2012 17:19:43 +0200 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 12 Apr 2012 22:04:04 +0200") Message-ID: <87hawnek1c.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: Juri Linkov , 10165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Lars Magne Ingebrigtsen writes: > Thierry Volpiatto writes: > >> Yes you are right, sorry, need to use negative values for such setting. > > There were lots of different versions of the patch, but we're now in > Emacs 24.2 land, so installing this now would be OK. Please install the patch I am unable to use bzr, just give up. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 17:15:18 2012 Received: (at 10165) by debbugs.gnu.org; 13 Apr 2012 21:15:18 +0000 Received: from localhost ([127.0.0.1]:57722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInpt-0003dU-5B for submit@debbugs.gnu.org; Fri, 13 Apr 2012 17:15:18 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:45463) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInpq-0003dL-SV for 10165@debbugs.gnu.org; Fri, 13 Apr 2012 17:15:16 -0400 Received: from static-195.22.91.6.addr.tdcsong.se ([195.22.91.6] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SInoQ-0007up-QV; Fri, 13 Apr 2012 23:13:46 +0200 From: Lars Ingebrigtsen To: Thierry Volpiatto Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87pqgaj757.fsf@mail.jurta.org> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> <87hawnek1c.fsf@gmail.com> Date: Fri, 13 Apr 2012 23:13:45 +0200 In-Reply-To: <87hawnek1c.fsf@gmail.com> (Thierry Volpiatto's message of "Fri, 13 Apr 2012 17:19:43 +0200") Message-ID: <871unrtjw6.fsf@gnus.org> User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1SInoQ-0007up-QV X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334956426.98526@VouM3UcvGfhSD7knLMja4w X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Thierry Volpiatto writes: > Please install the patch I am unable to use bzr, just give up. Ok; applied. But what's the problem? vc mode in Emacs means that you never have to understand the underlying VC. :-) -- (domestic pets only, the antidote for overdose, milk.) http://lars.ingebrigtsen.no * Sent from my Rome From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 17:15:19 2012 Received: (at control) by debbugs.gnu.org; 13 Apr 2012 21:15:19 +0000 Received: from localhost ([127.0.0.1]:57724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInpv-0003df-5s for submit@debbugs.gnu.org; Fri, 13 Apr 2012 17:15:19 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:45468) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SInps-0003dS-Ss for control@debbugs.gnu.org; Fri, 13 Apr 2012 17:15:17 -0400 Received: from static-195.22.91.6.addr.tdcsong.se ([195.22.91.6] helo=rusty) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SInoV-0007v7-2G for control@debbugs.gnu.org; Fri, 13 Apr 2012 23:13:51 +0200 Date: Fri, 13 Apr 2012 23:13:49 +0200 Message-Id: <87zkafs5bm.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #10165 X-MailScanner-ID: 1SInoV-0007v7-2G X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334956431.24467@7/qjNIhtiVTIkPxnRBVwZA X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10165 fixed close 10165 24.2 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 14 01:16:07 2012 Received: (at 10165) by debbugs.gnu.org; 14 Apr 2012 05:16:07 +0000 Received: from localhost ([127.0.0.1]:57909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIvL8-0007uc-Kl for submit@debbugs.gnu.org; Sat, 14 Apr 2012 01:16:07 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:45837) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIvL2-0007u9-9a for 10165@debbugs.gnu.org; Sat, 14 Apr 2012 01:16:01 -0400 Received: by wgbdq11 with SMTP id dq11so3733009wgb.15 for <10165@debbugs.gnu.org>; Fri, 13 Apr 2012 22:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=M3iDYrbONgL2FnR0Ek5xuZL7kWnZlbubCe6hogzdAKo=; b=Ee1+2dNeyL0KYWTtUM+luNj4VJjW6y9L00nxj1FxAGuQ/wAFdDJVDLOeA64tsHorih Z1vxO9rzc7OhRLrF0tYdHRn+b8EsiOvKyj2d88RTwybC0hIpoicAFn35svT5IxZA+su/ xngyYb2cAhR4i9Wf4ArjkIreHkf/w1c3hIPGrfEvuvVkLp2veBtGKA6tNMyGAmMAkSlo E58VafLn1deawHESAfrajFXW9BvE8Pa5cwxY3/RR+246JtHQYLl9OgmDrxk6rvFzS9kY X4tqIbt4579bYTO6AQ93aNXEhUCVY7NG9PwZrucBaagbQZRQtAyJRg8lqDwKYftMOooX olug== Received: by 10.180.107.101 with SMTP id hb5mr1805897wib.7.1334380473246; Fri, 13 Apr 2012 22:14:33 -0700 (PDT) Received: from thierry-MM061 (lbe83-2-78-243-104-167.fbx.proxad.net. [78.243.104.167]) by mx.google.com with ESMTPS id ff2sm2979155wib.9.2012.04.13.22.14.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 22:14:32 -0700 (PDT) From: Thierry Volpiatto To: Lars Ingebrigtsen Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode. References: <877h2itald.fsf@gmail.com> <87liqxj401.fsf@gmail.com> <871uspy0e3.fsf@gmail.com> <87ipm0spfp.fsf@mail.jurta.org> <874nxj4ei8.fsf@gmail.com> <87zkfb2znw.fsf@gmail.com> <87y5uvb5x8.fsf@mail.jurta.org> <87wrafusgd.fsf@gmail.com> <87wraezyvf.fsf@mail.jurta.org> <874nxi7u70.fsf@gmail.com> <877h2eav6t.fsf@gmail.com> <87zkfaxaz2.fsf@gmail.com> <87d3c370j8.fsf@mail.jurta.org> <871usilwpp.fsf@gmail.com> <878vmo8f0e.fsf@mail.jurta.org> <87ty5cs1fo.fsf@gmail.com> <87ehwg6utr.fsf@mail.jurta.org> <87pqfzshcs.fsf@gmail.com> <87hawnek1c.fsf@gmail.com> <871unrtjw6.fsf@gnus.org> Date: Sat, 14 Apr 2012 07:14:29 +0200 In-Reply-To: <871unrtjw6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 13 Apr 2012 23:13:45 +0200") Message-ID: <87lily7v4a.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 10165 Cc: 10165@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Lars Ingebrigtsen writes: > Thierry Volpiatto writes: > >> Please install the patch I am unable to use bzr, just give up. > > Ok; applied. Thanks. > But what's the problem? vc mode in Emacs means that you never have to > understand the underlying VC. :-) -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From unknown Sun Jun 22 11:34:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 12 May 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator