Use save-current-buffer and with-current-buffer