Questions tagged [shell]
Questions relating to commands for passing single command lines to shell sub-processes, running a shell interactively with input and output to an Emacs buffer, and for running a shell in a terminal emulator window.
382 questions
0
votes
0
answers
41
views
Unicode commands in shell
I am using Emacs 31.0.50 in Windows. I have a shell command string which includes some unicode characters in its arguments. I can run this command in Windows command prompt without any problems. But I ...
1
vote
1
answer
49
views
How to set environment variables in vterm+screen terminal in Emacs?
Problem
I'm using Emacs with projectile and vterm for my development workflow. I've configured vterm to use screen as its shell:
(setq vterm-shell "screen")
I've created a function that ...
0
votes
1
answer
50
views
Running a command in an existing shell buffer
In Emacs, I want to compile a C++ file, then run it from a shell buffer. I can define a compile function to have: (compile (concat "g++ " buffer-file-name " -o a.out && ./a.out&...
0
votes
1
answer
95
views
Does Emacs support stripping comments in CLI mode?
While researching how to remove C and C++ style comments from a file, I stumbled on the following two comments by Alan Mackenzie from almost 20 years ago:
I can assure you, as half of the Emacs CC ...
1
vote
1
answer
64
views
Eshell cannot execute filesystem objects that are NTFS reparse points on Windows
None of the executables inside C:/Users/Me/AppData/Local/Microsoft/WindowsApps can be run from the command line under eshell.
The error I receive when trying to run any of these executables looks like:...
1
vote
2
answers
111
views
How to use emacsclient with emacs -nw, all from the same shell?
Just the other day I did
$ emacs -nw file1
Then later on I did ^Z to suspend it, and was back in the shell.
And then I wanted to do
$ emacsclient -n file2
and have file2 there, ready in emacs when I ...
0
votes
0
answers
131
views
Why doesn't Emacs read my .profile?
I was having trouble launching cargo with M-x compile, and IIUC this meant the compile didn't had cargo in its path. This meant process-environment didn't contain cargo, and this in turn meant it didn'...
0
votes
1
answer
98
views
freeze when calling any shell command
To recreate the problem:
Create an .bashrc_emacs file :
# -*- shell-script -*-
export PATH="$PATH":~/SYNCHRO/bin/ # put the path to where net.ip.private is
export BOOTTIME=$(sys.boottime)
...
1
vote
1
answer
88
views
Shell Errors in Emacs `M-x shell-command` but Not in Terminal
t I've hit a small snag that I'm hoping to get some insights on.
When I call a function or alias using M-x shell-command,
I encounter shell errors that don't appear when I run the same commands ...
0
votes
1
answer
92
views
Org-mode babel shell async evaluation not working with named sessions
I'm trying to use shell asynchronously with named sessions, but it doesn't work:
#+begin_src sh
echo "a"
#+end_src
#+RESULTS:
: a
#+begin_src sh :async
echo "a"
#+end_src
#+...
0
votes
0
answers
138
views
How can I interrupt/kill a shell command quickly?
Sometimes in a shell session (i.e. with M-x shell) a command will output a whole ton of output very quickly and I'll want to stop it with C-c C-c. In a normal terminal, this works just fine, but with ...
0
votes
1
answer
125
views
M-x shell launches shell and then hangs after running shell command
Working on source code in Emacs 28.2 on Mac, shell command M-! works as expected, and the command runs fine.
The command M-x shell successfully launches a shell window, but then after running a shell ...
0
votes
0
answers
92
views
Change escape characters of substitutions in dired-do-shell-command
I've recently found nushell and made it my default shell, and in many ways it's great, but the syntax does differ a bit from bash, and that causes substitutions to be wrong when I use dired-do-shell-...
1
vote
3
answers
370
views
If too lazy to type cd .... into M-x shell
I wish there was a hook, that every time I did
M-x shell
it would send "cd " . (pwd) . "\n" to an already running M-x shell,
and then switch windows to that shell.
That way I ...
1
vote
2
answers
67
views
Shell - send characters without a newline (or have unbuffered lines?)
I'm using a program that expects to be able to read a character from the terminal as soon as it's pressed - i.e. presumably sets the terminal options so it's unbuffered*.
I don't seem to be able to ...