GNU bug report logs - #10165
[PATCH] Allow setting corner in mouse avoidance mode.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Wed, 30 Nov 2011 06:00:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 24.2

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

Bug is archived. No further changes may be made.

Full log


Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10165: [PATCH] Allow setting corner in mouse avoidance mode.
Date: Wed, 30 Nov 2011 18:40:20 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Juri Linkov <juri <at> jurta.org> 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 





This bug report was last modified 13 years and 43 days ago.

Previous Next


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