Domanda

After every Emacs startup in python-mode I need to open the interpreter in a different buffer and change the size of the new buffer that it fits emacs-code-browser's history. I want to automate this activity.

  • How can I automate that an interactive python shell always appears (after Emacs startup) in an extra buffer like in the screenshot?

UPDATE: See below: workgroups.el and emacs-code-browser seem to collide. See screenshot

Before Editing

before editing

After Editing

After editing

I use Emacs23, emacs-code-browser and python-mode.el.

UPDATE: I tried to use workgroups.el. I defined a new python workgroup and added the following line to my .emacs: (wg-load "~/.emacs.d/workgroups/python_workgroup.wg"). The windows are, however, messed up. You can see it on the screenshot below:

It think that emacs-code-browser and the settings of my workgroup collide. Is there a way to avoid this behavior? enter image description here

È stato utile?

Soluzione

also you may try desktop-save-mode:

desktop-save-mode is an interactive autoloaded Lisp function.

(desktop-save-mode &optional ARG)

Toggle desktop saving (Desktop Save mode). With a prefix argument ARG, enable Desktop Save mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

If Desktop Save mode is enabled, the state of Emacs is saved from one session to another. See variable desktop-save' and function desktop-read' for details.

Altri suggerimenti

How about using workgroups.el ?
It is used for saving your window configuration which is exactly what you need.

This way you can create a workgroup called for example Python, adjust buffers (including one containing interactive python shell) and everything and save the group, and next time you just open workgroup Python and all buffers open as they were before. If you want it to open automatically when emacs is started, just set your saved Python workgroup as a default workgroup.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top