Function: ibtypes::social-reference
ibtypes::social-reference is a byte-compiled function defined in
hib-social.el.
Signature
(ibtypes::social-reference)
Documentation
Display web page associated with a social hashtag/username reference at point.
Reference format is:
[facebook|git|github|gitlab|instagram|twitter|x]?[#@]<reference> or
[fb|gt|gh|gl|in|tw|x]?[#@]<reference>.
The first part of the label for a button of this type is the social
service name. The service name defaults to the value of
hibtypes-social-default-service (default value of "x")
when not given, so #hashtag would be the same as x#hashtag.
Local git references allow hashtags only, not username references.
This will not match within any single line, single or
double-quoted strings or within any buffer whose major mode is
listed in hibtypes-social-inhibit-modes.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hib-social.el
;; Don't make this a defact or its arguments may be improperly expanded as pathnames.
(defun social-reference (service ref-kind-str hashtag-or-username)
"Display the web page at media SERVICE for REF-KIND-STR and HASHTAG-OR-USERNAME.
REF-KIND-STR is either \"#\" for a hashtag reference or \"@\" for
a username reference."
(if (or (null service) (equal service "")) (setq service hibtypes-social-default-service))
(let ((case-fold-search t)
expr-to-format)
(when (or (and (equal ref-kind-str "#")
(setq expr-to-format
(assoc-default service hibtypes-social-hashtag-alist #'string-match)))
(and (equal ref-kind-str "@")
(setq expr-to-format
(assoc-default service hibtypes-social-username-alist #'string-match))))
(if expr-to-format
(funcall hibtypes-social-display-function (format expr-to-format hashtag-or-username))
(error "(social-reference): Service `%s' does not support reference format, `%s%s'"
service ref-kind-str hashtag-or-username)))))