From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: Emacs completion matches selection UI Date: Mon, 06 Jan 2014 18:48:06 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87sit0ekp5.fsf@flea.lifelogs.com> References: <87fvqtg02v.fsf@flea.lifelogs.com> <87zjnyxdpb.fsf@uwakimon.sk.tsukuba.ac.jp> <87k3f2j7xv.fsf@flea.lifelogs.com> <2518D79A-B9E4-45DF-A403-8330145DFD17@gmail.com> <87eh58j0x3.fsf@flea.lifelogs.com> <87mwjvfrfy.fsf@flea.lifelogs.com> <877gawbhp0.fsf@flea.lifelogs.com> <87vby6s3ji.fsf@gmail.com> <87fvp3xjjd.fsf@gmail.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389052214 26954 80.91.229.3 (6 Jan 2014 23:50:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Jan 2014 23:50:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 07 00:50:20 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0Jw2-0002GH-LY for ged-emacs-devel@m.gmane.org; Tue, 07 Jan 2014 00:50:18 +0100 Original-Received: from localhost ([::1]:38123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Jw2-0001g6-A6 for ged-emacs-devel@m.gmane.org; Mon, 06 Jan 2014 18:50:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Jvu-0001fs-G9 for emacs-devel@gnu.org; Mon, 06 Jan 2014 18:50:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0Jvo-00068k-LA for emacs-devel@gnu.org; Mon, 06 Jan 2014 18:50:10 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:32859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0Jvo-00067D-FI for emacs-devel@gnu.org; Mon, 06 Jan 2014 18:50:04 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W0Jvn-0001eq-9v for emacs-devel@gnu.org; Tue, 07 Jan 2014 00:50:03 +0100 Original-Received: from c-98-229-61-72.hsd1.ma.comcast.net ([98.229.61.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jan 2014 00:50:03 +0100 Original-Received: from tzz by c-98-229-61-72.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Jan 2014 00:50:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-98-229-61-72.hsd1.ma.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:XxEdeIowVmfSFa2gIBkNdtt6UEY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167546 Archived-At: On Sun, 05 Jan 2014 11:11:00 -0500 Stefan Monnier wrote: >>>> (define-fallbackish-command maybe-foo (kbd "[somekey]") () >>> I don't understand what's the intended relation between [somekey] and >>> `maybe-foo'. >> Sorry, I should have provided some implementation, or made this more >> clear. I >> The generated part of the `maybe-foo' would do two things: >> * register the association between maybe-foo and [somekey] in a some >> global variable, pushing in front of any existing ones also defined >> with the same macro. This keeps track of the "fallbackish commands" >> (horrible name, sorry) for [somekey] >> * bind maybe-foo to [somekey] in the (global) keymap, maybe replacing >> someone else's binding. SM> We could do the above fairly easily with SM> (add-function :around (lookup-key global-map [somekey]) SM> (lambda (orig &rest args) SM> (if (foop) (foo) (apply orig args)))) Please, no. It's a real pain to debug this with a user. >> I have no idea how it would work with multiple keymaps. SM> Right, that's where it gets more interesting. E.g. some major mode SM> might want to extend the meaning of TAB, but it should do it in the SM> major mode's map, not in the global map. I think the mykie.el approach has potential here ;) Ted