I have a list of files that I want to successively visit with find-file
and then return to the first buffer. I thought that save-current-buffer
would help me to achieve this. However, with the following code, the cursor ends up in one of the buffers opened by find-file
, not in the buffer where save-current-buffer
had been executed:
(save-current-buffer
(dolist (file org-agenda-files)
(find-file file)
;; do something with file
))
How can I return to the first buffer after find-file
?