From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: No possibility of determining image position/object from click Date: Sun, 9 Jun 2002 09:19:15 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200206091519.g59FJFk00269@aztec.santafe.edu> References: Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1023636118 15409 127.0.0.1 (9 Jun 2002 15:21:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 9 Jun 2002 15:21:58 +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.33 #1 (Debian)) id 17H4Vy-00040Q-00 for ; Sun, 09 Jun 2002 17:21:58 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17H4sN-0004WO-00 for ; Sun, 09 Jun 2002 17:45:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17H4VN-0002hs-00; Sun, 09 Jun 2002 11:21:21 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17H4TM-0002RD-00; Sun, 09 Jun 2002 11:19:16 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g59FJFQ20336; Sun, 9 Jun 2002 09:19:15 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g59FJFk00269; Sun, 9 Jun 2002 09:19:15 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: David.Kastrup@t-online.de In-Reply-To: (David.Kastrup@t-online.de) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4665 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4665 GNU Emacs is missing an API for finding out where a click occured. If I have a string or an image as part of a display property, or as a before-string or after-string, the only way to let Emacs react to clicks on different images differently is to generate individual keymaps for each of them. I see. All it provides is the buffer position, which won't tell you the position within the before-string. I think we should replace the buffer position with a list that gives the full story. Even then, you cannot find out the relative coordinates of a click on such an image. It does give the x and y pixel coordinates of the click. If you can determine the coordinates of a corner of the image, you can subtract and get the relative position. But I am not sure there is any way to determine the corner's coordinates, if the image comes from a before-string. In principle, these are good features to add. Do you have an immediate practical application for them?