-1

I'm using Emacs on Windows. I plan on making a shortcut to Emacs for quick access.

However, I have 3 files that should always be opened when I start emacs (ideally in 3 separate tabs), and I want that to happen I click on the shortcut.

I've installed elscreen to get a tab bar-like functionality, but I'm not quite sure how to automatically open those 3 files in separate tabs.

Anyone have an idea on how to achieve this?

wiuah
  • 409
  • 2
  • 11
  • If you want tab-bar like functionality, then do not use `elscreen`. Instead, use `tabbar.el`: http://emacs.stackexchange.com/questions/10081/browser-style-tabs-for-emacs `elscreen` is for preserving window layouts. Once you install and configure `tabbar.el`, all you need to do is have three (3) lines of code in your `.emacs` file using `find-file`: http://emacs.stackexchange.com/a/26985/2287 If you are interested in organizing buffers by frames, then see: http://stackoverflow.com/questions/18346785/how-to-intercept-a-file-before-it-opens-and-decide-which-frame and also `frame-bufs`. – lawlist Sep 21 '16 at 03:09
  • `elscreen`'s goal isn't to preserve window layouts, though [it's possible with another package](http://wikemacs.org/wiki/Elscreen#Persistent_screens_accross_sessions), it's more to have tabs, but when we want, not for every file. – Ehvince Sep 21 '16 at 13:20
  • @Ehvince -- The link to the Emacs wiki describes `elscreen` as "**elscreen is a GNU Emacs window session manager modeled after GNU screen by NaotoMorishima.**": https://www.emacswiki.org/emacs/EmacsLispScreenhttps://www.emacswiki.org/emacs/EmacsLispScreen I have `elscreen` installed, and can confirm that it is most definitely designed to manage window layouts within Emacs. – lawlist Sep 21 '16 at 14:23
  • Yes ok, it does manage windows layout. I wanted to stress that it doesn't *persist* them by default (a goal of the question) and that it does *have tabs* (the doc says the window layouts are tabbed) even if tabs isn't the first goal of the app. It wanted to react to your "do not use elscreen", beause I think he can. – Ehvince Sep 21 '16 at 15:06

1 Answers1

0

You can achieve that with elscreen-persist. Create screens and open the files you need, then call M-x elscreen-persist-store and elscreen-persist-restore to restore what you saved.

and maybe tabbar.el does that through configuration.

Ehvince
  • 1,091
  • 10
  • 14