Function: org-irc-erc-store-link
org-irc-erc-store-link is a byte-compiled function defined in
ol-irc.el.gz.
Signature
(org-irc-erc-store-link)
Documentation
Store a link to the IRC log file or the session itself.
Depending on the variable org-irc-link-to-logs store either a
link to the log file for the current session or an irc: link to
the session itself.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ol-irc.el.gz
(defun org-irc-erc-store-link ()
"Store a link to the IRC log file or the session itself.
Depending on the variable `org-irc-link-to-logs' store either a
link to the log file for the current session or an irc: link to
the session itself."
(require 'erc-log)
(if org-irc-link-to-logs
(let* ((erc-line (buffer-substring-no-properties
(line-beginning-position) (line-end-position)))
(parsed-line (org-irc-erc-get-line-from-log erc-line)))
(if (erc-logging-enabled nil)
(progn
(org-link-store-props
:type "file"
:description (concat "'" (org-irc-ellipsify-description
(cadr parsed-line) 20)
"' from an IRC conversation")
:link (concat "file:" (car parsed-line) "::"
(cadr parsed-line)))
t)
(error "This ERC session is not being logged")))
(let* ((link-text (org-irc-get-erc-link))
(link (org-irc-parse-link link-text)))
(if link-text
(progn
(org-link-store-props
:type "irc"
:link (concat "irc:/" link-text)
:description (concat "irc session `" link-text "'")
:server (car (car link))
:port (or (string-to-number (cadr (pop link))) erc-default-port)
:nick (pop link))
t)
(error "Failed to create ('irc:/' style) ERC link")))))