[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
terminal command with output in current buffer
From: |
lisa-asket |
Subject: |
terminal command with output in current buffer |
Date: |
Fri, 16 Jul 2021 21:48:03 +0200 (CEST) |
I am getting a small problem when using `(cmd-cnum (read-number "context: "))`
Wrong type argument: sequencep, 8
From: Felix Dietrich <felix.dietrich@sperrhaken.name>
To: help-gnu-emacs@gnu.org
Subject: Re: terminal command with output in current buffer
Date: 16/07/2021 21:35:05 Europe/Paris
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
- Re: 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, 2021/07/16
- terminal command with output in current buffer,
lisa-asket <=
- 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
Re: ‘read-string’ over ‘read-from-minibuffer’, Stefan Monnier, 2021/07/20