Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [exit]

The tag has no usage guidance.

0
votes
1answer
49 views

`C-x C-c` closes all windows on OSX

In OSX, pressing C-x C-c closes all Emacs windows instead of only the selected one. This isn't the bahavior I've come to esxpect from using Emacs on Windows, Ubuntu,or CentOS. What's up?
0
votes
1answer
32 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
1answer
53 views

How to make emacs or emacsclient exit with nonzero return code

How to exit emacs with nonzero return code? And how to achieve that also with emacsclient? Duplicate of https://superuser.com/questions/295156/how-to-set-the-exit-status-for-emacsclient/542916
0
votes
3answers
52 views

How to prompt to ask for confirmation when C-x C-c in emacsclient?

I use (setq desktop-save 'ask) in my init.el, so every time I C-x C-c to exit Emacs, it will prompt to ask if saving desktop or not; I use this trick to avoid accidentally exiting Emacs. But after ...
0
votes
0answers
31 views

emacsclient exits unexpectedly without any error

I've built GNU Emacs 27.0.50 from source in Ubuntu 18.10. Then started the daemon as a systemd unit: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/...
2
votes
1answer
172 views

Delete auto-save file when killing Emacs without saving buffer

When I have unsaved buffers and I kill Emacs with save-buffers-kill-terminal (C-x C-c) I'm asked whether to save each buffer. Is it possible to delete a buffer's auto-save data when I answer n? I had ...
2
votes
2answers
101 views

Reminds to clock out or just clock out when there has a clock running

Sometimes when we use "clock in" command in org mode and forget to clock out before exit emacs. When we open emacs again and try to "clock in" with the same entry. There always popup with something ...
0
votes
1answer
209 views

Ask for saving contents if scratch buffer is modified before exit

I had made some random notes in my scratch buffer. By mistake, I pressed C-x C-c and killed the Emacs session. All my content in the scratch buffer was gone. Question: When I try to close Emacs ...
6
votes
1answer
460 views

Why emacsclient say to quit with C-x 5 0?

As soon as I open emacsclient I found the following message in the minibuffer: When done with this frame, type C-x 5 0, I find it strange that it advices how to close the frame with delete-frame, any ...
4
votes
1answer
119 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 ...
3
votes
1answer
125 views

Calling a function when emacs process is killed (MS Windows)

I would like to call a function just before emacs exits. Normally the following can do job: (add-hook 'kill-emacs-hook 'my-function) Unfortunately when I shutdown the system (MS Windows) or ...
4
votes
3answers
825 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
810 views

Exiting emacs without confirmation to kill running processes

It turned out not to be the same problem as Kill process buffer without confirmation?: emacs asks for different kind of confirmations when exiting and when just killing a buffer. How to specify for ...
10
votes
2answers
676 views

Possible to “detach” a child process?

I use browse-url/browse-url-firefox to open links in Firefox from within Emacs 24.5.1 under Linux (Fedora 23) which in essence executes the firefox executable with the URL by start-process. If there ...
0
votes
1answer
47 views

Gracefully exiting emacs while afplay is running

When I exit emacs while my music is playing using afplay -- music keeps playing. What is the right way of stopping/killing afplay process? Should I use exit hooks or is there emms built-in setting I ...
0
votes
1answer
80 views

Emacs fail to exit

Emacs fail to exit (save-buffers-kill-emacs, C-c C-x) with the following error: KEY must be an integer, cons, symbol, or string My Emacs config: https://github.com/AttilaVM/.emacs.d/blob/master/...
1
vote
1answer
63 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, ...
2
votes
1answer
420 views

How to exit from .emacs init file?

I want to debug my init file, by exiting from loading the file in the middle so if something is wrong after that place it will not be loaded. How can I exit from .emacs file?
8
votes
1answer
128 views

Quitting Emacs and re-enabeling touchpad

I have the below elisp code in my emacs config which disables my touchpad, so it won't annoy me when writing. ;; disable touchpad when on emacs (defun turn-off-mouse (&optional frame) (...
13
votes
3answers
3k views

a confirmation after C-x C-c before exiting Emacs

Can I configure Emacs to ask for confirmation before exiting on C-x C-c? (Sometimes, my fingers press this by mistake.)