[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminal command with output in current buffer
From: |
Felix Dietrich |
Subject: |
Re: terminal command with output in current buffer |
Date: |
Fri, 16 Jul 2021 21:35:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
lisa-asket@perso.be writes:
> Many thanks, I just did not follow what asynchronously meant.
Fair enough.
> Can one assign default values when `read-from-minibuffer` in empty?
“read-from-minibuffer” as well as the functions suggested by Stefan
Monnier (“read-number”, “read-string”, …) have a parameter DEFAULT or
DEFAULT-VALUE (or similar) that you may use for that purpose; read their
documentation.
You may also check the return value of “read-from-minibuffer” or
“read-string” and act accordingly:
(let ((read-result (read-from-minibuffer "Prompt: ")))
(if (seq-empty-p read-result)
(setq read-result "default-value")))
See also:
<https://www.gnu.org/software/emacs/manual/html_node/eintr/if.html>
--
Felix Dietrich
- Run terminal command with output in current buffer, (continued)
- Run terminal command with output in current buffer, lisa-asket, 2021/07/16
- Run terminal command with output in current buffer, lisa-asket, 2021/07/16
- Re: Run terminal command with output in current buffer, Felix Dietrich, 2021/07/16
- Re: Run terminal command with output in current buffer, Stefan Monnier, 2021/07/16
- Run terminal command with output in current buffer, lisa-asket, 2021/07/16
- Re: Run terminal command with output in current buffer, Felix Dietrich, 2021/07/16
- terminal command with output in current buffer, lisa-asket, 2021/07/16
- Re: terminal command with output in current buffer,
Felix Dietrich <=
- terminal command with output in current buffer, lisa-asket, 2021/07/16
- Re: terminal command with output in current buffer, Felix Dietrich, 2021/07/16
- terminal command with output in current buffer, lisa-asket, 2021/07/17
- terminal command with output in current buff, lisa-asket, 2021/07/17
- terminal command with output in current buff, lisa-asket, 2021/07/17
- Re: terminal command with output in current buff, Felix Dietrich, 2021/07/17
- Re: terminal command with output in current buffer, Emanuel Berg, 2021/07/18
- Re: terminal command with output in current buffer, Stefan Monnier, 2021/07/19
- Re: terminal command with output in current buffer, Emanuel Berg, 2021/07/19
- ‘read-string’ over ‘read-from-minibuffer’, Felix Dietrich, 2021/07/20