Save Frames for future sessions - emacs

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.

Related

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).

How can I run a function periodically in a specific mode?

I am writing a report in LaTeX, and am using Emacs for development. Having to periodically compile manually is somewhat annoying. Is there a way to have Emacs automatically compile periodically whenever the current buffer is a LaTeX buffer?
flymake is built into Emacs, and is the classic way to do such things.
See its user-manual at: C-hig (flymake) RET
flycheck is a more recent project, with the stated aim of being "flymake done right".
Running arbitrary processes (e.g. compilation) periodically is what these libraries are all about, so either one of them suits your use-case.

Why use org-mobile-push/pull?

I have managed my todo-lists for some years with Emacs Org-mode and really like it.
The files are kept in a WebDAV folder on a server to keep them synced.
However, since I use more and more tablets and smartphones an app to access the files would be great - such as MobileOrg for Android.
But currently I do not understand why I have to use org-mobile-push and pull in emacs and cannot just parse and access my files with an app and edit them in a convenient way, especially when I am a few days not working with Emacs or at my Linux machine at all. Is there a reasonable explanation why the files can't be parsed and viewed without exporting them from Emacs?
MobileOrg needs to interact with Emacs through a directory on a server. The main reason for org-mobile.el to exist is for creating agenda views in a format that can be displayed by MobileOrg, and for integrating notes captured and changes made by MobileOrg back into your Emacs main system. That said, the functions org-mobile-push and org-mobile-pull are purely there to provide a sync mechanism between MobileOrg and your Emacs main system. There is nothing technically stopping you from doing your own parsing and editing the of the files. I suppose that you only have to ensure that the files remain valid Org-Mode file formats and they should work everywhere.

Is there a way to access Stata from eclipse?

… similar to the StatET plugin that allows you to run R code from Eclipse?
I tried googling it but nothing useful has turned up.
None that I know. If you're a CLI junky or willing to use Emacs, you might find limited support through the ESS package and the ado-mode. This is what I used on Mac OS X when I want to run short snippet of code, or use Stata in batch mode, but there's no interactive graphical output (you can just save graphics as PDF as usual). The ado-mode provides basic syntax highlighting and can send region or buffer to a running instance of Stata GUI program (not the executable file, stata-*, that is being used by ESS).
Here are two screenshots of (top) edition of code in Emacs with the ado-mode, and (bottom) an interactive Stata session (no plot produced).
Some notes on text editors for Stata users provides a list of text editors that can be used with Stata (without interactive facilities, though).
There seems to be a promising project starting up here:
http://mas802.wordpress.com/2011/09/06/stata-plugin-for-eclipse-alpha/

Saving Window Configurations in 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.