I am learning Emacs by doing built-in tutorial (C-h t). However, when I decide to take a break and exit the editor (C-x C-c) and then later rerun the tutorial the position when I finished before is not saved. The tutorial starts over from the beginning. Is there a way to save this position so that I do not have to remember where I finished? (Well, maybe the tutorial covers the problem in some place, but I have not yet got to it).
Asked
Active
Viewed 221 times
1 Answers
0
The way you do this by default is to use C-x k
to kill the buffer, and then you will be given the option to save your position.
If you want emacs to do the same check when you use C-x C-c
then add the following to your .emacs file.
By using:
(advice-add 'help-with-tutorial :override
(defun help-with-tutorial-deals-with-c-x-c-c (...)
it adds the line:
(add-hook 'kill-emacs-query-functions 'tutorial--save-tutorial nil t)
to the function help-with-tutorial
, which is now called help-with-tutorial-deals-with-x-s-x-c

harlandski
- 101
- 3
C-x k
to kill the tutorial buffer when you're done, and it will offer to save your position. (Evidentially this doesn't happen if you exit Emacs entirely withC-x C-c
.) – phils Apr 07 '19 at 09:14