Ratpoison – Recover GUI Window After Minimizing

emacsratpoisonx11

I'm running ratpoison. I was running emacs started through a keybinding (hence no xterm). Then I hit Ctrl-Z by mistake and emacs disappeared (emacs iconify-or-deiconify-frame). I know it is still there, as when I leave ratpoison and go to mwm emacs comes back to the foreground. However, starting an xterm and running %emacs bash tells me bash: fg: %emacs: no such job.

How can I de-iconify emacs in ratpoison?

  1. similar problem within Gnome
  2. bugreport

(this post was heavily edited)

Best Answer

Background a process in subshell #1 and get it back to foreground on subshell #2 is not possible at all (if you don't use extra tools like: reptyr).


In your case you even did not start it from terminal and Ctrl+Z has a different behavior if you are not in a terminal. I think your Ctrl+Z is doing some other "magic", ratpoison-default-keybindings even do not list it. Maybe you should figure out, what Ctrl+Z is bound to on your setup.

EDIT
From Emacs Manual:

When Emacs communicates directly with an X server and creates its own dedicated X windows, C-z has a different meaning. Suspending an application that uses its own X windows is not meaningful or useful. Instead, C-z runs the command iconify-or-deiconify-frame, which temporarily iconifies (or "minimizes") the selected Emacs frame (see section P. Frames and X Windows). Then you can use the window manager to get back to a shell window.

You should just be able to Alt+Tab through open applications to emacs. Maybe under ratpoison there is another way to get back minimized frames. Or add Alt-Tab to ratpoison, edit your .ratpoisonrc:

definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

and restart rp.

Related Question