From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Getting the click position in a string Date: Sun, 30 Apr 2006 23:55:23 +0200 Message-ID: <857j566850.fsf@lola.goethe.zz> References: <85fyk2ugle.fsf@lola.goethe.zz> <85fyk0rbrk.fsf@lola.goethe.zz> <853bg0r1ms.fsf@lola.goethe.zz> <85y7xspkgk.fsf@lola.goethe.zz> <87ejzk8mmv.fsf-monnier+emacs@gnu.org> <85r73jkyqf.fsf@lola.goethe.zz> <87r73j6mav.fsf-monnier+emacs@gnu.org> <858xpqkgvy.fsf@lola.goethe.zz> <87irou4t8q.fsf-monnier+emacs@gnu.org> <854q0eitpo.fsf@lola.goethe.zz> <87d5f1k77c.fsf-monnier+emacs@gnu.org> <85aca42giz.fsf@lola.goethe.zz> <878xpoez6s.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146434974 14521 80.91.229.2 (30 Apr 2006 22:09:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 22:09:34 +0000 (UTC) Cc: "Kim F. Storm" , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 00:09:32 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaK6Y-0000hX-T6 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 00:09:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaK6Y-00011a-1x for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 18:09:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaK6I-0000xP-PZ for emacs-devel@gnu.org; Sun, 30 Apr 2006 18:09:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaK6I-0000wV-3b for emacs-devel@gnu.org; Sun, 30 Apr 2006 18:09:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaK6H-0000w7-QC for emacs-devel@gnu.org; Sun, 30 Apr 2006 18:09:09 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaK9x-0004ji-PO for emacs-devel@gnu.org; Sun, 30 Apr 2006 18:12:57 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FaK6E-0003T0-G0; Sun, 30 Apr 2006 18:09:08 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 8D44D1C4CD64; Mon, 1 May 2006 00:08:51 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: <878xpoez6s.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 29 Apr 2006 19:33:32 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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: news.gmane.org gmane.emacs.devel:53699 Archived-At: Stefan Monnier writes: >> key-binding already looks up events or keys, so I suppose you are >> confused about what I was proposing. > > It accepts events? That's news to me. > >> The purpose is to look up a key such as [follow-link] in the chain of >> keymaps corresponding to a click event. > > Yes, that's whayt I understood. > >> So the event takes the place of the keymap, not of the key. > > What keymap? > > key-binding is a built-in function in `C source code'. > (key-binding key &optional accept-default no-remap) > > I see no keymap argument. Probably because I am confusing this with lookup-key. Looks like I messed up my proposal royally due to this mixup, and I don't understand your counterproposal and corresponding arguments either, most likely because you tried making sense of my nonsense in a way that I am not able to follow. So my proposal would _rather_ have been to have lookup-key accept an event in the place of KEYMAP, where an event means the chain of keymaps associated with the events. This does not seem like a sensible interface since it makes lookup-key either act on a single-keymap level, or perform a more complex lookup. So the function to tweak would seem to be rather key-binding after all. Instead of making it accept an event as one of the existing arguments, however, one should probably add another optional argument which will then augment the "current keymaps" that the function is supposed to be searching, according to the event. It would not really suffice to let it accept an event instead of KEY: for implementing the follow-link functionality, the lookup has to be for [follow-link], but for a given event of type down-mouse-1 or similar. So an additional event specifier seems to be both required and appropriate. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum