               (when (file-exists-p file)
                 (rename-file file (f-expand (f-filename old-path) (f-dirname new-path)) t)))
             (narf/org-attachments)))
+    (when (buffer-modified-p)
+      (save-buffer))
     (rename-file old-path new-path 1)
     (rename-buffer (f-filename new-path))
     (set-visited-file-name new-path)

  (let ((dir (f-dirname path))
        (fullpath (f-full path))
        (is-auto t))
    (when (and bang (not (file-exists-p dir))) (f-mkdir dir))
    (if (file-exists-p dir)
        (if (file-exists-p fullpath)
            (error "File already exists: %s" path)

                  (when (file-exists-p file)
                    (delete-file file t)))
                (narf/org-attachments)))
        (set-buffer-modified-p nil)
        (delete-file filename)
        (kill-this-buffer)
        (unless (narf/real-buffer-p)
