From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: New primitive buffer-position-at Date: Wed, 12 Jan 2005 19:58:12 +1300 Message-ID: <16868.51844.789458.281414@farnswood.snap.net.nz> References: <16868.19239.506292.507882@farnswood.snap.net.nz> <16868.24118.468795.219802@farnswood.snap.net.nz> <01c4f86d$Blat.v2.2.2$40a07dc0@zahav.net.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1105513796 23091 80.91.229.6 (12 Jan 2005 07:09:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2005 07:09:56 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 12 08:09:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CocdY-0003F8-00 for ; Wed, 12 Jan 2005 08:09:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cocp8-0005Sv-Tq for ged-emacs-devel@m.gmane.org; Wed, 12 Jan 2005 02:21:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CocoZ-0005Iw-L2 for emacs-devel@gnu.org; Wed, 12 Jan 2005 02:21:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CocoL-0005D0-3q for emacs-devel@gnu.org; Wed, 12 Jan 2005 02:21:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CocoK-0005B9-5q for emacs-devel@gnu.org; Wed, 12 Jan 2005 02:20:56 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CocZK-0006fS-DX; Wed, 12 Jan 2005 02:05:26 -0500 Original-Received: from farnswood.snap.net.nz (p144-tnt1.snap.net.nz [202.124.110.144]) by viper.snap.net.nz (Postfix) with ESMTP id C86741EF5B9; Wed, 12 Jan 2005 20:05:24 +1300 (NZDT) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 7472A628AD; Wed, 12 Jan 2005 06:58:13 +0000 (GMT) Original-To: Eli Zaretskii In-Reply-To: <01c4f86d$Blat.v2.2.2$40a07dc0@zahav.net.il> X-Mailer: VM 7.19 under Emacs 21.3.50.32 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32154 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32154 > > The posn-* family of commands (posn-point, posn-object etc) only work if > > Emacs provides the proper click event in the first place which it doesn't > > currently do on a text terminal or xterm. > > ??? Are you saying that posn-point would throw an error or otherwise > behave incorrectly if invoked on a tty without a mouse? I tried that, > and it seemed to work fine for me. I'm trying to say that posn-point etc doesn't work if invoked on a tty *with* a mouse. For example, calling the function below in an xterm, xt-mouse.el doesn't provide the full click event and so (posn-point posn) is not a number. (defun gdb-mouse-toggle-breakpoint (event) "Toggle breakpoint in left fringe/margin with mouse click." (interactive "e") (mouse-minibuffer-check event) (let ((posn (event-end event))) (if (numberp (posn-point posn)) (with-selected-window (posn-window posn) (save-excursion (goto-char (posn-point posn)) (if (or (posn-object posn) ... > I'm puzzled why did you need to patch xt-mouse.el, since these 2 > functions seem to work for me on a tty, even a tty that lacks the > mouse. I've just committed my changes to xt-mouse.el. With these, if you start Emacs in an xterm, you should now be able to select another buffer etc by clicking on the mode-line, navigate info from the header line, set breakpoints with the mouse... I have done the same for a text-terminal with t-mouse.el, but FSF doesn't have an assignment yet to let me install this file. Nick