Questions tagged [exit]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

How to force exit man buffer preventing jumping into *Messages* buffer

I am using emacs to read man pages. macsman() { emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\"))" } alias man=macsman (define-key Man-mode-map "q" ...
alper's user avatar
  • 1,140
0 votes
0 answers
108 views

How do I disable recentf-cleanup on exit?

How do I disable recentf-cleanup on exit? Setting (setq recentf-auto-cleanup 'never) is not enough.
HappyFace's user avatar
  • 738
1 vote
1 answer
49 views

How to pass an optional agrument to kill-emacs?

I would like a way to make emacs to return a non-zero exit code when exiting. This page https://www.gnu.org/software/emacs/manual/html_node/elisp/Killing-Emacs.html lists the command kill-emacs &...
ianinini's user avatar
  • 113
0 votes
1 answer
311 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?
Aido's user avatar
  • 165
1 vote
1 answer
585 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-...
miguelmorin's user avatar
  • 1,731
0 votes
1 answer
480 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
FunkyBaby's user avatar
  • 757
0 votes
3 answers
884 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 ...
CodyChan's user avatar
  • 2,589
0 votes
0 answers
209 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/...
marcanuy's user avatar
  • 788
2 votes
1 answer
1k 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 ...
Arch Stanton's user avatar
  • 1,515
3 votes
2 answers
348 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 ...
lhstat's user avatar
  • 55
4 votes
4 answers
1k 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 ...
Prasanna's user avatar
  • 1,470
10 votes
1 answer
1k 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 ...
marcanuy's user avatar
  • 788
4 votes
1 answer
170 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 ...
jue's user avatar
  • 4,416
3 votes
1 answer
166 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 ...
Name's user avatar
  • 7,644
4 votes
3 answers
2k 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 ...
nonopolarity's user avatar
8 votes
2 answers
2k 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 ...
user905686's user avatar
12 votes
3 answers
2k 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 ...
Tim Landscheidt's user avatar
0 votes
1 answer
75 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 ...
Maxim Kim's user avatar
  • 1,391
0 votes
1 answer
137 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/...
atevm's user avatar
  • 918
1 vote
1 answer
89 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, ...
billc's user avatar
  • 173
5 votes
1 answer
1k 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?
jcubic's user avatar
  • 681
8 votes
1 answer
176 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) (...
seds's user avatar
  • 183
15 votes
3 answers
6k 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.)
imz -- Ivan Zakharyaschev's user avatar