From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: muede Newsgroups: gmane.emacs.help Subject: Re: ido breaks command-history Date: Mon, 13 Jul 2009 13:40:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9f515737-2201-4958-899a-d435fc266797@v2g2000vbb.googlegroups.com> References: <5cf19341-41c0-4046-9c38-3187d8676959@k20g2000vbp.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1247544548 17234 80.91.229.12 (14 Jul 2009 04:09:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jul 2009 04:09:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 14 06:09:01 2009 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.50) id 1MQZK8-0004yK-PT for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jul 2009 06:09:01 +0200 Original-Received: from localhost ([127.0.0.1]:44719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQZK8-0005n4-A6 for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jul 2009 00:09:00 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v2g2000vbb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 88.68.201.199 Original-X-Trace: posting.google.com 1247517606 20099 127.0.0.1 (13 Jul 2009 20:40:06 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 13 Jul 2009 20:40:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v2g2000vbb.googlegroups.com; posting-host=88.68.201.199; posting-account=Cb0eCQoAAADOp8Qt5mU0s83Gs6qJzY70 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11) Gecko/2009061208 Iceweasel/3.0.9 (Debian-3.0.9-1),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170846 X-Mailman-Approved-At: Tue, 14 Jul 2009 00:07:07 -0400 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:66053 Archived-At: On Jul 12, 2:58=A0am, dnquark wrote: > I am using ido to complete the M-x commands, as described on EmacsWiki > --http://www.emacswiki.org/emacs/InteractivelyDoThings. > Unfortunately, when ido is used M-x commands are no longer recorder in > the command history. As a result, C-x z, as well as browsing history > in the minibuffer with M-p and M-n no longer works. Does anyone have > an idea of how to go about fixing thisi?.. The emacsWiki code is > below: > > =A0(setq ido-execute-command-cache nil) > > =A0(defun ido-execute-command () > =A0 =A0(interactive) > =A0 =A0(call-interactively > =A0 =A0 (intern > =A0 =A0 =A0(ido-completing-read > =A0 =A0 =A0 "M-x " > =A0 =A0 =A0 (progn > =A0 =A0 =A0 =A0 (unless ido-execute-command-cache > =A0 =A0 =A0 =A0 =A0 (mapatoms (lambda (s) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (when (commandp s) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (setq ido-execute-command= -cache > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (cons (format= "%S" s) ido-execute- > command-cache)))))) > =A0 =A0 =A0 =A0 ido-execute-command-cache))))) > > =A0(add-hook 'ido-setup-hook > =A0 =A0 =A0 =A0 =A0 =A0(lambda () > =A0 =A0 =A0 =A0 =A0 =A0 =A0(setq ido-enable-flex-matching t) > =A0 =A0 =A0 =A0 =A0 =A0 =A0(global-set-key "\M-x" 'ido-execute-command))) `repeat' handles the special case, where `last-repeatable-command' is `exit-minibuffer', so a advice, which treats `ido-exit-minibuffer' as `exit-minibuffer' will probably work. (defadvice repeat (before repeat-fix-ido activate) (when (eq last-repeatable-command 'ido-exit-minibuffer) (setq last-repeatable-command 'exit-minibuffer))) -ap