reddit / emacs

Why is suspend-emacs enabled at all in GUI mode?

thetemp_ · 2022-08-14 18:41
I already have the C-z binding disabled. But I was debugging a problem with my init file which hadn't loaded completely, had the problem halfway solved but then accidentally suspended the Emacs GUI. Now I have to restart Emacs and redo that work for no good reason. Being able to suspend Emacs from a terminal makes sense, but why does this feature exist at all when running it in a GUI? If anything, it seems like some kind of practical joke. There doesn't seem to be any way to recover the previous state of the program. I already tried all the suggestions on [this page](https://superuser.com/questions/349943/how-to-awake-emacs-gui-after-pressing-ctrlz). I'm sure I can't be the first to complain about this. Would a bug report be a waste of time? EDIT: I meant `suspend-frame` (can't edit titles on Reddit). EDIT2 (Update): It's only the Emacs master-branch which I compile from the git-cloned source that becomes completely unresponsive. If I'm using Emacs 28.1 on the same desktop/OS and press C-z, it merely iconifies the frame.
thevoidzero · 2022-08-14 19:17
I also click it sometimes, I just move the focus to another window and back and the suspend is gone. I'm on i3.
ieure · 2022-08-14 19:23
It's been a really long time since I've had a workflow like this, but IIRC it used to iconify the current frame. I also have it disabled.
eleven_cupfuls · 2022-08-14 19:50
To be precise it actually invokes `suspend-frame`: https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.23#L1007-L1008 Personally I just rebind it as a shortcut for `C-x 5`.
xtifr · 2022-08-14 20:47
Cannot reproduce: when I press C-z in GUI mode, it merely minimizes/iconifies the frame. Just tried with "emacs -q" to make sure nothing in my config was affecting it, and sure enough, it still just minimized.
thetemp_ · 2022-08-14 22:16
It may be something to do with how it interacts with KDE. IIRC, what you describe is what would happen when I used Gnome.
thetemp_ · 2022-08-14 22:18
I think when I used Gnome it acted that way, but ever since switching to KDE I can't bring it back afterwards. I can bring the window back up, but it's completely unresponsive. Same thing if I start Emacs with `emacs -Q` and press C-z. EDIT: If I run Emacs on Gnome in a Debian VM, I can C-z and focus the frame again, and continue using Emacs. Not so on my Fedora Kinoite desktop. Hmm.
db48x · 2022-08-15 08:37
That sounds like a bug, honestly. Use `M-x report-emacs-bug` to send in a bug report.
timmymayes · 2022-08-15 19:14
I just rebound C-z to undo and called it a day.
StrangeAstronomer · 2022-08-16 08:56
I reckon this must be one of the biggest discouragements for emacs newbies. "I typed something but made a mistake and hit \^z and the whole thing locked up. Had to kill emacs and I lost everything"