summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2021-07-27 08:54:34 +1000
committerYuchen Pei <me@ypei.me>2021-07-27 08:54:34 +1000
commitf6a29a2031c566699e1693efe324785d7cdda56d (patch)
tree505de100897722623b41f6b4ad412d927631d764
parente1ee48a18a1926779d271f787c0fd9b608bdee97 (diff)
updated rt-org-open to retain ticket-alist when opening rt:id:foo
- it will open a query with id=foo instead and follow the link
-rw-r--r--rt-liberation-org.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/rt-liberation-org.el b/rt-liberation-org.el
index 4896851..8db9a81 100644
--- a/rt-liberation-org.el
+++ b/rt-liberation-org.el
@@ -34,15 +34,14 @@
(defun rt-org-open (link)
"Opens the rt LINK.
- Open the rt ticket (for links starting with 'id:') or run
- the query (for links starting with 'query:')."
+ Open the rt ticket (for links starting with 'id:') or run
+ the query (for links starting with 'query:')."
(require 'rt-liberation)
(cond
((string-match "^id:\\(.+\\)" link)
- (let (
- (ticket-alist (list (cons "id" (concat "ticket/" (match-string 1 link)))))
- )
- (rt-liber-viewer2-display-ticket-history ticket-alist (current-buffer))))
+ (rt-liber-browse-query (format "id = \"%s\"" (match-string 1 link)))
+ (rt-liber-ticket-at-point)
+ )
((string-match "^query:\\(.+\\)" link)
(rt-liber-browse-query (match-string 1 link)))
(t (error "Unrecognized link type '%s'" link))))