[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 13:58:47 +0200 (CEST) |
I experience problem with read-from-minibuffer
(cmd-excl (read-from-minibuffer "exclude: "))
Symbol's function definition is void
From: lisa-asket@perso.be
To: Eli Zaretskii <eliz@gnu.org>;
help-gnu-emacs@gnu.org
Subject: Run terminal command with output in current buffer
Date: 16/07/2021 13:30:01 Europe/Paris
I have progressed as follows, with the intention that I can run the following
command
grep -hir --exclude=\*.el --include=\*.{org,texi} -C 8 "node-gnu-fdl" .
--------
(defun runcom ()
"docstring"
(interactive)
;; grep -hir --exclude=\*.el --include=\*.{org,texi} -C 8 "node-gnu-fdl" .
(cmd-excl (read-from-minibuffer "exclude: "))
(setq cmd-excl (concat " -C --exclude=\*." cmd-excl))
(cmd-incl (read-from-minibuffer "include: "))
(setq cmd-incl (concat " -C --include=\*." cmd-incl))
(cmd-cnum (read-from-minibuffer "cnum: "))
(setq cmd-cnum (concat " -C " cmd-cnum))
(cmd-ptrn (read-from-minibuffer "pattern: "))
(setq cmd (concat "grep -hir " cmd-excl cmd-incl cmd-cnum cmd-ptrn))
(shell-command cmd (current-buffer))
)
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Run terminal command with output in current buffer
Date: 16/07/2021 09:07:21 Europe/Paris
> From: lisa-asket@perso.be
> Date: Fri, 16 Jul 2021 08:43:27 +0200 (CEST)
>
> How can I run a terminal command and insert the output in the current buffer?
"C-u M-! the command RET"
See the doc string of M-! for details.
- Run terminal command with output in current buffer, lisa-asket, 2021/07/16
- Re: Run terminal command with output in current buffer, Jean-Christophe Helary, 2021/07/16
- Re: Run terminal command with output in current buffer, Eli Zaretskii, 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 <=
- 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, 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