commit | author | age
|
76bbd0
|
1 |
;ELC |
C |
2 |
;;; Compiled |
|
3 |
;;; in Emacs version 26.1 |
|
4 |
;;; with all optimizations. |
|
5 |
|
|
6 |
;;; This file uses dynamic docstrings, first added in Emacs 19.29. |
|
7 |
|
|
8 |
;;; This file does not contain utf-8 non-ASCII characters, |
|
9 |
;;; and so can be loaded in Emacs versions earlier than 23. |
|
10 |
|
|
11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
13 |
|
|
14 |
|
|
15 |
(require 'org) |
|
16 |
#@27 The IRC client to act on. |
|
17 |
(defvar org-irc-client 'erc (#$ . 423)) |
|
18 |
#@75 Non-nil will store a link to the logs, nil will store an irc: style link. |
|
19 |
(defvar org-irc-link-to-logs nil (#$ . 495)) |
|
20 |
(org-link-set-parameters "irc" :follow 'org-irc-visit :store 'org-irc-store-link) |
|
21 |
#@87 Parse LINK and dispatch to the correct function based on the client found. |
|
22 |
|
|
23 |
(fn LINK) |
|
24 |
(defalias 'org-irc-visit #[257 "\301!\302\267\202 \303!\202 \304\305!\207" [org-irc-client org-irc-parse-link #s(hash-table size 1 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (erc 9)) org-irc-visit-erc error "ERC only known client"] 4 (#$ . 702)]) |
|
25 |
#@222 Parse an IRC LINK and return the attributes found. |
|
26 |
Parse a LINK that looks like server:port/chan/user (port, chan |
|
27 |
and user being optional) and return any of the port, channel or user |
|
28 |
attributes that are found. |
|
29 |
|
|
30 |
(fn LINK) |
|
31 |
(defalias 'org-irc-parse-link #[257 "\300\301\302#\211G\211\303W\204 \211\304V\203 \305\306\"\210\300@\307\302#\240\210\207" [split-string "/" t 1 3 error "Failed to parse link needed 1-3 parts, got %d" ":"] 8 (#$ . 1068)]) |
|
32 |
#@73 Dispatch to the appropriate function to store a link to an IRC session. |
|
33 |
(defalias 'org-irc-store-link #[0 "\301=\205 \302 \207" [major-mode erc-mode org-irc-erc-store-link] 2 (#$ . 1526)]) |
|
34 |
#@208 Remove unnecessary white space from STRING and add ellipses if necessary. |
|
35 |
Strip starting and ending white space from STRING and replace any |
|
36 |
chars that the value AFTER with `...' |
|
37 |
|
|
38 |
(fn STRING &optional AFTER) |
|
39 |
(defalias 'org-irc-ellipsify-description #[513 "\300\206 \301!\302\303B\304\303B\305\306Q\307BE\211\211\2035 \211@\310@\"\203. \311A\312\211 $\262A\266\202\202 \262\207" [number-to-string 30 "^[ ]*" "" "[ ]*$" "^\\(.\\{" "\\}\\).*" "\\1..." string-match replace-match nil] 11 (#$ . 1724)]) |
|
40 |
#@267 Find the best line to link to from the ERC logs given ERC-LINE as a start. |
|
41 |
If the user is on the ERC-prompt then search backward for the |
|
42 |
first non-blank line, otherwise return the current line. The |
|
43 |
result is a cons of the filename and search string. |
|
44 |
|
|
45 |
(fn ERC-LINE) |
|
46 |
(defalias 'org-irc-erc-get-line-from-log #[257 "\301 \210\302\303!\210r\304\305 !q\210db\210\306!\307 \230\2030 \310 b\210\311\312\313\314#\205> |