Questions tagged [quitting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
45
votes
2answers
6k views

Debugging a frozen Emacs

I am using mew for my e-mail. I need to use TLS with my email provider for SMTP. However, when I try to invoke that, Emacs freezes. I would like to take this opportunity to learn more about Emacs ...
41
votes
2answers
7k views

What do I do when Emacs is frozen? [duplicate]

What should I do when Emacs stops responding? My current "emacs-is-frozen" protocol looks like this: Spam C-g (it sometimes works) Wait for a while. pkill -9 emacs What alternate steps could I try ...
10
votes
2answers
339 views

How to set temporary halt after C-x C-c?

If I run C-x C-c in emacs, it will close immediately. If I set confirm-kill-emacs to y-or-n-p it will ask for confirmation before closing. Instead of y-or-n-p, I want to set some temporary timer for ...
6
votes
1answer
230 views

Interrupt ELisp interpreter from outside Emacs? [duplicate]

Sometimes Lisp hangs due to an infinite loop, making the whole of Emacs unresponsive, so it can't process any input, C-g included. So, I was hoping for there to be a way to maybe send it an emergency ...
5
votes
2answers
1k views

Emacs doesn't let me exit without selecting a coding system

Sometimes to speed up of opening an emacs' eshell directly from terminal (in my case from MS DOS prompt), I do emacs -Q -f eshell. But when I try to exit emacs doesn't let it, unless I give some input ...
4
votes
2answers
505 views

How can I kill all unmodified buffers / files and delete their related frames?

How can I close all unmodified buffers? Usually after a day of work - I've got a ton of buffers / frames open. Right now I have to navigate to each frame and close it - which then prompts me if the ...
4
votes
3answers
913 views

If I press CTRL-x CTRL-c and exited the scratch buffer in Emacs, will everything I typed be gone?

My Internet was not working, and while waiting it to go back up, I used Emacs to type some ideas first. A few minutes later, the Internet was up, and I checked my Chrome browser, and it worked. So I ...
4
votes
1answer
88 views

Confirm quit only for keyboard shortcut, not for window close via mouse

I activated setq-local confirm-kill-emacs (quote y-or-n-p) on a hook for a local mode which has a shortcut very similar to C-x C-c, in order to avoid accidentally closing Emacs when trying to execute ...
4
votes
2answers
77 views

Closing emacsclient after quitting calc?

I'd like to run calc in an emacsclient in my terminal, and then have that particular emacsclient session close completely and return me to my shell when calc quits. I've got the first part of that ...
4
votes
1answer
124 views

how to read messages which appear after `C-x C-c`?

When I exit emacs via C-x C-c (save-buffers-kill-terminal) it prints a message in minibuffer. I can't read the message because the frame gets destroyed too fast. I'd like to read the message(s), how ...
4
votes
0answers
246 views

Quitting emacs is very slow

Quitting my Emacs takes a really long time. Is there a good way to track what's happening while quitting Emacs? (So far I'm turning to git blame to figure out what changes I have made to cause this ...
3
votes
2answers
83 views

How to save last Emacs session time and hostname to a log file on quit/close

Background / Problem: I have 2 machines sharing a file directory using Google drive. I edit the shared files using Emacs on both machines alternatively everyday. I would like to make sure that at ...
2
votes
1answer
147 views

How to debug slow respond or halt? [duplicate]

I try to comments 1.4K+ lines in a C++ function by using M-; or rectangle insert string //. Wait for several minutes, Emacs still no respond. I have to kill Emacs. In this case, how could I locate ...
2
votes
2answers
309 views

C-g has stopped breaking out of commands like `C-x C-f` and `M-x` in graphical emacs-25

I have always used C-g (ie keyboard-quit) to break out of commands like M-x and C-x C-f. At some point not too long ago this stopped working. All that happens is that Quit flashes in the minibuffer ...
2
votes
1answer
411 views

How to make emacs prompt yes or no to save the session when desktop-save-mode is on?

I started to use emacs a few days ago and still getting the hang of it. desktop-save-mode is really handy at times as I don't have to reopen all the files that I had already opened in my previous ...
1
vote
2answers
194 views

Stop GNU Emacs (GUI) on macOS from quitting

Is it possible to stop Emacs on macOS from quitting? This may sound like a weird request, but numerous times I may accidentally quit Emacs and the whole GUI app exits -- which means I then have to ...
1
vote
5answers
99 views

Leave point in original position when C-g is pressed?

I am writing a function to select a region (say 2 lines). (defun select-some-region () (interactive) (push-mark (point) nil t) (forward-line 2)) When point is in a buffer like this |...
1
vote
2answers
106 views

Aggressive C-g config

Is there a way to configure C-g (or some other key?) to not be usable as normal input in any context, part of a key binding, etc, and instead have it quit in more contexts? e.g. I'd like C-x C-g to ...
1
vote
1answer
68 views

failed compile command runs on exit, prevents exit – how to track down?

I'm on a new system (Amazon Linux 2015.9), and my emacs config seems to not like the stock install (Emacs 24.3.1) or vice-versa. When I do C-x C-c it runs save-buffers-kill-terminal. But this fails, ...
0
votes
1answer
158 views

how to quit describe-key function?

I forgot what a key is bound to, so I decided to run C-h k <my key binding> But after pressing C-h k, I've remembered about that key binding and decided to quit. So I pressed C-g. Instead of ...
0
votes
1answer
46 views

Unable to quit emacs with `Wrong type argument: hash-table-p, nil`

I have some customisations in ~/.emacs.el. Today I refactored a piece that used dolist, directory-files, and find-file. I am now unable to quit Emacs in the normal way and I get this from the mini-...
0
votes
0answers
44 views

How do you write an abortable function?

How do you wrote an abortable function, so that when user presses C-g during execution, this function is "stopped" ;; my function so far (defun my/elfeed-extra-info-2 () (interactive) (next-line) ...