diff options
| author | Stefan Petrea <stefan.petrea@gmail.com> | 2014-09-10 10:16:13 +0200 |
|---|---|---|
| committer | Edward Tjörnhammar <ed@cflags.cc> | 2014-09-10 10:16:13 +0200 |
| commit | 65facea0e9a48fa1e21c4b51790f0ce4448dff7b (patch) | |
| tree | 9cc423ee17b71539723f33ae19bced432a721b79 | |
| parent | 2d7c58dbeca0d4ac7b4eab5f47b77946951f27e9 (diff) | |
Feature addition:
* recompute clocks in visual selection
* open org-mode links in visual selection
| -rw-r--r-- | evil-org.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/evil-org.el b/evil-org.el index 8abd7fc..9180645 100644 --- a/evil-org.el +++ b/evil-org.el @@ -53,6 +53,38 @@ (evil-append nil) ) +;; recompute clocks in visual selection +(evil-define-operator evil-org-recompute-clocks (beg end type register yank-handler) + :keep-visual t + :move-point nil + (interactive "<r>") + (progn + (message "start!" ) + (save-excursion + (while (< (point) end) + (org-evaluate-time-range) + (next-line) + (message "at position %S" (point)) + )))) + +;; open org-mode links in visual selection +(evil-define-operator evil-org-open-links (beg end type register yank-handler) + :keep-visual t + :move-point nil + (interactive "<r>") + (progn + (message "start of evil-org-open-links 2" ) + (save-excursion + (goto-char beg) + (beginning-of-line) + (catch 'break + (while (< (point) end) + (message "at position %S" (point)) + (org-next-link) + (when (not(< (point) end)) (throw 'break 0)) + (org-open-at-point) + ))))) + ;; normal state shortcuts (evil-define-key 'normal evil-org-mode-map "gh" 'outline-up-heading |
