[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Run terminal command with output in current buffer
From: |
lisa-asket |
Subject: |
Run terminal command with output in current buffer |
Date: |
Fri, 16 Jul 2021 17:22:26 +0200 (CEST) |
Thanks, have put it in `let`.
From: Felix Dietrich <felix.dietrich@sperrhaken.name>
Subject: Re: Run terminal command with output in current buffer
Date: 16/07/2021 17:14:36 Europe/Paris
Cc: help-gnu-emacs@gnu.org
lisa-asket@perso.be writes:
> I experience problem with read-from-minibuffer
>
>
> (cmd-excl (read-from-minibuffer "exclude: "))
Assign values to variables by using “setq”. Values can be arbitrary
expressions:
(setq cmd-excl "value")
(setq cmd-excl (read-from-minibuffer "exclude: "))
If you write “(cmd-excl…” the lisp interpreter will try to call a
function “cmd-excl”.
You can declare local variables with “let”:
(let (cmd-excl cmd-incl)
(setq cmd-excl "value"))
Values can be declared and assigned to at the same time:
(let ((cmd-excl "value")
cmd-incl)
cmd-excl)
There is also “let*”:
(let ((cmd-excl "value")
(cmd-incl cmd-excl)) ; can access cmd-excl here already
; because of let*
cmd-incl)
--
Felix Dietrich
- Re: terminal command with output in current buffer, (continued)
- 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, Stefan Monnier, 2021/07/16
- 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, Emanuel Berg, 2021/07/18
- Re: Run terminal command with output in current buffer, Stefan Monnier, 2021/07/19
- Re: Run terminal command with output in current buffer, Emanuel Berg, 2021/07/19
- Run terminal command with output in current buffer,
lisa-asket <=
- Re: Run terminal command with output in current buffer, Felix Dietrich, 2021/07/16
Re: Run terminal command with output in current buffer, Emanuel Berg, 2021/07/16