diff options
Diffstat (limited to 'sx-search.el')
-rw-r--r-- | sx-search.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sx-search.el b/sx-search.el index aefd12e..c22a554 100644 --- a/sx-search.el +++ b/sx-search.el @@ -32,6 +32,7 @@ (require 'sx) (require 'sx-question-list) +(require 'sx-question-mode) (require 'sx-tag) (defvar sx-search--query-history nil @@ -103,6 +104,19 @@ prefix argument, the user is asked for everything." (sx-question-list-refresh 'redisplay) (switch-to-buffer (current-buffer)))) + +;;; Tag +(defun sx-search-tag-at-point (&optional pos) + "Follow tag under position POS or point." + (interactive) + (let ((tag (save-excursion + (when pos (goto-char pos)) + (or (get-text-property (point) 'sx-tag) + (thing-at-point 'symbol))))) + (sx-search (or sx-question-list--site + (sx-assoc-let sx-question-mode--data .site_par)) + nil tag))) + (provide 'sx-search) ;;; sx-search.el ends here |