Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu 12.10, and it has 4 workspaces.
Since it's not possible (or is it?) to make Emacs occupying two workspaces so that I could modify multiple files together(more than 2), I would like to open two Emacs and put them in different workspaces.
Is there anyway to do that? When I click the Emacs icon it just opens Emacs once. If I run it in shell the shell would be unavailable, so I won't be able to open a new Emacs either.

Thanks.

share|improve this question

migrated from stackoverflow.com Apr 12 '13 at 8:47

This question came from our site for professional and enthusiast programmers.

    
Your question isn't clear. You can edit as many files as you want with Emacs, regardless of how many workspaces it is on. You can also pin Emacs, or any other graphical program, so that it is visible on all workspaces. And you can launch as many Emacs instances as you like from the command line - use emacs & to run emacs in the background, and repeat as many times as you like. Also, this is more appropriate for SuperUser than StackOverflow. – Tyler Apr 12 '13 at 0:35
up vote 6 down vote accepted

I should think Ubuntu (well, I assume you're actually talking about Unity?) would provide for showing the same application window in multiple workspaces; but failing that, simply open additional Emacs frames with C-x52 and place them where you want them.

share|improve this answer
    
Thank you! I'm new to Emacs and wasn't aware that I could have multiple frames; I just know how to make multiple windows. – octref Apr 12 '13 at 0:38
    
FYI there are a bunch of useful frame-related bindings using that prefix. Type C-x 5 C-h to see them. – phils Apr 12 '13 at 0:40

So the other answer about C-x 5 2 is quite nice, but it runs all open windows under the same emacs process. This can become problematic if you start using any emacs modes that do blocking I/O, like gnus. What'll happen is that all of emacs will become unresponsive while gnus is waiting to download mails. If this happens to you, you may want to run a separate emacs process for each open window you have. This will use more RAM, but the benefit is that gnus in one window won't interfere with the responsiveness of the other open windows.

In order to launch a new emacs process, you can type Alt+F2 to open Unity's "Run a command" prompt, and then type emacs there. This has the benefit of not leaving behind a terminal window that is blocked by emacs and can't do anything, because Unity launches the new emacs directly.

share|improve this answer
    
Great advice. Originally I was creating new emacs windows by Ctrl+Alt+T and then emacs, and it's quite annoying since I have to open a shell before I open another emacs. Thank you very much! – octref Apr 15 '13 at 21:13

While the answer above is quite satisfactory, I think the question really is that whereas right-clicking the gnome-terminal icon in unity shows a menu option called "New Terminal", which allows more terminals to be generated, the same does not occur on right-clicking the "Emacs" icon on Unity. To allow this also for emacs requires editing the file /usr/share/applications/emacs23.desktop as a super-user and adding the following lines.

[Desktop Action New]
Name=New GNU Emacs 23
Exec=/usr/bin/emacs23 %F
TryExec=emacs23
OnlyShowIn=Unity

Then restart the machine for good measure to ensure that the changes take effect.

share|improve this answer
2  
The order answers appear is not static, so if you are going to reference an answer, be specific with regards to which answer you believe does not answer the proposed question. – Ramhound Jan 21 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .