summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSomelauw <Somelauw>2017-07-16 18:07:04 +0200
committerSomelauw <Somelauw>2017-07-16 18:08:41 +0200
commit25a6d5b05a5c19a105c59215f16888c89c245712 (patch)
tree3b21707d82fb68865eca8ecbeff45681472ab125
parente9620d06d47a6d949a612002b0877a9c52bf2032 (diff)
Improve and document functions without default binding
-rw-r--r--doc/keythemes.org15
-rw-r--r--evil-org.el28
2 files changed, 31 insertions, 12 deletions
diff --git a/doc/keythemes.org b/doc/keythemes.org
index 798357c..7308688 100644
--- a/doc/keythemes.org
+++ b/doc/keythemes.org
@@ -139,3 +139,18 @@
| =M-o= | org-insert-heading+org-metaright |
|-------+----------------------------------|
+** Commands without default binding
+ These functions don't have any bindings by default. You can bind them under C-c or another leader key. These functions may have a few bugs. Improvements in the form of pull requests
+ are welcome.
+
+ |---------------------------+----------------------------------------|
+ | function | explanation |
+ |---------------------------+----------------------------------------|
+ | evil-org-recompute-clocks | recompute clocks in selection |
+ | evil-org-open-links | opens links in selection |
+ | evil-org-open-incognito | open link at point in incognito window |
+ |---------------------------+----------------------------------------|
+
+ Recomputing a single clock can also be done with =C-c C-c=.
+ =evil-org-open-links= opens all links in a selection. Use =RET= to open a single link.
+ =evil-org-open-incognito= tries to open a link in a private window.
diff --git a/evil-org.el b/evil-org.el
index 4dc76d5..b2d8e52 100644
--- a/evil-org.el
+++ b/evil-org.el
@@ -7,7 +7,7 @@
;; Git-Repository: git://github.com/Somelauw/evil-org-mode.git
;; Created: 2012-06-14
;; Forked-since: 2017-02-12
-;; Version: 0.8.3
+;; Version: 0.8.4
;; Package-Requires: ((emacs "24.4") (evil "1.0") (org "8.0.0"))
;; Keywords: evil vim-emulation org-mode key-bindings presets
@@ -350,17 +350,21 @@ Argument INCOG whether to open in incognito mode."
(not (null org-link-search-failed)))
(throw 'break 0))
(if (not (null incog))
- (let* ((new-arg
- ;; if incog is true, decide which incognito settings to
- ;; use dependening on the browser
- (cond ((not (null (string-match "^.*\\(iceweasel\\|firefox\\).*$" browse-url-generic-program))) "--private-window")
- ((not (null (string-match "^.*\\(chrome\\|chromium\\).*$" browse-url-generic-program))) "--incognito")
- (t "")))
- (old-b (list browse-url-generic-args " "))
- (browse-url-generic-args (add-to-ordered-list 'old-b new-arg 0)))
- (org-open-at-point))
- (let ((browse-url-generic-args '("")))
- (org-open-at-point))))))))
+ (evil-org-open-incognito)
+ (let ((browse-url-generic-args '("")))
+ (org-open-at-point '(16)))))))))
+
+(defun evil-org-open-incognito ()
+ "Open link in new incognito window."
+ (interactive)
+ (let* ((new-arg
+ ;; decide which incognito settings to use depending on the browser
+ (cond ((not (null (string-match "^.*\\(iceweasel\\|firefox\\).*$" browse-url-generic-program))) "--private-window")
+ ((not (null (string-match "^.*\\(chrome\\|chromium\\).*$" browse-url-generic-program))) "--incognito")
+ (t "")))
+ (old-b (list browse-url-generic-args " "))
+ (browse-url-generic-args (add-to-ordered-list 'old-b new-arg 0)))
+ (org-open-at-point '(16))))
(evil-define-operator evil-org-open-links (beg end &optional count)
"Open links in visual selection.