Hi anyone!
My name is David, it is the first time I write to this mailing
list. I am developing a addon for planner, I need a hook which is
called when a task is deleted but I have not could find one. As I
think this is useful I have written it. I attach a patch in order that
you apply it if you want.
Thanks.
===File ~/planner.patch=====================================
* looking for [EMAIL PROTECTED]/planner-el--devel--0--patch-115 to compare with
* comparing to [EMAIL PROTECTED]/planner-el--devel--0--patch-115
M planner.el
* modified files
--- orig/planner.el
+++ mod/planner.el
@@ -3667,6 +3667,11 @@
;;;_ + Deleting
+(defvar planner-delete-task-hook nil
+ "Hook called after a task has been deleted.
+Argument is a task information list. If a function returns nil,
+no other functions will be processed.")
+
(defun planner-delete-task ()
"Deletes this task from the current page and the linked page."
(interactive)
@@ -3688,7 +3693,10 @@
(delete-region (planner-line-beginning-position)
(min (point-max) (1+ (planner-line-end-position)))))
(when planner-tasks-file-behavior
- (planner-save-buffers live-buffers t))))))
+ (planner-save-buffers live-buffers t))
+
+ (run-hook-with-args-until-failure
+ 'planner-delete-task-hook task-info)))))
;;;_ + Updating
============================================================
_______________________________________________
Planner-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/planner-el-discuss