lang/org: report deleted files after +org-attach/sync
This commit is contained in:
parent
68fed155ad
commit
318f51cfff
1 changed files with 8 additions and 6 deletions
|
@ -54,12 +54,14 @@ and END (defaults to `point-min' and `point-max')."
|
|||
(insert-file-contents-literally org-file))
|
||||
(setq +org-attachments (+org-attachments--list)))
|
||||
;; clean up
|
||||
(let ((deleted 0))
|
||||
(dolist (file (cl-set-difference +org-attachments-files +org-attachments
|
||||
:test #'string=))
|
||||
(message "Deleting orphaned attachment: %s" file)
|
||||
(cl-incf deleted)
|
||||
(unless arg
|
||||
(delete-file (expand-file-name file org-attach-directory))))
|
||||
(message "Buffer's attachments synced"))
|
||||
(message "Buffer's attachments synced (%d deleted)" deleted)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-attach/find-file ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue