unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Jakub Jankiewicz <jcubic@onet.pl>
Cc: 12490@debbugs.gnu.org
Subject: bug#12490: 24.2; Search inside Minibuffer don't work with M-x (M-x C-s)
Date: Sun, 23 Sep 2012 02:21:39 +0300	[thread overview]
Message-ID: <87obkxod8c.fsf@mail.jurta.org> (raw)
In-Reply-To: <20120922224229.7baf7964@jcubic> (Jakub Jankiewicz's message of "Sat, 22 Sep 2012 22:42:29 +0200")

> 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.





  reply	other threads:[~2012-09-22 23:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22 20:42 bug#12490: 24.2; Search inside Minibuffer don't work with M-x (M-x C-s) Jakub Jankiewicz
2012-09-22 23:21 ` Juri Linkov [this message]
2012-09-23  9:27   ` Jakub Jankiewicz
2019-10-30 22:25   ` Stefan Kangas
2019-11-23 14:41     ` Lars Ingebrigtsen
2019-11-30 21:43       ` Juri Linkov
2019-11-30 23:41         ` Drew Adams
2019-12-01  7:36         ` Stefan Kangas
2019-12-01 22:38           ` Juri Linkov
2019-12-02 22:51             ` Juri Linkov
2020-08-19 13:52             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obkxod8c.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=12490@debbugs.gnu.org \
    --cc=jcubic@onet.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).