| Server IP : 217.160.0.212 / Your IP : 216.73.216.184 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/erc/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\302\303\304\305\306\301%\210\307\310\311\312\313DD\314\315\316%\210\307\317\311\312\320DD\321\315\322%\210\307\323\311\312\324DD\325\315\326%\210\327\323!\210\307\330\311\312\331DD\332\315\333%\210\307\334\311\312\335DD\336\315\322%\210\307\337\311\312\340DD\341\315\322%\210\307\342\311\312\343DD\344\315\322%\210\307\345\311\312\346DD\347\315\322%\210\307\350\311\312\351DD\352\315\322%\210\307\353\311\312\354DD\355\315\356%\210\307\357\311\312\360DD\361\315\362%\210\307\363\311\312\364DD\365\366\367\370\371\315\322\306\303&\207" [require erc custom-declare-group erc-log nil "Logging facilities for ERC." :group custom-declare-variable erc-generate-log-file-name-function funcall function #[0 "\300\207" [erc-generate-log-file-name-long] 1 #1=""] "A function to generate a log filename.\nThe function must take five arguments: BUFFER, TARGET, NICK, SERVER and PORT.\nBUFFER is the buffer to be saved,\nTARGET is the name of the channel, or the target of the query,\nNICK is the current nick,\nSERVER and PORT are the parameters that were used to connect to BUFFERs\n`erc-server-process'.\n\nIf you want to write logs into different directories, make a\ncustom function which returns the directory part and set\n`erc-log-channels-directory' to its name." :type (choice (const :tag "#channel!nick@server:port.txt" erc-generate-log-file-name-long) (const :tag "#channel!nick@network.txt" erc-generate-log-file-name-network) (const :tag "#channel.txt" erc-generate-log-file-name-short) (const :tag "#channel@date.txt" erc-generate-log-file-name-with-date) (function :tag "Other function")) erc-truncate-buffer-on-save #[0 "\300\207" [nil] 1 #1#] "Erase the contents of any ERC (channel, query, server) buffer when it is saved." boolean erc-enable-logging #[0 "\300\207" [t] 1 #1#] "If non-nil, ERC will log IRC conversations.\nThis can either be a boolean value of nil or t, or a function.\nIf the value is a function, it will be called with one argument, the\nname of the current ERC buffer. One possible function, which saves\nall but server buffers is `erc-log-all-but-server-buffers'.\n\nThis variable is buffer local. Setting it via \\[customize] sets the\ndefault value.\n\nLog files are stored in `erc-log-channels-directory'." (choice boolean function) make-variable-buffer-local erc-log-channels-directory #[0 "\300\207" ["~/log"] 1 #1#] "The directory to place log files for channels.\nLeave blank to disable logging. If not nil, all the channel\nbuffers are logged in separate files in that directory. The\ndirectory should not end with a trailing slash.\n\nIf this is the name of a function, the function will be called\nwith the buffer, target, nick, server, and port arguments. See\n`erc-generate-log-file-name-function' for a description of these\narguments." (choice directory #'"Function" (const :tag "Disable logging" nil)) erc-log-insert-log-on-open #[0 "\300\207" [nil] 1 #1#] "Insert log file contents into the buffer if a log file exists." erc-save-buffer-on-part #[0 "\300\207" [t] 1 #1#] "Save the channel buffer content using `erc-save-buffer-in-logs' on PART.\n\nIf you set this to nil, you may want to enable both\n`erc-log-write-after-send' and `erc-log-write-after-insert'." erc-save-queries-on-quit #[0 "\300\207" [t] 1 #1#] "Save all query (also channel) buffers of the server on QUIT.\n\nIf you set this to nil, you may want to enable both\n`erc-log-write-after-send' and `erc-log-write-after-insert'." erc-log-write-after-send #[0 "\300\207" [nil] 1 #1#] "If non-nil, write to log file after every message you send.\n\nIf you set this to nil, you may want to enable both\n`erc-save-buffer-on-part' and `erc-save-queries-on-quit'." erc-log-write-after-insert #[0 "\300\207" [nil] 1 #1#] "If non-nil, write to log file when new text is added to a logged ERC buffer.\n\nIf you set this to nil, you may want to enable both\n`erc-save-buffer-on-part' and `erc-save-queries-on-quit'." erc-log-file-coding-system #[0 "\300\207" [emacs-mule] 1 #1#] "The coding system ERC should use for writing log files.\n\nThis should ideally, be a \"catch-all\" coding system, like\n`emacs-mule', or `iso-2022-7bit'." coding-system erc-log-filter-function #[0 "\300\207" [nil] 1 #1#] "If non-nil, pass text to this function before writing it to a log file.\n\nThe function should take one argument, which is the text to filter." (choice #'"Function" (const :tag "No filtering" nil)) erc-log-mode #[0 "\300\207" [nil] 1 #1#] "Non-nil if Erc-Log mode is enabled.\nSee the `erc-log-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `erc-log-mode'." :set custom-set-minor-mode :initialize custom-initialize-default] 12)
#@786 Toggle ERC log mode.
With a prefix argument ARG, enable log if ARG is positive,
and disable it otherwise. If called from Lisp, enable the mode
if ARG is omitted or nil.
Automatically logs things you receive on IRC into files.
Files are stored in `erc-log-channels-directory'; file name
format is defined through a formatting function on
`erc-generate-log-file-name-function'.
Since automatic logging is not always a Good Thing (especially if
people say things in different coding systems), you can turn logging
behavior on and off with the variable `erc-enable-logging', which can
also be a predicate function. To only log when you are not set away, use:
(setq erc-enable-logging
(lambda (buffer)
(with-current-buffer buffer
(null (erc-away-time)))))
(fn &optional ARG)
(defalias 'erc-log-mode #[256 "\302 \303\301\304=\203 \305\301!?\202! \247\203 \306W\203 \307\202! \310\"\210\311\300!\2038 \312\301\"\305\301!\2038 \301B \203B \313 \210\202E \314 \210\315\316\305\301!\203Q \317\202R \320\"\210\321\322!\203z \323\301!\210\302 \203j \211\302 \232\203z \324\325\305\301!\203v \326\202w \327\330#\210\210\331 \210\305\301!\207" [global-minor-modes erc-log-mode current-message set-default toggle default-value 1 nil t boundp delq erc-log-enable erc-log-disable run-hooks erc-log-mode-hook erc-log-mode-on-hook erc-log-mode-off-hook called-interactively-p any customize-mark-as-set message "Erc-Log mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 4888) (byte-code "\203\n \301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)])
(defvar erc-log-mode-hook nil)
(byte-code "\301\302N\204\f \303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205# \310\211%\207" [erc-log-mode-map erc-log-mode-hook variable-documentation put "Hook run after entering or leaving `erc-log-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode erc-log-mode boundp] 6)
#@22 Enable ERC log mode.
(defalias 'erc-log-enable #[0 "\303\304\305\"\210\306 \203 \307\310\311\"\210\n\203 \307\312\311\"\210\307\313\311\"\210\307\314\311\"\210\307\315\316\"\210\307\317\320\"\210\307\321\322\"\210\307\323\324\325#\210\326 \211\205K \211@\324!\210A\266\202\202: \207" [erc-log-mode erc-log-write-after-insert erc-log-write-after-send add-to-list erc-modules log t add-hook erc-insert-post-hook erc-save-buffer-in-logs erc-send-post-hook erc-kill-buffer-hook erc-kill-channel-hook kill-emacs-hook erc-log-save-all-buffers erc-quit-hook erc-conditional-save-queries erc-part-hook erc-conditional-save-buffer erc-connect-pre-hook erc-log-setup-logging append erc-buffer-list] 4 (#$ . 6968) nil])
#@23 Disable ERC log mode.
(defalias 'erc-log-disable #[0 "\302\303\"\304\305\306\307\"\210\305\310\307\"\210\305\311\307\"\210\305\312\307\"\210\305\313\314\"\210\305\315\316\"\210\305\317\320\"\210\305\321\322\"\210\323 \211\205B \211@\324!\210A\266\202\2021 \207" [erc-modules erc-log-mode delq log nil remove-hook erc-insert-post-hook erc-save-buffer-in-logs erc-send-post-hook erc-kill-buffer-hook erc-kill-channel-hook kill-emacs-hook erc-log-save-all-buffers erc-quit-hook erc-conditional-save-queries erc-part-hook erc-conditional-save-buffer erc-connect-pre-hook erc-log-setup-logging erc-buffer-list erc-log-disable-logging] 4 (#$ . 7688) nil])
(byte-code "\301\302\303\304#\210\301\305\303\304#\210\301\306\303\304#\210\307\310\311#\207" [erc-mode-map put erc-log-mode definition-name log erc-log-enable erc-log-disable define-key "\f" erc-save-buffer-in-logs] 4)
#@182 Setup the buffer-local logging variables in the current buffer.
This function is destined to be run from `erc-connect-pre-hook'.
The current buffer is given by BUFFER.
(fn BUFFER)
(defalias 'erc-log-setup-logging #[257 "\303!\2055 r\211q\210\304\305!\210\306\307\310\311\306\312$\210 \2054 \31312 \212eb\210\314\315 !\210)\ndS\306\2230\2024 \210\306)\207" [buffer-file-name erc-log-insert-log-on-open erc-last-saved-position erc-logging-enabled auto-save-mode -1 nil add-hook write-file-functions erc-save-buffer-in-logs t (error) insert-file-contents erc-current-logfile] 6 (#$ . 8572)])
#@41 Disable logging in BUFFER.
(fn BUFFER)
(defalias 'erc-log-disable-logging #[257 "\302!\205 r\211q\210\303\211\211)\207" [buffer-offer-save erc-enable-logging erc-logging-enabled nil] 4 (#$ . 9170)])
#@111 Return t if logging should be enabled in BUFFER.
Returns nil if `erc-server-buffer-p' returns t.
(fn BUFFER)
(defalias 'erc-log-all-but-server-buffers #[257 "\212\300 \301\302\"\216q\210\303 )?\262)\207" [current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] erc-server-buffer-p] 5 (#$ . 9381)])
#@54 Save all buffers of the given PROCESS.
(fn PROCESS)
(defalias 'erc-save-query-buffers #[257 "\300\301\"\207" [erc-buffer-filter #[0 "\300 \207" [erc-save-buffer-in-logs] 1]] 4 (#$ . 9728)])
#@68 Save Query BUFFER if `erc-save-queries-on-quit' is t.
(fn BUFFER)
(defalias 'erc-conditional-save-buffer #[257 "\205 \301!\207" [erc-save-buffer-on-part erc-save-buffer-in-logs] 3 (#$ . 9926)])
#@81 Save Query buffers of PROCESS if `erc-save-queries-on-quit' is t.
(fn PROCESS)
(defalias 'erc-conditional-save-queries #[257 "\205 \301!\207" [erc-save-queries-on-quit erc-save-query-buffers] 3 (#$ . 10130)])
(defalias 'erc-log-save-all-buffers #[0 "\300 \211\205 \211@\301!\210A\266\202\202 \207" [erc-buffer-list erc-save-buffer-in-logs] 4])
#@303 Return non-nil if logging is enabled for BUFFER.
If BUFFER is nil, the value of `current-buffer' is used.
Logging is enabled if `erc-log-channels-directory' is non-nil, the directory
is writable (it will be created as necessary) and
`erc-enable-logging' returns a non-nil value.
(fn &optional BUFFER)
(defalias 'erc-logging-enabled #[256 "\211\204 p\262\205% \302!\204 \303!\205% \302 !\203! !\207\304\301\"\207" [erc-log-channels-directory erc-enable-logging functionp erc-directory-writable-p buffer-local-value] 4 (#$ . 10489)])
#@203 Make FILENAME safe to use as the name of an ERC log.
This will not work with full paths, only names.
Any unsafe characters in the name are replaced with "!". The
filename is downcased.
(fn FILENAME)
(defalias 'erc-log-standardize-name #[257 "\300\301\302\303!#\227\207" [replace-regexp-in-string "[/\\]" "!" convert-standard-filename] 6 (#$ . 11038)])
#@246 Return the logfile to use for BUFFER.
If BUFFER is nil, the value of `current-buffer' is used.
This is determined by `erc-generate-log-file-name-function'.
The result is converted to lowercase, as IRC is case-insensitive.
(fn &optional BUFFER)
(defalias 'erc-current-logfile #[256 "\211\204 p\262r\211q\210\304!\206 \305 \306 \307\310\n%!\311!\203; %\202<