From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 15 16:16:04 2023 Received: (at submit) by debbugs.gnu.org; 15 Aug 2023 20:16:04 +0000 Received: from localhost ([127.0.0.1]:36733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0SR-0005CW-Qd for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:16:04 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0SP-0005Bj-Ou for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:16:02 -0400 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 1qW0SJ-0001Qr-4l for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 16:15:55 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qW0SG-0004sx-SW for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 16:15:54 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6bd045336c6so5168266a34.2 for ; Tue, 15 Aug 2023 13:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692130550; x=1692735350; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=790ovyi1FoufyPEbb+f+fxeksMLSGBcUqkvmt0bahWQ=; b=BAQ+uyehMDvwTEZLEbvumlIG/JZoRJxbpF+xvtLCOCDr8xt0g1f8zK0ZLcCzlHDUqZ OZCEuqIoXhe+SbVShydIl3Tcx0dQm7Y8uhq9VhIxbKKjJqXSANA7q69swUdMLkQKe24v w/+onE7FDp/ZMCdz4e8NdPIWJi/l2jw2WgOHXoHhODvd+ZNZ3t2NQkjbT+VHijdRnUJW 6ARWEDYJM6zyhCvajW/R61vlgrJgn7WWY/vw9eMvwwOY67ihw+pl6arUo4+2X1l0YFcG FaSmvvETeGUjKcBcP07kT0VUjGP59QCQEkGLU/Xw0yC232Pfjqvcg3hE9XSJJmEaLwTd d7ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692130550; x=1692735350; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=790ovyi1FoufyPEbb+f+fxeksMLSGBcUqkvmt0bahWQ=; b=AIfbolhmo9wGZXZBZip8016yMwntPygkyG0aJRrMWZqhyk/9FseEHH15vrWbvZMYlo O1jdiDcJgHmJ/U8aHCrI3N2HjvPp9NdBuA8PyFKSrK28zz5LIhCDPW+ZAsMa1DtqcMAZ 9XD+Dl9wor8PdXBDnyWEFLx86nrn7oWGXYfCcEs1RPiS/Jo6yk3rht40ffcP2F8UVTBF jjqMZNk84gJExlZHao+b+ZRDljYTmIaR7P4d1NscadqSbHn+/xLenWV3VZW8e5Xhp7CQ /pU/wJFbVKEq7yWAxiZRPCunKImdbcccjnXMB+SrAL1LtgUpZCsqSUhmzfATEX5G3kDB lBNw== X-Gm-Message-State: AOJu0Yxme5BOaYf/gXbKK0oywIraaMzL998v0sMi6STCwIKjk93iU6HE usfdm+vhdC/xLsKOrY0Amd9yFJJb9Fw= X-Google-Smtp-Source: AGHT+IH5PHxgs7BTLUYRZbM7tqXOLi+omO4ykXMKHdiGB6burW87TZEZR75W/vgBeJ4V0mBRg12i8Q== X-Received: by 2002:a05:6870:c222:b0:1bb:a891:47fc with SMTP id z34-20020a056870c22200b001bba89147fcmr13809289oae.8.1692130550130; Tue, 15 Aug 2023 13:15:50 -0700 (PDT) Received: from bonnet ([2804:14d:5cd2:9b28::c64a]) by smtp.gmail.com with ESMTPSA id e5-20020a056870a60500b001c4d00b18f6sm3905089oam.7.2023.08.15.13.15.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:15:49 -0700 (PDT) From: bruno cuconato X-Google-Original-From: bruno cuconato To: bug-gnu-emacs@gnu.org Subject: 29.1.50; `comint-run' should read-string with specified history list Date: Tue, 15 Aug 2023 17:15:41 -0300 Message-ID: <87zg2sm58y.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=bcclaro@gmail.com; helo=mail-ot1-x32f.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.0 (+) 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: -0.0 (/) 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.=C2=B9) 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. =C2=B9: An unrelated mini-bug: `read-string's docstring does not say what happens when the argument is nil, although maybe the manual might do so (I haven't checked). Obviously, one can simply check the C source. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 07:44:10 2023 Received: (at 65318) by debbugs.gnu.org; 16 Aug 2023 11:44:10 +0000 Received: from localhost ([127.0.0.1]:38970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWEwc-0004Oz-CN for submit@debbugs.gnu.org; Wed, 16 Aug 2023 07:44:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWEwa-0004Oj-VF for 65318@debbugs.gnu.org; Wed, 16 Aug 2023 07:44:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWEwV-0004PE-IU; Wed, 16 Aug 2023 07:44:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NOYMskseG6sBZJ3DToEYCPFkpgCP4qBpsR+i+XQzSYk=; b=fAtRb3oZVAempq5OdvnF dBQzpkc/xinwFmKXVBMDnWZvG5paMHVJkAuaRV1DrkXdaFIab4itOuKATWW0a/svcTT9K+P63Fzzq hwJRxbNVOY6d2cYqgzEMibkJkGb2bFfxPd5c+pmi7deCeQPa2bt11AkTFfPiPkXeNRsAxwMHq/QvC 5+8rd//Rm9E159aJsu4vGJbR8FdCQr1TuY+xTTii9Kg695kGJQ1wJLA69m3qAb6qIGowsUhiOWc/K pOn6Y5fwkilOpJdYFRUg0unyyT7QQMxpRnJXbnaLuAxzy8t4roikIkeugLck+mA8brkEoiHDF9ZbN pATyGQm2tgFMfw==; Date: Wed, 16 Aug 2023 14:44:08 +0300 Message-Id: <83sf8j8b5j.fsf@gnu.org> From: Eli Zaretskii To: bruno cuconato In-Reply-To: <87zg2sm58y.fsf@gmail.com> (message from bruno cuconato on Tue, 15 Aug 2023 17:15:41 -0300) Subject: Re: bug#65318: 29.1.50; `comint-run' should read-string with specified history list References: <87zg2sm58y.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65318 Cc: 65318@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 (---) > From: bruno cuconato > Date: Tue, 15 Aug 2023 17:15:41 -0300 > > > 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. Since the best solution is not clear, I think we should provide a user option that would name the history to use, and make it nil by default, to preserve the current behavior. Patches welcome. > ¹: An unrelated mini-bug: `read-string's docstring does not say what > happens when the argument is nil, although maybe the manual might do > so (I haven't checked). Obviously, one can simply check the C source. The doc string says to check the documentation of read-from-minibuffer for the details of HISTORY, and read-from-minibuffer says that if the argument is nil or omitted, it defaults to minibuffer-history. So I think we are okay in that department. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 20 13:27:56 2023 Received: (at 65318) by debbugs.gnu.org; 20 Aug 2023 17:27:56 +0000 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 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 Received: by mail.gandi.net (Postfix) with ESMTPSA id 53BC6C0002; Sun, 20 Aug 2023 17:27:45 +0000 (UTC) From: Juri Linkov To: bruno cuconato Subject: Re: bug#65318: 29.1.50; `comint-run' should read-string with specified history list In-Reply-To: <87zg2sm58y.fsf@gmail.com> (bruno cuconato's message of "Tue, 15 Aug 2023 17:15:41 -0300") Organization: LINKOV.NET References: <87zg2sm58y.fsf@gmail.com> Date: Sun, 20 Aug 2023 19:58:07 +0300 Message-ID: <867cpporeg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 65318 Cc: 65318@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.7 (-) > 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)))