From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 17 13:56:36 2021 Received: (at submit) by debbugs.gnu.org; 17 Mar 2021 17:56:36 +0000 Received: from localhost ([127.0.0.1]:43944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMaPL-0005Z5-Q8 for submit@debbugs.gnu.org; Wed, 17 Mar 2021 13:56:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:58610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMaPK-0005Yx-No for submit@debbugs.gnu.org; Wed, 17 Mar 2021 13:56:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMaPK-00065O-CG for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 13:56:34 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:35721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMaPI-0003nM-Vq for bug-gnu-emacs@gnu.org; Wed, 17 Mar 2021 13:56:34 -0400 Received: by mail-ed1-x52d.google.com with SMTP id dm8so3396014edb.2 for ; Wed, 17 Mar 2021 10:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:face:mime-version; bh=oyzLQjgfQUPl+4oJaaWczBtO9GtuR9IPyAvjoKkOPNc=; b=uQtnWN/pPZDf3+fN9ND5PaFm3mldXe5SM0kIvjduYXWrUhxc6KrKxepCtitwygMadU gPaim2KxZgtsgCz8rYK05KzqlW8poZ/ogNNpGqiDmj1KsudceMh676rz4dK/61hFok8K A9FlhoPLmx8RYlHDVvfTMljvX5SUC9AXKxc5lmlC+pP9pj9VYyNQMjXmRaEavDq0AZyR LYsQSdhXzw3ACW66k+KDdSJq6YGd9zusdiWdUc3vZoPRm8EpB2GJial8Aajgcvo1fxyL o8UKJwsjaeKyhTZas6W4971yYdJQYdTOnRxma55sYoMdOHXoTSUJLXd43maNggc8A5b7 Oyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent:face :mime-version; bh=oyzLQjgfQUPl+4oJaaWczBtO9GtuR9IPyAvjoKkOPNc=; b=sEf1emjo/J1IO1x6V63j0K5WFti6wR1esexvSNdeR4w0W3nBRREfBGd+LuDAE9W4sX t3bTHHG0NG+LJHwAN3qD8f2PRrNlGv1nMNllU+ynRWQZXHKvXH1yEhg/hs+gFLj4+2IO EEgljM19PoDmbMcgeWMxwk2ZX3RCQkCCSG0IPOAGAJagHt4kUCb3E5IP2005MfG9p6GP jlB0iPdfOjElHfDzZT9OzKaWXq5btnvk2/J7U5DJ3H/EYQzuf0a6J7BO/uL6z3qPiHI5 fTv3w3kOrA3rFJ8sxD3qOJKwJGReMuAmHYGAXifyoN3VbzqPbmosHyJhIpBvcolisIk5 hiIQ== X-Gm-Message-State: AOAM533iA/jdfR284j7gkHeBc/zHZ3/Km0bEy7HGY3TIA4lEsZxriCFO OoNt1d7wZplAbM+90r0niQnjaBN8zHg= X-Google-Smtp-Source: ABdhPJzMdEX9CI1K9+cX9GSMhgOlMqMqIQ45rr1hDl0hWXrsLjXqdAwu6vwlh4dBNLKQlctLL6xHbw== X-Received: by 2002:a05:6402:447:: with SMTP id p7mr43574905edw.89.1616003790525; Wed, 17 Mar 2021 10:56:30 -0700 (PDT) Received: from betli.gmail.com (catv-89-135-146-28.catv.broadband.hu. [89.135.146.28]) by smtp.gmail.com with ESMTPSA id c15sm6310827ejm.52.2021.03.17.10.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Mar 2021 10:56:29 -0700 (PDT) From: Felician Nemeth To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Let M-x switch between M-x and M-X Date: Wed, 17 Mar 2021 18:56:28 +0100 Message-ID: <87tup91x6b.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=felician.nemeth@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I wish there was a convenient way to switch back and forth between execute-extended-command and execute-extended-command-for-buffer. I think M-x would be an ideal binding for this as it is easy to press and more useful than the current "Command attempted to use minibuffer while in minibuffer". I'd imagine this feature being somewhat analogous to how ido-find-file falls back to find-file after C-f. Thank you. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 18 01:08:55 2021 Received: (at 47215) by debbugs.gnu.org; 18 Mar 2021 05:08:55 +0000 Received: from localhost ([127.0.0.1]:44593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMktz-0005WG-1D for submit@debbugs.gnu.org; Thu, 18 Mar 2021 01:08:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMktl-0005Vn-8N for 47215@debbugs.gnu.org; Thu, 18 Mar 2021 01:08:53 -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=MO+GxKHgXwx1RwQH5BWrm9+9krKrPQHtg9VbftQo4dI=; b=CESUB1YEtH2vq5vMqHOVokWwXU 74gld+qKJA9Cu81AZEypdeehCOzsxN1IRQC4sAsZqeqaDS7ZqeinE4+lZk4teyoXsnLEu+TBEvesG 1f1jycDOhzzLlJlalZ79KaJNcb2IFMPje8GyanDzWNH0L7Y8ppKExQCKHUWhaIVt2dLs=; 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 1lMktb-0008FP-3B; Thu, 18 Mar 2021 06:08:34 +0100 From: Lars Ingebrigtsen To: Felician Nemeth Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> X-Now-Playing: Themselves's _CrownsDown_: "backIIburn" Date: Thu, 18 Mar 2021 06:08:29 +0100 In-Reply-To: <87tup91x6b.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Wed, 17 Mar 2021 18:56:28 +0100") Message-ID: <87tup9t5f6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Felician Nemeth writes: > I wish there was a convenient way to switch back and forth between > execute-extended-command and execute-extended-command-for-buffer. I > think M-x would be an ideal binding for this as it is easy [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Felician Nemeth writes: > I wish there was a convenient way to switch back and forth between > execute-extended-command and execute-extended-command-for-buffer. I > think M-x would be an ideal binding for this as it is easy to press and > more useful than the current "Command attempted to use minibuffer while > in minibuffer". > > I'd imagine this feature being somewhat analogous to how ido-find-file > falls back to find-file after C-f. Yes, being able to move from `execute-extended-command-for-buffer' to `execute-extended-command' makes sense, but I'm not sure the other direction is as useful. And while there's only two of these commands today, I think it's likely that (in the future) that we'll grow more of these. 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? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 04 13:51:29 2021 Received: (at 47215) by debbugs.gnu.org; 4 Apr 2021 17:51:29 +0000 Received: from localhost ([127.0.0.1]:36404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT6uH-0002Mr-1n for submit@debbugs.gnu.org; Sun, 04 Apr 2021 13:51:29 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:42683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lT6uD-0002Mc-91 for 47215@debbugs.gnu.org; Sun, 04 Apr 2021 13:51:27 -0400 Received: by mail-ed1-f46.google.com with SMTP id l18so10421849edc.9 for <47215@debbugs.gnu.org>; Sun, 04 Apr 2021 10:51:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:face:mime-version; bh=u4mvo6a6IRZKTDou/5/5LP9MBYKE/QSLS5LPp0OVqOA=; b=D/gp8n3YfxU/twJ+xOvjCRCXTboipfcdn9u6R4kx0zORgkdHsuFpW+vN15fGXrEr+w cNuDKNH5yj+VeDnrtsLx42VXZPcdDCtpCil0o6r2It6xruApCnABW+YN/a6qOrDF3EQu M29nQi+OQwBsMEbB/kWzp4pHQw3FCeGWgWJigoFjr8NBh7ZRa1Vg4ku2MICDXQNw7qZj Tzd/jWzD+Fi8/QAOGRs/X4nbnvBJ5qBymbwNIy0nNmTp8hoSX7J0vtcqT0JUdaYfGphu baA7gjIzdpRZv3WL5t4kgxWxKOXzSGLrPUT/Xk/MX3WHPA/3IH8n7ldu8HxZ7gRAGGLA 5Diw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:face:mime-version; bh=u4mvo6a6IRZKTDou/5/5LP9MBYKE/QSLS5LPp0OVqOA=; b=JUo9FUAu6QX8yM8xJ9o/bUxJEfaGJEXF90PJMEmEnfWGkT+tPWUhTPjrRFWcjv9irZ uBxw/17/0VFAJ4rhQm6zkUnlLBeFZEzlW+5yEmBbRfpr0KMDcX8nNWM+yiBzWCCxmt08 PNzxL5Eb+l0u2VwtJ2WbmmF4KhhKluHK1tkQ15xwzURoSgUb2hm9Z4rFu2qnwbTsZCvo gTdxp6ebFqdAmp9xPnXeePRV0+cjH5zDiInXMPpIoljX7zMHhKgebM6sqg9D4tPPdOmt +S/JW9pGUS/TwVaGAPKZmXH0nkFAeD8HLplD1UBy1LWrUszdzfl10kgcWRnNES+yHWXp G2eg== X-Gm-Message-State: AOAM531rSlF2xDsy7SAxX1xYPSCeud7IGoH38BhbHFpXbUTXpSAmVkJP 9AVJ6iaWjkqblNIHBaur4bc= X-Google-Smtp-Source: ABdhPJxhNj6KkVNvpbnyXJG7/saH74q/aGpvAO6EgUKQimuHB8mz8cUzlIDxR10ckgmJP0w9fTT1Ew== X-Received: by 2002:aa7:c7c5:: with SMTP id o5mr26973065eds.31.1617558679398; Sun, 04 Apr 2021 10:51:19 -0700 (PDT) Received: from betli.gmail.com (catv-89-135-146-28.catv.broadband.hu. [89.135.146.28]) by smtp.gmail.com with ESMTPSA id z9sm9335445edr.75.2021.04.04.10.51.18 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Apr 2021 10:51:19 -0700 (PDT) From: Felician Nemeth To: 47215@debbugs.gnu.org Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> Date: Sun, 04 Apr 2021 19:51:17 +0200 In-Reply-To: <87tup9t5f6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 18 Mar 2021 06:08:29 +0100") Message-ID: <87k0pi546i.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47215 Cc: Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I wish there was a convenient way to switch back and forth between >> execute-extended-command and execute-extended-command-for-buffer. I >> think M-x would be an ideal binding for this as it is easy to press and >> more useful than the current "Command attempted to use minibuffer while >> in minibuffer". >> >> I'd imagine this feature being somewhat analogous to how ido-find-file >> falls back to find-file after C-f. > > Yes, being able to move from `execute-extended-command-for-buffer' to > `execute-extended-command' makes sense, but I'm not sure the other > direction is as useful. And while there's only two of these commands > today, I think it's likely that (in the future) that we'll grow more of > these. I think cycling makes even more sense when there are more than two of these execute-extended-commands. Currently, going from `execute-extended-command' to `execute-extended-command-for-buffer' would be useful for me because I can type M-x M-x more easily than type M-X. > 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. (defun my-exit () (interactive) (throw 'cycle (cons 'cycle (minibuffer-contents)))) (let ((minibuffer-local-completion-map minibuffer-local-completion-map) ret) (define-key minibuffer-local-completion-map (kbd "M-x") 'my-exit) (setq ret (catch 'cycle (execute-extended-command nil))) (if (eq 'cycle (car ret)) (message "Should switch to M-X with %s" (cdr ret)) ret)) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 04 15:52:32 2021 Received: (at 47215) by debbugs.gnu.org; 4 Apr 2021 19:52:32 +0000 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 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=; 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 From: Lars Ingebrigtsen To: Felician Nemeth Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> 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" Date: Sun, 04 Apr 2021 21:52:21 +0200 In-Reply-To: <87k0pi546i.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sun, 04 Apr 2021 19:51:17 +0200") Message-ID: <87czv9g74a.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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... [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 10 13:57:00 2021 Received: (at 47215) by debbugs.gnu.org; 10 Apr 2021 17:57:00 +0000 Received: from localhost ([127.0.0.1]:53243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVHqt-0006rq-RE for submit@debbugs.gnu.org; Sat, 10 Apr 2021 13:57:00 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:36409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVHqr-0006rb-8q for 47215@debbugs.gnu.org; Sat, 10 Apr 2021 13:56:58 -0400 Received: by mail-ed1-f47.google.com with SMTP id 18so10206764edx.3 for <47215@debbugs.gnu.org>; Sat, 10 Apr 2021 10:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:face:mime-version; bh=gWyYRXYKwaq9XsbHaIs4FJ8uxmsiZfOQ8aIQOuX6qXI=; b=rxRGibH6VKqnCscclbXJJGWBN1yTRxTKgrpAmbVpUYYgcgTiZk1G9pkXD2Kza30pjB HaSAeSg5j2ZTa3X2lKH2jvuVTcjFRxUPTOG2RF6X5zGG5XK/fbpyBJIkyUbATIKLMB4w E44HHKI+VmZpGMaZYSdRO48ubV4CapseBnJ9zPNbco0ivdQpeNdOJwPJiM1BF7yfzBFI 6iE1Hmc9woMylaW3CJob+9dvU5vXwetzO4naqSPmeSkMdOtQaQKehb8rm7/uY1sV5zYD K8IO163LmhhfY7MrJZEfXLPBg8zM+2F0I1VDEaPLifQX/6UgXTLCTEHnK40ARw1jZZmG J+0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:face:mime-version; bh=gWyYRXYKwaq9XsbHaIs4FJ8uxmsiZfOQ8aIQOuX6qXI=; b=rVI1hsdtXyjIOD4uSvqYwjrC+XzCo/lSxDs1uxX1awUfxq6Vn9vr2LqNi2ort5852C cpwle9WU+BVwapzII0qOIX4PBJD287SEHopsSKLfA59WxOYxaAxDZjYswjSSq95e6wku A757qE6h/wqkvZEkLlc8ES9t8LROlzZjmF/K1g/MV29e/yLuuNUV00QHxslZAZM8uT7y yEqubpeQ/CyKgH6Y63FOyG+BYyX1tkdtYgALl5Rc7BRAT418hvsuTfykXTcfBWTmohRX ZT1egREwa+5A4VBn2b8S5UAPnE7cAgKmsOiDANeENdOTfognx288fro3OPFgwRKN0/ob ZESw== X-Gm-Message-State: AOAM530KkmCtk4011tUNgirDoMeKCmTQjJudlr9FdWeOg9hhC9LV3r9E 2ucJjCZhAv8yuRc5XKMa5/Qi0S3sUmA= X-Google-Smtp-Source: ABdhPJxSZbQew2BLL19kf5W34HsWkj85YogFp/Gv/cU6Hd+QR0jK+ODdGiY67aRbTKnafv4sE2wx+Q== X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr22761816ede.271.1618077411080; Sat, 10 Apr 2021 10:56:51 -0700 (PDT) Received: from betli.gmail.com (catv-89-135-146-28.catv.broadband.hu. [89.135.146.28]) by smtp.gmail.com with ESMTPSA id gb22sm2902780ejc.78.2021.04.10.10.56.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Apr 2021 10:56:50 -0700 (PDT) From: Felician Nemeth To: Lars Ingebrigtsen Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> Date: Sat, 10 Apr 2021 19:56:49 +0200 In-Reply-To: <87czv9g74a.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 04 Apr 2021 21:52:21 +0200") Message-ID: <87r1ji3twe.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > 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... I've discovered that the initial-input argument of `completing-read` can be written as (STRING . POSITION). The attached patch makes use of it and shows a simple implementation of my original wish. However, the patch creates code duplication. Also, I don't know how it copes with recursive editing: maybe it's not a good idea to rebind M-x when `enable-recursive-minibuffers' is t. Finally, the docstring says initial-input is deprecated. I'm happy to work on the patch if you guide me to the right direction, but this time I'd rather receive a fish instead of being taught how to fish :) --=-=-= Content-Type: #("text/x-diff" 0 11 (face iswitchb-current-match)) Content-Disposition: attachment; filename=m-x.patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/simple.el b/lisp/simple.el index c48e644345..1bd8ba5993 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1949,7 +1949,46 @@ read-extended-command-predicate command-completion-default-include-p) (function :tag "Other function"))) =20 -(defun read-extended-command () +(defun execute-extended-command--cycle () + (interactive) + (throw 'cycle + (cons 'cycle (cons (minibuffer-contents) + (- (point) (minibuffer-prompt-end)))))) + +(defun read-extended-command (&optional prompt) + (let ((minibuffer-local-must-match-map minibuffer-local-must-match-map) + (read-extended-command-predicate read-extended-command-predicate) + initial-input ret) + (define-key minibuffer-local-must-match-map + (kbd "M-x") #'execute-extended-command--cycle) + (while (not ret) + (setq ret (catch 'cycle + (read-extended-command-1 prompt initial-input))) + (when (and (consp ret) (eq 'cycle (car ret))) + ;; Cycle to the next setting. There's only two, so it's easy to d= o. + (if read-extended-command-predicate + (setq prompt "M-x " + read-extended-command-predicate nil) + (let ((keymaps + ;; The major mode's keymap and any active minor modes. + (cons + (current-local-map) + (mapcar + #'cdr + (seq-filter + (lambda (elem) + (symbol-value (car elem))) + minor-mode-map-alist))))) + (setq prompt "M-X ") + (setq read-extended-command-predicate + (lambda (symbol buffer) + (or (command-completion-using-modes-p symbol buffer) + (where-is-internal symbol keymaps)))))) + (setq initial-input (cdr ret)) + (setq ret nil))) + ret)) + +(defun read-extended-command-1 (prompt initial-input) "Read command name to invoke in `execute-extended-command'. This function uses the `read-extended-command-predicate' user option." (let ((buffer (current-buffer))) @@ -1976,8 +2015,8 @@ read-extended-command (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. + ;; all defined commands. Save the command read on the + ;; extended-command history list. (completing-read (concat (cond ((eq current-prefix-arg '-) "- ") @@ -1994,9 +2033,7 @@ read-extended-command ;; but actually a prompt other than "M-x" would be confusing, ;; because "M-x" is a well-known prompt to read a command ;; and it serves as a shorthand for "Extended command: ". - (if (memq 'shift (event-modifiers last-command-event)) - "M-X " - "M-x ")) + (or prompt "M-x ")) (lambda (string pred action) (if (and suggest-key-bindings (eq action 'metadata)) '(metadata @@ -2013,7 +2050,7 @@ read-extended-command (funcall read-extended-command-predicate sym buff= er) (error (message "read-extended-command-predicate: %= s: %s" sym (error-message-string err))))))= )) - t nil 'extended-command-history)))) + t initial-input 'extended-command-history)))) =20 (defun command-completion-using-modes-p (symbol buffer) "Say whether SYMBOL has been marked as a mode-specific command in BUFFER= ." @@ -2241,7 +2278,7 @@ execute-extended-command-for-buffer (or (command-completion-using-modes-p symbol buffer) (where-is-internal symbol keymaps))))) (list current-prefix-arg - (read-extended-command) + (read-extended-command "M-X ") execute-extended-command--last-typed))) (with-suppressed-warnings ((interactive-only execute-extended-command)) (execute-extended-command prefixarg command-name typed))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 11 13:36:43 2021 Received: (at 47215) by debbugs.gnu.org; 11 Apr 2021 17:36:43 +0000 Received: from localhost ([127.0.0.1]:55824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVe0p-0002Mt-F2 for submit@debbugs.gnu.org; Sun, 11 Apr 2021 13:36:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVe0n-0002Mh-P7 for 47215@debbugs.gnu.org; Sun, 11 Apr 2021 13:36:42 -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=a0ItSHt5NNebTvFvYloCl5wOiEa3zex6FHk+nzTCTIg=; b=kFRhoPM9k8J29Nh97w3IsVEqRR qVzudRw9XfSH4VF2MsZSo3GKZoNdQFl/fkIl8GoUs3gOxOrUSNwUhR1Z9o+Vt0H/Nunwv+UUlGriC rM3d+8l1kJ4EY8E5fe4nExuuoI6BcQdVurjbaas2+niKIZPlGBlMKH5Bwe6hrV/AKneI=; 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 1lVe0X-0002ax-1A; Sun, 11 Apr 2021 19:36:35 +0200 From: Lars Ingebrigtsen To: Felician Nemeth Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> <87r1ji3twe.fsf@betli.tmit.bme.hu> X-Now-Playing: Anthony Shake Shakir's _Frictionalism 1994-2009_: "My Computer Is An Optimist" Date: Sun, 11 Apr 2021 19:36:24 +0200 In-Reply-To: <87r1ji3twe.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sat, 10 Apr 2021 19:56:49 +0200") Message-ID: <87k0p8206f.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Felician Nemeth writes: > I've discovered that the initial-input argument of `completing-read` can > be written as (STRING . POSITION). The attached patch makes use of it > and shows a simple implementation of my original wi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Felician Nemeth writes: > I've discovered that the initial-input argument of `completing-read` can > be written as (STRING . POSITION). The attached patch makes use of it > and shows a simple implementation of my original wish. Nice; your patch works very smoothly -- using `M-x' to switch here feels very natural. > However, the patch creates code duplication. I think that can be fixed by refactoring out most of the interactive spec of `execute-extended-command-for-buffer' and then reusing it. > Also, I don't know how it copes with recursive editing: maybe it's not > a good idea to rebind M-x when `enable-recursive-minibuffers' is t. A lot of people have `enable-recursive-minibuffers' bound, though, which is an argument against using `M-x' as the keystroke to switch between modes. > Finally, the docstring says initial-input is deprecated. I think this use case demonstrates that perhaps we should slightly un-deprecate initial-input -- instead of deprecating it, we could instead just discourage the usage. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 11 14:29:16 2021 Received: (at 47215) by debbugs.gnu.org; 11 Apr 2021 18:29:16 +0000 Received: from localhost ([127.0.0.1]:55861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVepg-0003aE-Dp for submit@debbugs.gnu.org; Sun, 11 Apr 2021 14:29:16 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVepe-0003Zy-FV for 47215@debbugs.gnu.org; Sun, 11 Apr 2021 14:29:15 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13BIT8J4168355; Sun, 11 Apr 2021 18:29:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=pOovAE2gFELvvDEG3ArxhCiso56JhDDUt3KOYV15dPA=; b=rk0MjSZgpR3bjxBm61WQ8wPdSYGKKEBWjegwnVHTe51QPYrGiIJ/cuKktO1Xiuhy6UDW Uh+IzkpzKjc5dIVYHZGclPg0LOnjfECzKg7z6ZbcjCW2Xh0yabj1RjYoTmLU0RjsYa1n EAUdNY5aHmQonK39N62YCheIj4m5RidTXGt/BrI3Io+bCXfDk76j6jS8d/t3xJJr6/cF 1asRUhQzLRA+9IrlQN9WagQeDeoyhse2ySRkKj2UaTcKa2LD/kNCX+Kgd9Y4UK8XVwsn 64eiXxIk3BlmZmH367BiHrpSxkm90tonKEYb/Pf5OLgiRKy1QZhVTwu8Lbn1KkMDCSGR RA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 37u1hb9xv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Apr 2021 18:29:08 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 13BIQLvl150215; Sun, 11 Apr 2021 18:29:07 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2177.outbound.protection.outlook.com [104.47.58.177]) by aserp3030.oracle.com with ESMTP id 37unkma2uj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Apr 2021 18:29:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z4LUvxSg1siZVx/SQW0ZUPm32O5toba282SQk7KbTYIaP3djr58eQPL38SYvMlJdFtJ1O/QFthTKlBZuNdq3MlyXx5GdKR/lus7JB8GshBqBXpEnIvn7gAC5BgF897JnXzZD3HbaZUzW6LqYetGxmeYkktclGnVZElTkqj0iBfFdypSna2DfKyzjwQpVcx5WSFdvk2DbTn1BBa2aNPFrbY+xv/DZ9vFMS2mHtan2NbbsJ4URip8u6PzAmgN6kbZfDgcGUcDS9xat8mCMeToZ7wnS9GdX7GMGdtjoIxxfXCaNihU2Et3ZfRtVptNAlnwIQ/KhffhEgUerXfdNYJO3wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pOovAE2gFELvvDEG3ArxhCiso56JhDDUt3KOYV15dPA=; b=CoLqOLGzbk0vvnvMZTsTAy2ukFl9NU1GS2SzRGLZ7GilkevT+c19JI+tZGjKF0RdaNN5W7z9NyT0cuRKYzB/BQs2a3C2nLWLdmfKElVlODcNJqnZbu0OybzRwMt/2R6ZX4xwM4cZxr+V1V4yXd6h1SwjhCk3fAYStSf4tOo9q14PP+RPhiX1P9DawDmxZIBDRBno4TFKJEbCgUqawcPdtIhTkbQvLYOv9P1X9AEzxQ2IOGXaBQxC8sRNBT1EvtanFll/3ZVhvANcZSsKbe+PRS9TCIsIHiAEOBn+lnVdxo4JV7XVxjxvw28dCuh1TekvcYMnxpxuhzCaP2QH4mTahg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pOovAE2gFELvvDEG3ArxhCiso56JhDDUt3KOYV15dPA=; b=Tm2Sfwr8jp0kQvRy/JoTkT57tL3Pr1+skgOMy2aiUXmkL8yHDM0C75duwFmIZ44ZZ1QPn/CoUcXUfbXGXygKC8vmMyO9QfPbvzrHHnBEau/6cfE2dsQcCPGB6MJVeGNrpZ48UntgEqC2C0AjQDhh5wiRI7e36sOY/f1mqtiXV7c= Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2589.namprd10.prod.outlook.com (2603:10b6:805:4e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.20; Sun, 11 Apr 2021 18:29:06 +0000 Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.4020.022; Sun, 11 Apr 2021 18:29:06 +0000 From: Drew Adams To: Lars Ingebrigtsen , Felician Nemeth Subject: RE: [External] : bug#47215: 28.0.50; Let M-x switch between M-x and M-X Thread-Topic: [External] : bug#47215: 28.0.50; Let M-x switch between M-x and M-X Thread-Index: AQHXLvlPJ/3wEA0odk2oakRBgjOOmKqvmMIQ Date: Sun, 11 Apr 2021 18:29:05 +0000 Message-ID: References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> <87r1ji3twe.fsf@betli.tmit.bme.hu> <87k0p8206f.fsf@gnus.org> In-Reply-To: <87k0p8206f.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnus.org; dkim=none (message not signed) header.d=none;gnus.org; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 57b5a3b4-05b2-4494-2033-08d8fd17b084 x-ms-traffictypediagnostic: SN6PR10MB2589: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: etorod9n10M5amYGt8zOJvHZP9RWFf52tJRjU9VpxughjdY9vuzDVBXxPGHdgGJYm2FQ4zhj0LGAT1BDRIzu/uvJ6DnkhFx2JJzla4WjV27pwYBpdHNG/5+QU7s3bj88QEi5o8MjiBcx6jAoP+9z+SlGXzDepYPb1XXQ2AIL8w2Wj0PebyKFssb21+3yXqJpVsIB0BNVizeqXfmDvAznwxuv0Fl3yCAb47GNmGg7iDCYFB2aGty/3NWPCNDoOqYahvANEykIHc260bWaSp8HFRDw4WDYuKHxkBdY7QizFb2+Y6Wpftl5RVxtViFRUJG/OdQvBeqV5mEypbM0+mPZeSWRHmYgsl/dprUbjUL4IjWzgYITfGPamuqkrk0qzjAMYnHeuMYJcUQ0c/W34ATPnxVZSiFhWtF8lQ7y6lnCip1To2lEjgaJCt1buyMiiQt49Rq3KYk5Ykag+DxWAVwwy/iD4EOxgvsfpsyBuEKY6VmGrIfCAdrlrpbe9YHFfQehW+v+UtUb0WOJ+5ZcpZ6mRSDLdPUlq0LxotuVE6rBT41mpKwTazUCNmCl+ooURZoqiDTl+/C0f5307m0/YXHFAgnoklifAF+HxaHFGmOFFj4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(396003)(136003)(346002)(366004)(376002)(8676002)(4326008)(8936002)(186003)(66556008)(66946007)(38100700002)(66476007)(64756008)(55016002)(6506007)(26005)(316002)(33656002)(2906002)(66446008)(9686003)(52536014)(478600001)(7696005)(71200400001)(76116006)(110136005)(44832011)(5660300002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ezsSI7U4zX4sxFIwm9yg42lM8+frm9wgKIhW8WbUYiv2fRJ9BxaPWe7Yuly7?= =?us-ascii?Q?0lv7KCOUp6iY7EaSPxBRhdV6W/D/Udw0uBi/CxR74KIPJmVaRFQ0/LmLVfKd?= =?us-ascii?Q?FF+rdsvkdvPlkSQEmL1Kh97SZ5f9qOBtc/rlW8fLXG7S7nf08YN6tHUwjryP?= =?us-ascii?Q?VMVxkEF+OkK8gJ3zbrxTyIC3HPuYW0otTYlaLrZE/LSS+UhQ8cum0plwyaRl?= =?us-ascii?Q?jC5eapuddzSl7m7yY8YXC64RAScEQmgNBJNfnbSD5RY6E85Sst4Cz9wAoPFb?= =?us-ascii?Q?AMBig/MzM12aDxKItwDQoBoby+WKb/vU8Zyq65OAwyTtfN+2v7GDtBTvj5dD?= =?us-ascii?Q?1lfZk8ceBPb1nkUi1KGyT0XWLaxKC00sPzm58yk5+q7nl8nAFFJ1cKhn0iAJ?= =?us-ascii?Q?I8P2+yzkltElJvRkjF8gDL7PgjIaFLXUFqNkCajB6A2XPU6Ydb6gv1t30KQH?= =?us-ascii?Q?2CJmqlMDulBStXFAa2W8lnU+wubx7SzVPoijYqFBoyhAKEIQdlmVlC2SV1nV?= =?us-ascii?Q?BUF6QKnxQZQK77THH6gSWji+jfn+PFOucdEhZTJFhtutKWPjYqtOOj2YShoV?= =?us-ascii?Q?rqNkIZeONLmmDVcHro4t84llbuya1UtHlOCVQHoNxhMebjbPVG3uGcxbBHs1?= =?us-ascii?Q?UjSevklvSvPDo/THOrXQZ04KExu8Lkncd6ZkBssEvCQnpayMSzV8Ms1LYa7U?= =?us-ascii?Q?wgbUP6oLxWXA7FssyDHoRzqg27CfI+eZ7Jg8II9mqP1RJsuy+nYTN8LGdCM3?= =?us-ascii?Q?0PrqXb0FxsnQLGCveE5GCqXT7//XRqffQuGxl4+50QKt5rENOECacU83ykhy?= =?us-ascii?Q?0nE7n2ajTHIUuX3atHq9T+VtGdUNEVcKXJTktTt4pISgOGtTHHmWyqVa9h1Z?= =?us-ascii?Q?OFM74MeonD4vUZQ3PBMIssBVQYkY4QIXgubzA/L3Of0ulBLiiwcCqKs0D+lY?= =?us-ascii?Q?ySwe5pdZKs3MKBYkwC36x65YznbG+I+iuUrgZadRwiWoeLZwXi03rU0o473T?= =?us-ascii?Q?XCsIIT7XnpgFq3BUsdwQWNgACSIED4ITrI97G4hgHyXtnZMnV1u0xlrhzmcp?= =?us-ascii?Q?1MPvl20tFu8KMgD0/KEoYN+FLt1czIxznD2H8pSSBtUTSeV4OnPwZEc1vPca?= =?us-ascii?Q?srq/neIMedT6y7unVJDoOW53wyOGShFaGcGDVytfWVkK0jbL8fxDzrDgRfXH?= =?us-ascii?Q?TdA1xuWHoV3ztBLRL/iM7KMtvva6GPTR/WXH/wgwuueCWS6p2Gu4ZpqlQRrw?= =?us-ascii?Q?OFadle0pMXVp0LwJA2Up8fTyrixwaum3BAn5LG8euG1T2bueBNqPwQ8oW/Fh?= =?us-ascii?Q?APs=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57b5a3b4-05b2-4494-2033-08d8fd17b084 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2021 18:29:05.9613 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KbkAGs0TubAG/Axxh1SnlfmzPmEOJz4PKS7HuNRWANEY1N8vUTfIptWOK+ISG2mF4IO4C/V8WHtsYJlWDh5xZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2589 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9951 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104110144 X-Proofpoint-GUID: NF9h8KYvUEP-6t0W_0Rk7cxlHE0HQgob X-Proofpoint-ORIG-GUID: NF9h8KYvUEP-6t0W_0Rk7cxlHE0HQgob X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9951 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 priorityscore=1501 clxscore=1011 adultscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104110144 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47215 Cc: "47215@debbugs.gnu.org" <47215@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > Finally, the docstring says initial-input is deprecated. >=20 > I think this use case demonstrates that perhaps we should slightly > un-deprecate initial-input -- instead of deprecating it, we could > instead just discourage the usage. It never should have been deprecated - quite unwise. Arguments against deprecation went unheeded/ignored. ___ The Icicles doc for `completing-read' has always said: If INITIAL-INPUT is non-nil, insert it in the minibuffer initially, with point positioned at the end. If it is (STRING . POSITION), the initial input is STRING, but point is placed at zero-indexed position POSITION in STRING. (This is different from `read-from-minibuffer' and related functions, which use one-indexing for POSITION.) INITIAL-INPUT is considered deprecated by vanilla Emacs, but not by Icicles. If INITIAL-INPUT is nil and DEF is non-nil, the user can use `next-history-element' to yank DEF into the minibuffer. ___ As for your `M-x' changes and the addition of `M-X': they too aren't positive, IMO, but I'll leave it to time and others for that to be realized. (I already mentioned better approaches in the "Smarter M-x" thread.) From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 14:18:13 2022 Received: (at 47215) by debbugs.gnu.org; 24 Jun 2022 18:18:13 +0000 Received: from localhost ([127.0.0.1]:43484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nsj-0005w1-7z for submit@debbugs.gnu.org; Fri, 24 Jun 2022 14:18:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nsh-0005vk-KU for 47215@debbugs.gnu.org; Fri, 24 Jun 2022 14:18:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=WPgtuqxrFv3Y9+FPvRn92jHTpj3L0VHn0MeDldwWjzU=; b=grx3syPZymIMAwgq1vMrjRhPZ3 0RajtlvHraramewosxY3ELILtm18TX0zo9h4WNyYTFqJqPqTQgU9hq5yM98q2mmh1YcgYcaXhvn2N tqKFfLKRjAgQZ6OKAP1dqlMe5e/oTwbYrtCpT7Wbold8DsVbjux2k7N69ZSKxqwjMCDQ=; Received: from [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 1o4nsY-0003N7-3K; Fri, 24 Jun 2022 20:18:05 +0200 From: Lars Ingebrigtsen To: Felician Nemeth Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> <87r1ji3twe.fsf@betli.tmit.bme.hu> X-Now-Playing: Rocketnumbernine's _Meyouweyou_: "Black And Blue" Date: Fri, 24 Jun 2022 20:18:01 +0200 In-Reply-To: <87r1ji3twe.fsf@betli.tmit.bme.hu> (Felician Nemeth's message of "Sat, 10 Apr 2021 19:56:49 +0200") Message-ID: <875ykqncx2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Felician Nemeth writes: > I've discovered that the initial-input argument of `completing-read` can > be written as (STRING . POSITION). The attached patch makes use of it > and shows a simple implementation of my original wi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Felician Nemeth writes: > I've discovered that the initial-input argument of `completing-read` can > be written as (STRING . POSITION). The attached patch makes use of it > and shows a simple implementation of my original wish. > > However, the patch creates code duplication. Also, I don't know how it > copes with recursive editing: maybe it's not a good idea to rebind M-x > when `enable-recursive-minibuffers' is t. Finally, the docstring says > initial-input is deprecated. I've now reworked your patch (a lot =F0=9F=98=80) to avoid the duplication = and moved the cycling command to 'M-X' to avoid disruption. But perhaps a different key might also make sense... --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 14:18:18 2022 Received: (at control) by debbugs.gnu.org; 24 Jun 2022 18:18:18 +0000 Received: from localhost ([127.0.0.1]:43487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nso-0005wM-FU for submit@debbugs.gnu.org; Fri, 24 Jun 2022 14:18:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nsn-0005vu-7L for control@debbugs.gnu.org; Fri, 24 Jun 2022 14:18:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yA9m7OtXw2NCZ1kVdNC4ooz2NU90itWSAzoiVAA2tAc=; b=XfjNC2fIBOjRqsrOD6QQ8ko6EZ VKxRKTqZEZKmEebVWB6fNI+Ow8uFLzh1+GL4LxIvvmmAbk9rmATW1OiZ/13R0Qd4hWGmpNEC0r8Oe PnpztClgKbkZN/NEcnVfWNviGrKVsgjm4A3s6YelpA8oJbbQqtiNAaa6crJvxPdWgE0k=; Received: from [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 1o4nsf-0003NX-Br for control@debbugs.gnu.org; Fri, 24 Jun 2022 20:18:11 +0200 Date: Fri, 24 Jun 2022 20:18:08 +0200 Message-Id: <874k0ancwv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47215 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 47215 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 47215 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 14:56:47 2022 Received: (at 47215) by debbugs.gnu.org; 24 Jun 2022 18:56:47 +0000 Received: from localhost ([127.0.0.1]:43563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4oU3-0002vn-6Q for submit@debbugs.gnu.org; Fri, 24 Jun 2022 14:56:47 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4oU0-0002vV-CN for 47215@debbugs.gnu.org; Fri, 24 Jun 2022 14:56:45 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id C41A2240005; Fri, 24 Jun 2022 18:56:35 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X Organization: LINKOV.NET References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> <87r1ji3twe.fsf@betli.tmit.bme.hu> <875ykqncx2.fsf@gnus.org> Date: Fri, 24 Jun 2022 21:55:07 +0300 In-Reply-To: <875ykqncx2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 24 Jun 2022 20:18:01 +0200") Message-ID: <86mte1lwms.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org, Felician Nemeth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I've discovered that the initial-input argument of `completing-read` can >> be written as (STRING . POSITION). The attached patch makes use of it >> and shows a simple implementation of my original wish. >> >> However, the patch creates code duplication. Also, I don't know how it >> copes with recursive editing: maybe it's not a good idea to rebind M-x >> when `enable-recursive-minibuffers' is t. Finally, the docstring says >> initial-input is deprecated. > > I've now reworked your patch (a lot 😀) to avoid the duplication and > moved the cycling command to 'M-X' to avoid disruption. But perhaps a > different key might also make sense... Are you sure nobody might want to see a list of minibuffer commands? I don't use this, but can imagine someone typing `M-x M-X TAB' to list all minibuffer commands: 22 possible completions: abort-minibuffers abort-recursive-edit (C-]) context-menu-open () exit-minibuffer file-cache-minibuffer-complete isearch-backward (C-r) isearch-forward (C-s) minibuffer-beginning-of-buffer minibuffer-choose-completion minibuffer-complete minibuffer-complete-and-exit minibuffer-complete-word minibuffer-completion-help minibuffer-next-completion minibuffer-previous-completion next-history-element next-line-or-history-element next-matching-history-element previous-history-element previous-line-or-history-element previous-matching-history-element switch-to-completions Or maybe there exists another way to do the same? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 24 15:00:21 2022 Received: (at 47215) by debbugs.gnu.org; 24 Jun 2022 19:00:21 +0000 Received: from localhost ([127.0.0.1]:43567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4oXU-0003LT-M1 for submit@debbugs.gnu.org; Fri, 24 Jun 2022 15:00:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:36548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4oXS-0003D1-UY for 47215@debbugs.gnu.org; Fri, 24 Jun 2022 15:00:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=Nmle2xbKcS/c6cM5Yxol5uVx0MLn2y5NiU9gs7P2sDE=; b=tms0xOJtmzP4m7AGPRGZ7ulfuT A6FBV5EZ74LMRnYDE26jdFt4OY9iB5hy2bOot/pBqp1tkQsE+d3F9j5DFMNEpYmFKBX0PiSsHbLZ5 nZq70cXsdeHeKHKwUYjbedYlXKHlobXE9eNt79M3m6a+EjnRZ/JPpezoxf/wdZ5aeHYk=; Received: from [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 1o4oXJ-0004uk-Aw; Fri, 24 Jun 2022 21:00:11 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X References: <87tup91x6b.fsf@betli.tmit.bme.hu> <87tup9t5f6.fsf@gnus.org> <87k0pi546i.fsf@betli.tmit.bme.hu> <87czv9g74a.fsf@gnus.org> <87r1ji3twe.fsf@betli.tmit.bme.hu> <875ykqncx2.fsf@gnus.org> <86mte1lwms.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWEkGrDzLe2R0// ///l4gB3AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YGGBI7K5mIuYkAAAGZSURBVCjPTdHBattAEAbg f4eoNDopIOXQU2wopPsUakGH+iQbjah8C0TC9lOkJi1Bp9bYpvikmNqs5yk7K9eQPc2nnZ1dzSBI cV5WHAKSy5pB49NuXh6OVfUNVJW85e2xnm/+eDRb3h2b6rQDcdmUHpv/4Hp3rJmnCq4f6t2hmU4X oGZ+KX3ypQURnfq7Aw9AkKRnaIaYsnuDXJ4QMDMMa2S7HnmiyK3oRy8PEtBmzJwWojmCd+vE5ymS EWjNCRc8dDAlKFKMeea0EijPEi0ws8YjzZJyzSN73aO4LfaDqX3x+B7fRiKrdnnGZCXyod3HFvSj KIYitO+W+ivPeT60He2d+wijwP0dxEkAc6X4hEjcnQFiBQj3djAA3eSTfgj2/SvoN08Qdght23mk CB1CaQ++o9DI90+RjeF3FE+KGz3ttI3yF9eZ6XcU2sU4u0DfFmuPddA6bUEQpbL86Qwv/OgrXrzQ K/PI4yt/+QVFn/a5QATtxkIsgocUUSgbhe7UwKrtoWceFQDnoccVSEdWwFczzx4m1Ze6f0EXt1tH VGuIAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA2LTI0VDE4OjU5OjQzKzAwOjAwQPHZ1QAAACV0 RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNi0yNFQxODo1OTo0MyswMDowMDGsYWkAAAAASUVORK5CYII= X-Now-Playing: Was (Not Was)'s _Mutant Disco Volume 2_: "Out Come The Freaks (Remix Version)" Date: Fri, 24 Jun 2022 21:00:07 +0200 In-Reply-To: <86mte1lwms.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 24 Jun 2022 21:55:07 +0300") Message-ID: <878rplnayw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> I've now reworked your patch (a lot 😀) to avoid the duplication and >> moved the cycling command to 'M-X' to avoid disruption. But perhaps a >> different key might also make sense... > > Are you [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 47215 Cc: 47215@debbugs.gnu.org, Felician Nemeth X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: >> I've now reworked your patch (a lot =F0=9F=98=80) to avoid the duplicati= on and >> moved the cycling command to 'M-X' to avoid disruption. But perhaps a >> different key might also make sense... > > Are you sure nobody might want to see a list of minibuffer commands? > I don't use this, but can imagine someone typing `M-x M-X TAB' to list > all minibuffer commands: Suggestions for a different key binding welcome. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Fri Aug 15 18:53:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Jul 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator