소스 검색

Attachments: Commit to git after deleting a file

Patch by David Maus
Carsten Dominik 15 년 전
부모
커밋
80d0b06fbf
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      lisp/ChangeLog
  2. 2 1
      lisp/org-attach.el

+ 1 - 0
lisp/ChangeLog

@@ -1,6 +1,7 @@
 2010-03-24  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-attach.el (org-attach-commit): Remove dependence on xargs.
+	(org-attach-delete-one): Commit after deleting a file.
 
 	* org-latex.el (org-export-latex-fontify): Do not mistake table.el
 	borders for strike-through emphasis.

+ 2 - 1
lisp/org-attach.el

@@ -327,7 +327,8 @@ The attachment is created as an Emacs buffer."
     (setq file (expand-file-name file attach-dir))
     (unless (file-exists-p file)
       (error "No such attachment: %s" file))
-    (delete-file file)))
+    (delete-file file)
+    (org-attach-commit)))
 
 (defun org-attach-delete-all (&optional force)
   "Delete all attachments from the current task.