2

What I want to achieve is this. I open a bunch of files, edit them and quit Emacs. then tomorrow I open one the files and I want Emacs to jump to the last edited position on that file. How can I achieve this ?

4

The built-in library saveplace.el contains a commentary that states:

;; Automatically save place in files, so that visiting them later
;; (even during a different Emacs session) automatically moves point
;; to the saved position, when the file is first found.  Uses the
;; value of buffer-local variable save-place to determine whether to
;; save position or not.

In recent versions of Emacs, the minor-mode save-place-mode is auto-loaded. Thus, all that is needed is the following one-liner in the .emacs / init.el file:

(save-place-mode 1)

For additional information, see the emacswiki page:

https://www.emacswiki.org/emacs/SavePlace

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.