Hot answers tagged

12

When you run a process inside Emacs, that process is "inferior" (i.e. a subprocess). IELM M-x ielm is the builtin Inferior Emacs Lisp Mode. It's relatively featureless, but can definitely come in handy. (Esp. for learning Elisp) SLIME, the Superior Lisp Interaction Mode for Emacs, is mostly a joke on the whole "inferior" process name. SLIME is used ...


11

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 can trigger native completion." (let ((python-shell-completion-native-enable t) (python-shell-completion-native-output-timeout python-...


9

You are correct that ein at tkf's repository on github only works with versions of IPython prior to 2.x. With that said, however, if you use this version you will find that it works with IPython 2.x and Jupyter (i.e. IPython 3.0). Installing ein from MELPA or el-get will install the latest ein which works with the latest versions of IPython.


6

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 the following line like so: (def xx {:a "a" :b "b"}) ;; => #'ns-name.playground/xx (:a xx) ;; => "a" (:c xx "nothing") ;; => "nothing"


5

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-only is described for eshell afterwards for comint-based modes. eshell The following lisp snippet demonstrates the usage of eshell-output-filter-functions ...


5

There is a way! The problem with using term is that term doesn't understand some of the escape sequences Julia sends, which causes term to put a bunch of extra prompts on the screen that make it unusable. This method should also work for more or less any REPL or terminal application you could want to run. There is a ridiculously useful terminal application ...


5

At a guess, your path to the Scheme implementation may be incorrect. Why do you think you need a backslash there? What do you want to quote/escape with it? Now, go to *scratch* buffer and evaluate your path. You will see that it may be a bit surprising: "C:/Program Files\ (x86)/Chicken Scheme/bin/csi.exe" ⇒ "C:/Program Files(x86)/Chicken Scheme/bin/csi....


5

I think geiser-mode may provide what you are looking for at least for guile and racket, but apparently not MIT Scheme. I know that provides M-. to jump to symbol definition in environment, completion, and inline documentation help. Take a look at the introduction, and cheat sheet for a quick overveiw of features. Alternative, it does appear mit-scheme has ...


4

I think EIN's main value was to be able to connect arbitrary buffers to the ipython kernel that corresponds to the notebook, therefore enabling cooperation of multiple Emacs "objects". But since EIN's README only mentions ipython 0.12 and there hasn't been any activity for a while, it's highly likely that API changes make it currently unusable.


4

On my system (Fedora 20) the default cabal version that comes with the haskell-platform package is 1.16.0.2. After installing the latest cabal-install (cabal install cabal-install), I have a new cabal binary in ~/.cabal/bin/cabal. If I don't do any particular configuration in Emacs, haskell-interactive-bring will fail with the same error you report. When ...


4

Every major mode that supports font-lock does so via font-lock-defaults. If you check python-mode, you'll see the following: (set (make-local-variable 'font-lock-defaults) '(python-font-lock-keywords nil nil nil nil)) If you're in a different major mode, you should be able to set font-lock-defaults to (python-font-lock-keywords nil nil nil nil) either ...


4

What you are looking for is called comint-mode - the system which underlies most (all?) emacs interaction modes (lisp, scheme, shell, python, &c). Here are some starting points: Comint: Writing your own Command Interpreter Comint Mode


4

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 'frames' are described on https://www.gnu.org/software/emacs/manual/html_node/elisp/Windows-and-Frames.html and (more from the user's perspective) on https://www....


3

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 ImportError: No module named readline indicates it's missing. It can be installed with pip install gnureadline. When it's correctly installed, the above code should ...


3

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: SP+: idris-set-idris-load-packages + RET contrib + RET CTR + RET


3

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-stats on $endif


3

Do you have clojure mode installed? Try M-x install-package clojure-mode if not and then run cider-jack-in.


2

You can achieve this by adjusting the value of display-buffer-alist: (setq display-buffer-alist (quote (("\\*inferior-lisp\\*" display-buffer-pop-up-frame (nil))))) This setting tells Emacs that a buffer with the name matching the regular expression "\*inferior-lisp\*" should be displayed in a new (pop-up) frame. (You can also customize ...


2

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 active region or the buffer to the Python shell. If there is an active region, send that. Otherwise, send the whole buffer.


2

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 familiar with REPLs, but maybe this can help. I use the following to switch to emacs bindings when using org-brain. Replace 'org-brain-visualize with the mode you use ...


2

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 expressions with edebug-eval-expression: (defun my/ielm-edebug-eval-input (orig-func input-string &rest args) "Wrapper function for evaluating expressions ...


2

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 directory from python's sys.path (PYTHONPATH) when ran, meaning the path for python includes '', the current working directory. This is not a problem unless you ...


2

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, bound to C-M-a, instead.


2

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 is bound to slime-repl-previous-prompt. Here is an excerpt from the description: REPL mode defined in ‘slime-repl.el’: Major mode for interacting with a ...


2

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 relevant function(s). That's how I found this. The doc string of slime-repl-newline-and-indent says: Insert a newline, then indent the next line. Restrict the ...


2

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 about it. Programs that require more sophisticated control of the terminal will not work properly under these conditions. I don't have access to jshell locally, ...


1

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: ("contrib") -- End: Sure enough, this caused it to work after closing and re-opening Spacemacs, without going back through the steps. It's a bit of noise added to ...


1

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/manage.py" "shell_plus")) Elaboration Being the package's maintainer, Andreas Röhler's answer is of course entirely correct and based on the project's README. I ...


1

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 support ;; (require 'python) ; if not done elsewhere (require 'eval-in-repl-python) (add-hook 'python-mode-hook '(lambda () (local-set-key (kbd "<C-...


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