From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#65318: 29.1.50; `comint-run' should read-string with specified history list Date: Sun, 20 Aug 2023 19:58:07 +0300 Organization: LINKOV.NET Message-ID: <867cpporeg.fsf@mail.linkov.net> References: <87zg2sm58y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 65318@debbugs.gnu.org To: bruno cuconato Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 20 19:28:37 2023 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 1qXmE7-00012G-6f for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Aug 2023 19:28:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXmDa-0005zH-Ke; Sun, 20 Aug 2023 13:28:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXmDZ-0005yu-6O for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 13:28:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qXmDY-0002c3-Ri for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 13:28:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXmDa-0004vb-Gx for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 13:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Aug 2023 17:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65318 X-GNU-PR-Package: emacs Original-Received: via spool by 65318-submit@debbugs.gnu.org id=B65318.169255247618912 (code B ref 65318); Sun, 20 Aug 2023 17:28:02 +0000 Original-Received: (at 65318) by debbugs.gnu.org; 20 Aug 2023 17:27:56 +0000 Original-Received: from localhost ([127.0.0.1]:54766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXmDU-0004us-9r for submit@debbugs.gnu.org; Sun, 20 Aug 2023 13:27:56 -0400 Original-Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:57161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXmDS-0004uL-AY for 65318@debbugs.gnu.org; Sun, 20 Aug 2023 13:27:54 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 53BC6C0002; Sun, 20 Aug 2023 17:27:45 +0000 (UTC) In-Reply-To: <87zg2sm58y.fsf@gmail.com> (bruno cuconato's message of "Tue, 15 Aug 2023 17:15:41 -0300") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268013 Archived-At: > Not really a bug, but a feature request. When I run `comint-run' I use > the history to find the switches I need, and often have to waddle > through a bunch of unrelated input. As I understand it, that is > because the interactive `read-string' call does not specify a history > list (and thus a global one is used, I assume.¹) I'm not sure what the > best solution is: do we want to add a history list just for the > switches, or do we want it to be shared with other commands (like > `shell-command'?), or would any change to the history list argument > break people's workflows? I for one would prefer the first option. Instead of adding new history variables with user options to every use of 'read-string' such as in 'comint-run': (read-string "Run program: ") and (read-string "Switches: "), maybe better to add a single common option with a mapping from a command and a prompt regexp to the history variable. Then you could customize it to e.g.: (setq read-history-variables '((comint-run "Run program" shell-command-history) (comint-run "Switches" my-switches-history)))