From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#12490: 24.2; Search inside Minibuffer don't work with M-x (M-x C-s) Date: Wed, 30 Oct 2019 23:25:07 +0100 Message-ID: <87bltxx458.fsf@joffe.skangas.se> References: <20120922224229.7baf7964@jcubic> <87obkxod8c.fsf@mail.jurta.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="16790"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: Jakub Jankiewicz , 12490@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 30 23:26:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iPwPu-0004DX-L4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Oct 2019 23:26:14 +0100 Original-Received: from localhost ([::1]:44890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPwPs-0000LZ-Bt for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Oct 2019 18:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41105) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPwPl-0000JN-F2 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 18:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPwPj-0005DD-5j for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 18:26:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPwPi-0005Bi-Ko for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 18:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iPwPi-00037L-GM for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2019 18:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2019 22:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12490 X-GNU-PR-Package: emacs Original-Received: via spool by 12490-submit@debbugs.gnu.org id=B12490.157247434311953 (code B ref 12490); Wed, 30 Oct 2019 22:26:02 +0000 Original-Received: (at 12490) by debbugs.gnu.org; 30 Oct 2019 22:25:43 +0000 Original-Received: from localhost ([127.0.0.1]:51777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPwPM-00036h-Mg for submit@debbugs.gnu.org; Wed, 30 Oct 2019 18:25:40 -0400 Original-Received: from giraff.fripost.org ([193.234.15.44]:42378 helo=outgoing.fripost.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPwPK-00036U-8D for 12490@debbugs.gnu.org; Wed, 30 Oct 2019 18:25:39 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by outgoing.fripost.org (Postfix) with ESMTP id 3F970187EAE3; Wed, 30 Oct 2019 23:25:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=x.fripost.org; h= content-type:content-type:mime-version:user-agent:message-id :in-reply-to:date:date:references:subject:subject:from:from; s= 9df9cdc7e101629b5003b587945afa70; t=1572474332; x=1574288733; bh=oJaAnbGokDdDj7Nj7cSxjhySV8uJJF4nFVpEDr+Jqss=; b=GLO1D9t7GnD5 0uKiqNRX0/ug88ugTKXAFDD9+xtQD39s/YPM+vWvUufzlTWh+HrAusckOoV5UvpM qj8YYE88SRVxOKJbUj6hlhkE6EfEEoIA40sxPaYdBcm9n3Jk9+XsRfE8QrX8VjKZ haSNlRKvO6d0VCEmMvQOj11AAlqND172erJv65gKwBXlN+spcvuvGfNA5qG3PDz1 sbjQO4SaCEaddr1dWY4/zaT3njjoqmKrtIoCogO+AqDTmW0LHWaj8/TKfx8w5iMn YYiH37cDsx1WKRVoYVboiV3VHne5M3PjerQv8p4CVDnT9sL0IK1kkhFmBMycq9lR uKggQvSBxA== X-Virus-Scanned: Debian amavisd-new at fripost.org Original-Received: from outgoing.fripost.org ([127.0.0.1]) by localhost (giraff.fripost.org [127.0.0.1]) (amavisd-new, port 10040) with LMTP id YLop5dEpNU8j; Wed, 30 Oct 2019 23:25:32 +0100 (CET) Original-Received: from smtp.fripost.org (unknown [172.16.0.6]) by outgoing.fripost.org (Postfix) with ESMTP id 1FAEE187EADF; Wed, 30 Oct 2019 23:25:32 +0100 (CET) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by smtp.fripost.org (Postfix) with ESMTPSA id A25C6599F6F8; Wed, 30 Oct 2019 23:25:18 +0100 (CET) Original-Received: from skangas by joffe.skangas.se with local (Exim 4.92) (envelope-from ) id 1iPwOp-00069k-EM; Wed, 30 Oct 2019 23:25:07 +0100 In-Reply-To: <87obkxod8c.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 23 Sep 2012 02:21:39 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170468 Archived-At: Juri Linkov writes: >> I want to report, that most used function stop working in Emacs 24 >> (tested 2 versions 24.1.1 and latest 24.2.1). I use Search in >> Mini buffer a lot (don't know if people use it or not). If you call >> search C-s when inside minibuffer like C-h f C-s you can search the >> content of Minibuffer like search for functions or for buffer name to >> switch like C-x b C-s (better then ido mode). And in Emacs 24 M-x C-s >> stop working so I you can't search for interactive function to execute >> anymore. It was working in 23.3 provided by Ubuntu (package >> 23.3+1-1ubuntu4). > > Sorry, this feature has been removed by http://debbugs.gnu.org/5214 > and http://debbugs.gnu.org/5364 > > But it's easy to restore it with a simple patch that prepends the > current default value (a command at point) to the sorted list of > all available command names: > > === modified file 'lisp/simple.el' > --- lisp/simple.el 2012-09-22 20:53:16 +0000 > +++ lisp/simple.el 2012-09-22 23:20:41 +0000 > @@ -1352,9 +1352,15 @@ (defun read-extended-command () > (lambda () > ;; Get a command name at point in the original buffer > ;; to propose it after M-n. > - (with-current-buffer (window-buffer (minibuffer-selected-window)) > - (and (commandp (function-called-at-point)) > - (format "%S" (function-called-at-point))))))) > + (let ((def (with-current-buffer > + (window-buffer (minibuffer-selected-window)) > + (and (commandp (function-called-at-point)) > + (format "%S" (function-called-at-point))))) > + (all (sort (minibuffer-default-add-completions) > + (lambda (a b) (string< a b))))) > + (if def > + (cons def (delete def all)) > + all))))) > ;; Read a string, completing from and restricting to the set of > ;; all defined commands. Don't provide any initial input. > ;; Save the command read on the extended-command history list. I tested this patch. It works, and the behaviour seems better than what we have now. Should it perhaps be installed? Best regards, Stefan Kangas