From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47215: 28.0.50; Let M-x switch between M-x and M-X Date: Sun, 04 Apr 2021 21:52:21 +0200 Message-ID: <87czv9g74a.fsf@gnus.org> References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40712"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47215@debbugs.gnu.org To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 04 21:53:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lT8o2-000ATC-3Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 21:53:10 +0200 Original-Received: from localhost ([::1]:35800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lT8o1-0001vB-41 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 15:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lT8nu-0001us-JY for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 15:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lT8nu-0002r3-Co for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 15:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lT8nu-00015i-C9 for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 15:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Apr 2021 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47215 X-GNU-PR-Package: emacs Original-Received: via spool by 47215-submit@debbugs.gnu.org id=B47215.16175659524159 (code B ref 47215); Sun, 04 Apr 2021 19:53:02 +0000 Original-Received: (at 47215) by debbugs.gnu.org; 4 Apr 2021 19:52:32 +0000 Original-Received: from localhost ([127.0.0.1]:36503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT8nQ-000151-Ja for submit@debbugs.gnu.org; Sun, 04 Apr 2021 15:52:32 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:50412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT8nO-00014o-UR for 47215@debbugs.gnu.org; Sun, 04 Apr 2021 15:52:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OdzlhP/cvmU4GMKoFevgXTaYZJBKhJecQvSEgSn9vBg=; b=UbL+WsR+67vQbSlCXqv7qmSFiE LLWqAZXO5usbWmyxQ+zPsCzHpmsktvguIECgd6OIthB5h3q2H1cV6wpOPxC7Qa6lv1LhtJPVU00pS MaTK7zMOqTuftBZVV9AFdmfWxpii+cRl9Eowwf7JGC5NQwJW7jOhN+QYXAEJLv+UVpwI=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lT8nG-00028V-Dr; Sun, 04 Apr 2021 21:52:25 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAlQTFRF PEZFqbOn////C9F+/gAAAAFiS0dEAmYLfGQAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfl BAQTERSn3PtCAAAAtklEQVQoz53SsQ7EIAgAUEhkd9D/0eS6awL//ysn2iJtbzqHhhdUUAvwz8js hS6uot+0IAMobYOkJ4OMMfeJAdsIF6gha0bgWvZCWVU98gKrwgktfE5a81AOse2wuwzYNO2BfkKe gBuyB3rQDYf1tlPXGWKzoyJH6HxeHY2gH1ox6JoWV/kkZdxuljqgp8Fr5663KZwY2u6yvFreqB9D 6sUyHUYXE4F4v0Ai9xz2J7hnmuAHwoy/b/Bi7ODUWv0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEt MDQtMDRUMTk6MTc6MTkrMDA6MDBGFyk9AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA0LTA0VDE5 OjE3OjE5KzAwOjAwN0qRgQAAADh0RVh0aWNjOmNvcHlyaWdodABDb3B5cmlnaHQgKGMpIDE5OTgg SGV3bGV0dC1QYWNrYXJkIENvbXBhbnn5V3k3AAAAIXRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQiBJ RUM2MTk2Ni0yLjFXrdpHAAAAJnRFWHRpY2M6bWFudWZhY3R1cmVyAElFQyBodHRwOi8vd3d3Lmll Yy5jaBx/AEwAAAA3dEVYdGljYzptb2RlbABJRUMgNjE5NjYtMi4xIERlZmF1bHQgUkdCIGNvbG91 ciBzcGFjZSAtIHNSR0JEU0ipAAAAAElFTkSuQmCC X-Now-Playing: The Notwist's _Vertigo Days_: "Ghost" In-Reply-To: <87k0pi546i.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sun, 04 Apr 2021 19:51:17 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203563 Archived-At: Felician Nemeth writes: >> I'm not quite sure how to implement this, though -- we basically end up >> in `completing-read', and `execute-extended-command-for-buffer' would >> have to define an `M-x' binding there, I guess... and then somehow call >> `read-extended-command' with the text already in the minibuffer. >> >> Anybody got an idea as to how to implement this without rewriting >> `read-extended-command' completely? > > The execute-extended-commands have two undocumented optional arguments > (command-name and typed). What are they used for? > > Anyway, following the fallback logic of `ido-find-file', I was able to > rebind `M-x' and save the content of the minibuffer with a non-standard > exit from `execute-extended-command'. Maybe the ugly code below can > give ideas to someone more knowledgeable. Thanks -- I was wondering more about the situation where you've typed M-X foo|bar (| for point) and then hit `M-x' because you want to switch to the other mode. Ideally, `M-x' should do that, and also preserve the text the user has typed, and the cursor position. I don't see an obvious simple way to do that... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no