I use this function to reopen a file killed by mistake.
(defun undo-kill-buffer () (interactive) (let ((active-files (loop for buf in (buffer-list) when (buffer-file-name buf) collect it))) (loop for file in recentf-list unless (member file active-files) return (find-file file)))) (global-set-key (kbd "C-x K") 'undo-kill-buffer)
The problem is that I would like to reopen the file at the right place (
save-place-mode) only in this case. If I open a file with another function (
find-file-at-point, ...) I don't want to remember the last position.
I have not found a solution to activate save-place-mode in some cases only.
Is it possible to write a
find-file-with-saveplace function without modify
Thanks for any help.