Hot answers tagged

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 ...
npostavs's user avatar
  • 9,163
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 ...
manandearth's user avatar
  • 2,118
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-...
gavenkoa's user avatar
  • 3,422
5 votes
Accepted

How do I protect command output in eshell and REPL buffers?

Modes that communicate with external shells should inherit from comint mode. eshell is an exception w.r.t this principle since it emulates almost all commands on elisp-base. First, setting output read-...
Tobias's user avatar
  • 33.1k
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 '...
Stefan Kamphausen's user avatar
3 votes
Accepted

cider-jack-in: Symbol's function definition is void: clojure-project-dir

Do you have clojure mode installed? Try M-x install-package clojure-mode if not and then run cider-jack-in.
Chakkakuru's user avatar
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 ...
zaile's user avatar
  • 463
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: ...
Luc DUZAN's user avatar
  • 146
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 ...
EFLS's user avatar
  • 1,572
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 ...
npostavs's user avatar
  • 9,163
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 ...
ebpa's user avatar
  • 7,439
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 ...
bertfred's user avatar
  • 1,729
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 ...
twb's user avatar
  • 21
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 ...
NickD's user avatar
  • 29.3k
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 ...
NickD's user avatar
  • 29.3k
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, ...
db48x's user avatar
  • 17.7k
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 ...
Tyler's user avatar
  • 22.2k
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) ...
aadcg's user avatar
  • 1,248
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 ...
Karthik's user avatar
  • 31
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 ...
Ian's user avatar
  • 1,468
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 ...
Andreas Röhler's user avatar
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)) (...
user1238364's user avatar
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 ...
p_wiersig's user avatar
  • 1,071
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: ("...
Keith Pinson's user avatar
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))) ...
SerialDev's user avatar
  • 121
1 vote

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...
Red Pill's user avatar
  • 111
1 vote
Accepted

How set python shell arguments with python-mode.el?

TL;DR Sample configuration: (setq-default py-shell-name "python" ; \ Default value under Unices py-python-command "python" ; / py-python-command-args '("-i" "/absolute/path/to/...
Basil's user avatar
  • 12.3k
1 vote

How to get python-x (eval-in-repl) to work?

Install eval-in-repl from MELPA and configure it as described in the readme at https://github.com/kaz-yos/eval-in-repl/blob/master/README.md Current instructions from the readme suggest ;;; Python ...
Ista's user avatar
  • 1,178
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 ...
Basil's user avatar
  • 12.3k

Only top scored, non community-wiki answers of a minimum length are eligible