Saving Window Configurations in Emacs - emacs

I'm wondering if there's a way to save window configurations across emacs sessions. I know desktop-save is fantastic for preserving buffers and whatnot and the emacs manual demonstrates storing a window configuration into a register but this doesn't persist across sessions.
Of course this doesn't seem like it would be too hard to implement myself...

EmacsWiki is a great resource: EmacsWiki: Session Management
Looks like Windows Mode, or more specifically revive.el, is what you want.

A lot has changed since 2008, and desktop-save-mode now also restores frames across sessions. Emacs 24.4 and higher.

Related

How to use Emacs as multiple IDEs with EVIL running in them all

Im just starting to look into Emacs as a IDE. There are lots of articles about how to setup Emacs as an IDE for languages XYZ. Most of these articles talk about how to switch content in your emacs.d. However this would only work if you use Emacs for one language?
Say for example I want to use Emacs with Clojue, Javascript and Python. For Clojure i want to use LiveMode and for Javascript i want to use some other mode and the same for Python. All highly specialized with a background repl running. How would I go about setting emacs up for this and what if I would like to use for example EVIL mode on all the IDE:s? Would it be possible to switch IDE setup at runtime depending on file ending or do i have to restart Emacs loading different settings each time?
Emacs allows to use so-called modes with files, e.g. python-mode for Python files etc. Automated enabling of modes for a specific file is either happening through file-local special variables or via associations of file-types via auto-mode-alist.
Modes actually provide these "special" settings you are talking about. If you want to add a special additional behavior in some mode, you typically add the required setup functions in the so-called mode-hook.
It might happen you run into incompatibilities between various extensions or modes, but this is a pretty rare case.

saving perspectives when an emacs session is saved

I have been using perspectives package in emacs (from Nathan Weizenbaum, https://github.com/nex3/perspective-el). I save my emacs session on exit so that it saves the existing buffers and loads them up on next start. The line added in .emacs file to achieve this is : (desktop-save-mode 1). But it doesn't save perspectives, so that all the saved buffers open under a single perspective, when emacs is started. Is there any implementation that will achieve the saving of perspectives between emacs sessions?
desktop-save-mode is provided by package desktop which comes with emacs, it is not provided by perspective.el. Desktop mode can save and restore your buffers (with emacs 24.4 it can also save your windows and frames) but does not provide 'named window configurations'. Perhaps you can use bookmarks+ for this as #Drew suggests but I have never tried it.
The package perspectives does not provide a way save and load perspectives. See this issue. As an alternative I would like to suggest you the package workgroups2, it similar to perpective.el (it calls perspectives workgroups) and provides that feature you want.
This might be an alternative for you, depending on what you are looking for:
Starting with Emacs 24.4 (which will be released soon, and for which development snapshots are available), when you save an Emacs desktop (see desktop-save-mode and Bookmark+ desktop bookmarks), you can optionally save frame, window, and buffer states. Restoring a desktop then restores these as well (as far as possible).

Save Frames for future sessions

Is there a way to save frames and their relative positions in emacs?
I know that we could save windows using desktop.el ... this works fine
but I also want to save the frames.
I have tried various options including frame-restore.el and desktopaid.el but they don't seem to work with various errors. Either they do not byte compile or give other errors.
Does some have nice clean way to save frames + desktop sessions in emacs?
Thanks!
Pawan
Emacs 24.4 (which is not yet released) extends the Desktop feature of saving and restoring desktops (Emacs session state), to include frames and their positions, buffers (sometimes), etc.
You can obtain MS Windows executable builds of the development version of Emacs (what will become 24.4) here.
If you have an Emacs build that supports this, consult the Emacs manual, node Saving Emacs Sessions for more information.

Emacs shortcuts for IDEA IDE?

I'm just switching from Emacs to IDEA and it would be a great help to me if I could use shortcuts like Ctrl-A for jump-to-line-start. etc.
Is this possible?
Go to Settings -> IDE Settings -> Keymap and you will have all the keymappsing.
One of the Keymaps you can select from is Emacs.
A note from a long time Emacs and IDEA user - Emacs bindings in IDEA are simply mission impossible. Arthur is perfectly correct about how to enable them, but they will seriously tamper with your IDEA workflow since they tend to override a lot of default IDEA keybindings and in the end you have to come up with completely custom keymap. This is not a problem the first time - but when you have to work on some coworkers machines, or on other computers it becomes extremely annoying. I used to hold my keymap in Subversion.
So basically don't use the default Emacs keybinding in IDEA - copy the basic setup and extend it personally. The IDEA server might be helpful to keep several computers in sync with the same keybindings.
Also keep in mind that only basic navigational commands are supported in IDEA and some helpful IDEA actions may wind up without keybindings by default so pay extra attention how you configure your IDEA.
For me there is only like place like Emacs - and that's Emacs. I have yet to see some software that provides sensible settings using Emacs keybindings.
There's a useful article on this topic here.
The gist of what it says is
You can tweak keybindings, but it's a bandaid at best, lost cause really
You can do better by LivePlugin Scripting with Groovy
You can create an escape hatch to emacs using emacsclient

What are the compelling reasons to upgrade to emacs 23.1?

I saw the the news that emacs 23.1 was released.
For a programmer, What are the big reasons to upgrade? I'm currently on 22.2.
None of the features listed really seem like must-haves for me. The most immediately interesting bit is that nXML is now integrated. I already have it though.
But I have to admit I don't know what is really behind "smarter minibuffer completion" or "per buffer text scaling".
Anyone have any tips or examples of what these things are?
For me, the biggest reason is the support for anti-aliased fonts. And the --daemon support is nice.
Emacs-fu has a nice write-up of some of the features.
M-x butterfly
No one said anything about multi-tty support? I have one long (LONG!) emacs session opened somewhere, and I ssh'ed into that machine remotely and use that particular emacs session (with all the temporary buffers, everything setup the way I liked, groups of buffers opened, etc.). The benefit of course, is that I don't need to worry about saving temporary buffers (you do use those as scratch pad, don't you?), etc. when switching machines (from school to home, for example).
Also, with multi-tty support, you can open emacs with emacsclient -nw to substitute your occasional needs for vi for quick terminal edits. emacsclient -nw will open even faster than vi, and you will have access to your opened emacs session as a bonus. (Before emacs 23, emacsclient cannot run from the terminal).
"Improved Unicode support (the internal character representation is now based on UTF-8)."
is a critical reason for me, but it no doubt depends on your work flow.
Some of the terms you are asking about were discussed in Set Emacs defaut font face per-buffer/mode and are also in the emacs wiki, e.g. http://www.emacswiki.org/emacs/SetFonts (under Changing Font Size - Buffer Text Resizing ).
While I was using the pre-releases, the most noticeable feature has been the improved font support. and some small things about smarter window splitting.
for me its font support and gnupg integration.
also its nice to read pdf's from within emacs.