aboutsummaryrefslogtreecommitdiff
path: root/sx-question-list.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-question-list.el')
-rw-r--r--sx-question-list.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/sx-question-list.el b/sx-question-list.el
index ebd4e97..bdbc2f1 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -132,6 +132,7 @@ Letters do not insert themselves; instead, they are commands.
("j" sx-question-list-view-next)
("k" sx-question-list-view-previous)
("g" sx-question-list-refresh)
+ ("v" sx-question-list-visit)
([?\r] sx-question-list-display-question)))
(defvar sx-question-list--current-page "Latest"
@@ -193,6 +194,14 @@ a new list before redisplaying."
(mapcar #'sx-question-list--print-info question-list)))
(when redisplay (tabulated-list-print 'remember)))
+(defun sx-question-list-visit (&optional data)
+ "Visits question under point (or from DATA) using `browse-url'."
+ (interactive)
+ (unless data (setq data (tabulated-list-get-id)))
+ (unless data (error "No question here!"))
+ (sx-assoc-let data
+ (browse-url .link)))
+
(defcustom sx-question-list-ago-string " ago"
"String appended to descriptions of the time since something happened.
Used in the questions list to indicate a question was updated \"4d ago\"."