From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: help create function alias Date: Thu, 9 Dec 2010 13:35:51 -0800 Message-ID: <3FC66D6FFCB0445F8F30B694E24E2A00@us.oracle.com> References: <962ba4f8-c462-455c-bf06-4c3149f7680d@h37g2000pro.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291940826 21980 80.91.229.12 (10 Dec 2010 00:27:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 00:27:06 +0000 (UTC) To: "'Xah Lee'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 01:26:57 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQqp6-0000s2-1K for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 01:26:56 +0100 Original-Received: from localhost ([127.0.0.1]:41710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQqp5-0000uY-2M for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 19:26:55 -0500 Original-Received: from [140.186.70.92] (port=39289 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQoRN-0002Xf-Ev for help-gnu-emacs@gnu.org; Thu, 09 Dec 2010 16:54:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQoA6-0005RH-Aa for help-gnu-emacs@gnu.org; Thu, 09 Dec 2010 16:36:27 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:23963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQoA6-0005R4-5W for help-gnu-emacs@gnu.org; Thu, 09 Dec 2010 16:36:26 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oB9LaMFS030688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Dec 2010 21:36:23 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oB9LBCjW013549; Thu, 9 Dec 2010 21:36:19 GMT Original-Received: from abhmt020.oracle.com by acsmt355.oracle.com with ESMTP id 861606371291930551; Thu, 09 Dec 2010 13:35:51 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 09 Dec 2010 13:35:51 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <962ba4f8-c462-455c-bf06-4c3149f7680d@h37g2000pro.googlegroups.com> Thread-Index: AcuXanLjPH6QMe42TFesXyhy0ppZhgAbyJZg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77103 Archived-At: (`x' = Xah; `s' = Stefan.) x> would it be nice to have a general mechanism to execute commands with x> just their inits? maybe a command named x> "execute-extended-command-by-init" with a keybinding. e.g. i have x> lots aliases: x> ; shortening of often used commands x> (defalias 'rn 'wdired-change-to-wdired-mode) x> (defalias 'dj 'dired-jump) ... x> plus about 40 more on personal commands... x> x> keybinding.> x> humm.. actually does that exist somewhere? seems not hard to write... s> >> (define-key minibuffer-local-completion-map s> >> [(meta return)] s> >> (lambda () s> >> (interactive) s> >> (minibuffer-force-complete) s> >> (minibuffer-complete-and-exit))) s> >> and then M-x i-d M-RET > > > Thanks, lovely stuff, but i dash d not as intuitive as > > my desired simplistic i d mnemonic or abbreviation. s> s> Of course. My suggestion is not nearly as simple as the thing you s> asked for. Its main interest is that it's applicable to all commands s> rather than just to insert-date. s> Actually, without any change, you can already try M-x i-d TAB, tho s> you'll find there are many other commands that match this pattern. In Icicles, you can use `C-x SPC' (by default) instead of `M-x', to execute both commands and command abbreviations, using completion. The completion is lax, so you can even create new command abbreviations on the fly. (You can also create or edit abbreviations using Customize.) http://www.emacswiki.org/emacs/Icicles_-_Multi_M-x#toc6