12
votes
Your ‘python-shell-interpreter’ doesn’t seem to support readline
If you don't want to get a 25.2 rc, you can apply the bug fix by adding this to your init.el file:
(with-eval-after-load 'python
(defun python-shell-completion-native-try ()
"Return non-nil if ...
7
votes
Accepted
Is it possible on Cider to eval on a repl and print as a comment every evaluation on a buffer?
Yes.
C-u C-x C-e eval-last-sexp-and-insert , evaluates the last sexp and inserts it at point.
or:
in the cider-eval menu : eval-last-sexp-and-pretty-print-comment
insert the output as a comment in ...
5
votes
Your ‘python-shell-interpreter’ doesn’t seem to support readline
I had this disturbing warning in Emacs 25.1 too.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24401 has proper solution to enable colored-stats only for Bash:
$ cat ~/.inputrc
$if Bash
set colored-...
4
votes
Accepted
Displaying a second buffer with a shell?
Is it correct to assume that you're new to Emacs? If yes, are you aware of how Emacs manages windows and that the term 'window' does not refer to what you think it does? The concepts 'windows' and '...
3
votes
ModuleNotFound for absolute imports in Emac's Python Repl
So it appears that emacs' built in python mode, at least as of 24.3, is now python.el rather than python-mode.el. This new version of python-mode for emacs does not, by default, remove the current ...
3
votes
Accepted
How to load an Idris file that depends on a package?
The layer for idris in Spacemacs use this https://github.com/idris-hackers/idris-mode.
So for my part, using spacemacs and helm, I succesfully load a file using contrib using the following shortcut:
...
3
votes
Accepted
Spacemacs trigger holy mode in major mode
By holy mode, do you mean the normal emacs mode?
If so, you can easily switch between the two with C-z.
EDIT. To automate this for a specific mode, try using evil-set-initial-state.
I'm not ...
3
votes
Accepted
No native completion with python3 in Emacs 25.2
The native completion mechanism depends on the gnureadline python module. You can check if it's present by executing
import readline
print(readline.__doc__)
at a python shell. The message
...
3
votes
Edebug REPL / IELM
The REPL interaction mode you are looking for is probably met by ielm (Inferior Emacs Lisp mode).
Here's the start of a solution†:
Open ielm-mode with M-x ielm.
Advise ielm-eval-input to wrap the ...
2
votes
Your ‘python-shell-interpreter’ doesn’t seem to support readline
I had this issue in Emacs 27 and Python 3.9, on Debian 11.
My workaround was to wrap my ~/.inputrc with $if term=dumb, $else, and $endif. This disables all my psql and python tricks when run inside ...
2
votes
Your ‘python-shell-interpreter’ doesn’t seem to support readline
A pip install readline did the job for me. Completion within python code blocks is pretty neat to have...
2
votes
How to get python-x (eval-in-repl) to work?
Elpy can do that https://github.com/jorgenschaefer/elpy
The command you are looking for would be elpy-shell-send-current-statement.
You can also try elpy-shell-send-region-or-buffer
Send the ...
2
votes
Accepted
Is there a way to automatically indent a parenthesis in Slime REPL after pressing `C-m o`?
C-j runs slime-repl-newline-and-indent which I think will work. Whenever I'm faced with an unfamiliar mode, I do C-h m which shows me mode information, including the keymaps: I can then zero in on the ...
2
votes
Accepted
How do I move the cursor to be just after the `>` character on the beggining of REPL evaluation?
The slime REPL buffer is is REPL mode. You can get information about the mode with C-h m. That is useful in that it shows you the keymap for the mode, and among other things, you will see that C-c C-p ...
2
votes
How do I move the cursor to be just after the `>` character on the beggining of REPL evaluation?
backward-sexp, bound to C-M-b by default`, would do it. Of course, if you’re nested inside several s–expressions then you would need to press it multiple times.
So perhaps you want beginning-of-defun, ...
2
votes
Accepted
Why jshell doesn't work in comint-mode?
Comint doesn't provide a fully-functional terminal replacement. It passes input from the user to the shell, and prints the output back to the screen. It can handle some escape sequences, but that's ...
2
votes
Accepted
How can I return/print all of my code's results with the code in Org-Mode?
Babel is not a REPL: it's more like a batch evaluation environment. If you want your PDF to look like the REPL, then cut and paste from the REPL into an EXAMPLE block. You can also try with :results ...
1
vote
How could I get ielm to evaluate a function at the last point I was in the previous buffer?
I can not find any hook that gets triggered before a buffer change. Therefore this solution updates a buffer-local last-buffer-position via the post-command-hook.
(defvar-local last-buffer-position ...
1
vote
How to let racket-mode handle language extensions (the #lang directive)?
This probably isn't a configuration issue but an issue with #lang datalog and how it interacts (or not) with racket-mode. There are some more detailed discussions about it here and here which could ...
1
vote
Accepted
Why does Slime have the two commands `C-down` and `M-n`?
You were close to figure it out, but you needed to dig a little bit deeper.
These commands are completely different beasts. I'll explain with an example, using slime-repl-previous-input (bound to M-p) ...
1
vote
Displaying a second buffer with a shell?
Absolutely. Turn on shell-script-mode/sh-mode in the scriptfile buffer, perhaps switch to zsh with C-c : for sh-set-shell (could change the first line of your script), and maybe mark some lines and ...
1
vote
How do I stop Prolog mode from jumping to the Prolog REPL when consulting the buffer?
Unfortunately, it seems that this behavior is hardcoded into prolog.el. The function responsible for moving to the REPL is prolog-goto-prolog-process-buffer. For the moment, I will be adding this hack ...
1
vote
Accepted
org-babel's matlab (session) output is malformed
The function org-babel-octave-evaluate-session is bugged. Fixed it with a rewrite. It should work correctly on Matlab input now. If anyone else has trouble with Matlab and org-babel interfacing in ...
1
vote
Accepted
In spacemacs, how do I copy code from the history in python REPL to my window which has a python source code file open?
In normal Emacs you can do that if you use Python REPL (command C-c C-l, see in menu) but there are somewhat mixed two commands on one line and not in order.
However, if you use iPython, there is ...
1
vote
Is there a way to connect to a REPL without comint?
There is start-process, which internally calls make-process.
start-process is a compiled Lisp function in ‘subr.el’.
(start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)
Start a program in a ...
1
vote
How to send buffer to a repl without showing it in prompt?
This example sends the command to the shell buffer, and displays the results but without displaying the command:
(let* ((buf (get-buffer "*shell*"))
(proc (get-buffer-process buf))
(...
1
vote
How to load an Idris file that depends on a package?
After trying @luc-duzan's answer, Spacemacs prompted me for whether to persist the setting. When I selected yes, the following was added to my buffer:
-- Local Variables:
-- idris-load-packages: ("...
1
vote
Python-Repl issues with TRAMP Mode [windows->Linux]
Ended solving this by directly sending to the Python buffer. Hope it helps
(setq tiqsi-python-buffer "*Python*")
(defun send-py-line ()
(interactive)
(let ((py-temp (thing-at-point 'line t)))
...
1
vote
Indentation in REPLs
A combination of changes in ielm and comint from Emacs 23 to 24 introduced what looks like a bug in determining the position of the start of a comint-derived line, which in turn affects whether ...
1
vote
Emacs EIN vs IPython shell
There is a new version of EIN that replaced the old one on MELPA.
On Emacs 25 and up, it works out of the box. Emacs 24 needs to upgrade, though, see https://github.com/millejoh/emacs-ipython-...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
repl × 58python × 13
slime × 6
spacemacs × 5
scheme × 5
shell × 4
org-babel × 3
indentation × 3
major-mode × 3
ipython × 3
comint × 3
cider × 3
ielm × 3
window × 2
hooks × 2
completion × 2
doom × 2
ide × 2
org-mode × 1
key-bindings × 1
org-export × 1
init-file × 1
buffers × 1
evil × 1
package × 1