[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65318: 29.1.50; `comint-run' should read-string with specified histo
From: |
Juri Linkov |
Subject: |
bug#65318: 29.1.50; `comint-run' should read-string with specified history list |
Date: |
Sun, 20 Aug 2023 19:58:07 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> 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)))