From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: suggested new command `picture-mouse-set-point' Date: 24 Oct 2002 23:42:33 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xr8ef4ipi.fsf@kfs2.cua.dk> References: <5xn0p4znhw.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035492313 6057 80.91.224.249 (24 Oct 2002 20:45:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2002 20:45:13 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 184oqu-0001ZW-00 for ; Thu, 24 Oct 2002 22:45:12 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 184otF-0006rJ-00 for ; Thu, 24 Oct 2002 22:47:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 184op1-0001Af-00; Thu, 24 Oct 2002 16:43:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 184ooI-0000oY-00 for emacs-devel@gnu.org; Thu, 24 Oct 2002 16:42:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 184ooE-0000nj-00 for emacs-devel@gnu.org; Thu, 24 Oct 2002 16:42:30 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 184ooE-0000nd-00 for emacs-devel@gnu.org; Thu, 24 Oct 2002 16:42:26 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 059BF7C017; Thu, 24 Oct 2002 20:42:24 +0000 (GMT) Original-To: jpw@shootybangbang.com (John Paul Wallington) In-Reply-To: Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8747 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8747 jpw@shootybangbang.com (John Paul Wallington) writes: > >Here is the code I've written to do this: > > > > (defun mouse-set-point-rigidly (event) > > Cool. Any ideas how to better integrate it? For example, it would > be nice if `mouse-drag-region' would call it instead of > `mouse-set-point'; presently, the cursor will "bounce". > > Maybe there could be a `mouse-set-point-function' variable that would > be funcalled where `mouse-set-point' is presently called directly, or > `mouse-set-point' could call `mouse-set-point-rigidly' iff > `mouse-set-point-rigidly' variable was non-nil, or something like > that? It seems ok to control this behaviuor through a variable, but should it be a customization option, or just intended for e.g. let bindings or buffer-local (or mode-specific) setting? One problem with this approach is that quite often you just need to click on some window to select another window or give focus to a frame -- and in that case you most likely don't want to modify the buffer if you accidentally click or a TAB or after EOL or EOB. Maybe the -rigidly functionality should only be activated if the mouse is clicked in the selected window & frame. -- Kim F. Storm http://www.cua.dk