summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2009-07-27 04:14:04 +0800
committerBastien Guerry <bzg@altern.org>2009-07-27 04:14:04 +0800
commit03fffc1864499c45915834bfefefb5ec9ca3b7c0 (patch)
tree64e29004ec69797be403ec6d7b1cd1befb5150f8
parentd8a0f2949d77de4a886f15b184565d9ed3fa645f (diff)
downloadorg-mode-03fffc1864499c45915834bfefefb5ec9ca3b7c0.tar.gz
New function `org-occur-link-in-agenda-files'.
This function create a link and search for it in agenda files. Note that it does not store the link in `org-stored-links'.
-rwxr-xr-xlisp/ChangeLog2
-rw-r--r--lisp/org.el10
2 files changed, 12 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 58bd830..3cf4d60 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2009-07-26 Bastien Guerry <bzg@altern.org>
+ * org.el (org-occur-link-in-agenda-files): New function.
+
* org-timer.el (org-timer-last-timer): New variable.
* org-agenda.el (org-agenda-mode-map): New key for
diff --git a/lisp/org.el b/lisp/org.el
index cb3bb61..d037531 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15601,6 +15601,16 @@ really on, so that the block visually is on the match."
(goto-char pos)
(org-reveal)))))))
+(defun org-occur-link-in-agenda-files ()
+ "Create a link and search for it in the agendas.
+The link is not stored in `org-stored-links', it is just created
+for the search purpose."
+ (interactive)
+ (let ((link (condition-case nil
+ (org-store-link nil)
+ (error "Unable to create a link from here"))))
+ (org-occur-in-agenda-files (regexp-quote link))))
+
(defun org-uniquify (list)
"Remove duplicate elements from LIST."
(let (res)