aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-org.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-org.el b/emacs/.emacs.d/lisp/my/my-org.el
index cb72677..28c5354 100644
--- a/emacs/.emacs.d/lisp/my/my-org.el
+++ b/emacs/.emacs.d/lisp/my/my-org.el
@@ -999,5 +999,19 @@ When BLOCK-REGEXP is non-nil, use this regexp to find blocks."
((org-footnote-at-reference-p) nil)
(t (apply orig-fun args)))))
+(defun my-org-vote-up (&optional points)
+ (interactive "p")
+ (org-entry-put
+ (point)
+ "Vote"
+ (number-to-string
+ (+ (or points 1)
+ (string-to-number
+ (or (org-entry-get (point) "Vote") "0"))))))
+
+(defun my-org-vote-down (&optional points)
+ (interactive "p")
+ (my-org-vote-up (- points)))
+
(provide 'my-org)
;;; my-org.el ends here