When I launch ipython in emacs, it rearranges all the windows. I find this annoying. Yet experimentation with my .emacs file yielded no solution. Where should I look? What should I suspect? What can I query?
With python-mode.el the behaviour is controlled by customizable variable py-split-window-on-execute.
For changes on the fly exist commands py-split-window-on-execute-off, py-split-window-on-execute-on
Related
Background Information
I am using Spacemacs as my default configuration. I am running a JavaScript infinite loop inside my EShell using Node.js. In the regular terminal, I usually terminate it by using C-c. What should I do inside EShell?
I have read the section about shell mode and terminal emulator in the Emacs doc, but find no help and related command to terminate the process.
Question
How can I terminatr the process inside EShell-mode without restarting the editor? Although restarting the editor does solve the issue.
Even killing the buffer does not work. Oh dear, it is still running.
Solution
C-c C-c, eshell-interrupt-process.
Huge thanks to #tripleee.
The environment is Emacs 24.1.1 on Ubuntu. using Ipython for python programming.
The auto indent is works well when running ipython command on shell directly, but when i come to emacs run ipython there is no auto indent any more. and even worse when i type TAB it will prompt the Completion buffer.I also have searched this issue many times but still not found a practical method. as a result i have to enter space manually.
anyone could help to resolve this issue ?
1. auto indent on emacs ipython shell
2. disable completion on emacs ipython shell separately.keep the Tab-completion work when i am not in ipython interactive shell.
In emacs you can use python-mode, and from there send the code to *REPL* buffer with C-c C-c.
When you send the buffer for the first time, it asks you what executable you use for python, so you can use ipython, or other one.
Any invocation of ipython-shell should do a correct setup.
Please file a bug-report.
If running python-mode.el -- modeline shows "Py" --
please checkout current trunk first
When bazaar is available
bzr branch lp:python-mode
I can't figure out why this isn't easy to find on Google, but after searching for about 10 minutes, I just decided to give up and post here.
The subject basically says it all. I'm running MinTTY as a cygwin terminal on a Windows XP desktop. All I want to do is have emacs open up in a new window rather than inside my terminal. What would be best is a switch for this, so I could toggle it depending on my current needs. This seems like something that would be useful to a lot of people, and I know I've done it before on Linux boxes, so I imagine there must be a way to do this in cygwin too. Anyone know how?
Just start a new mintty, telling it to invoke emacs:
mintty emacs
There are a couple of scenarios that you might clarify:
Running the cygwin version of emacs within a standard windows environment will call emacs within the current shell
If the Cygwin X-Windows server (i.e., “XWin Server”) has been started and the DISPLAY environment variable has been set in the mintty terminal (e.g., export DISPLAY=":0"), calling emacs will start it in its own window.
running the Windows version of emacs within the cygwin terminal should launch the new frame you are seeking.
If you want a separate emacs 'window', you would be best served by installing the Windows native version of emacs (I use the gnu emacs precompiled binaries), and calling it from the cygwin terminal.
I use emacs as my editor-of-choice, and since I'm doing a lot of work in a terminal I always run emacs as
emacs -nw
so that it runs in the terminal instead of in a window.
I'd like to just run emacs and have it know that it should run in a terminal. My question is - how do I edit my .emacs file so that this is the default behavior?
You can't do this in the .emacs file. By the time that file is being parsed, the "chosen" emacs binary is already running.
You can install the emacs-nox package as one commenter suggests, or create an alias in your shell so that "emacs" is always treated as "emacs -nw".
Randy
I'm using a bash alias instead of .emacs to do that.
Add this line to your ~/.bashrc.
alias emacs='emacs -nw'
There is any easy way to solve the problem in general that has nothing to do with emacs at all and will work for any program that can choose between running in the console vs X:
unset DISPLAY
Of course you may not want to put that in your configuration file to be applied globally to all your shell sessions, so if you want it to apply to only emacs, then either call it from the command line like this:
DISPLAY= emacs
note the space!!! if you leave the space out it means you're setting the DISPLAY to emacs instead of setting DISPLAY to nothing... this command is a shorthand for:
DISPLAY=; emacs
So either use the above from the command line(s) or put that in a wrapper script that would look something like this:
#!/bin/bash
unset DISPLAY
exec emacs
I recommend the exec there because it will replace your wrapper script with emacs; to see the difference between the two you can run:
pstree -p
When I was first setting up a "emacs -nw" alias for emacs in windows I got stuck in a situation where I thought tototoshi's explanation hadn't worked. Yet all that was required was a restart of my terminal. Therefore, i think its worth mentioning that in windows (at least) if you are using emacs within the git bash terminal to create the .bashrc file and add "alias emacs='emacs -nw" to it (as tototoshi mentions) you have to close and reopen your terminal for it to work.
I am using Emacs Tramp for remote development. I think something must be wrong. I had some serious issues with speed when I used ssh:, so I switched to scp:. It seems to work much faster. I tried to run M-x compile with make and it seems to act differently than if I run make directly from a shell prompt. Namely, it is unable to find .h files. It compiles fine from a shell prompt.
Any ideas why this is happening?
Try using M-x tramp-compile explicitly. The keybindings for compilation are automatically remapped when you're editing a remote file with TRAMP, but M-x compile may be operating on the local copy of the files. ?