irc - new log file name format
This commit is contained in:
parent
96838736fc
commit
6dfa70b1d8
|
@ -26,11 +26,29 @@
|
||||||
("oftc" "#debian-next")))
|
("oftc" "#debian-next")))
|
||||||
|
|
||||||
(with-eval-after-load 'erc
|
(with-eval-after-load 'erc
|
||||||
|
(defun cp-erc-generate-log-file-name (buffer target nick server port)
|
||||||
|
"Generates a log-file name using only the channel and network
|
||||||
|
names rather than server name. This results in a file name of the
|
||||||
|
form irc.NETWORK.#CHANNEL.erclog. This function is a possible
|
||||||
|
value for `erc-generate-log-file-name-function'."
|
||||||
|
(require 'erc-networks)
|
||||||
|
(let ((file (concat
|
||||||
|
(erc-compute-server)
|
||||||
|
;; "irc."
|
||||||
|
;; (or (with-current-buffer buffer (erc-network-name)) server)
|
||||||
|
;; (if target (concat target "!"))
|
||||||
|
"."
|
||||||
|
target
|
||||||
|
".erclog")))
|
||||||
|
;; we need a make-safe-file-name function.
|
||||||
|
(convert-standard-filename file)))
|
||||||
|
|
||||||
(setq ;; erc-default-coding-system 'utf-8
|
(setq ;; erc-default-coding-system 'utf-8
|
||||||
erc-password "trololo_trololo"
|
erc-password "trololo_trololo"
|
||||||
erc-fill-mode nil
|
erc-fill-mode nil
|
||||||
|
|
||||||
erc-generate-log-file-name-function 'erc-generate-log-file-name-network
|
erc-generate-log-file-name-function 'cp-erc-generate-log-file-name
|
||||||
|
;; erc-generate-log-file-name-function 'erc-generate-log-file-name-network
|
||||||
erc-log-channels-directory "~/.emacs.d/erc/logs/"
|
erc-log-channels-directory "~/.emacs.d/erc/logs/"
|
||||||
erc-log-mode t
|
erc-log-mode t
|
||||||
erc-save-buffer-on-part nil
|
erc-save-buffer-on-part nil
|
||||||
|
@ -106,8 +124,10 @@
|
||||||
"font-lock-comment-face")
|
"font-lock-comment-face")
|
||||||
(highlight-lines-matching-regexp "^\*\*\*.*\(join\|quit\|part\)"
|
(highlight-lines-matching-regexp "^\*\*\*.*\(join\|quit\|part\)"
|
||||||
"font-lock-comment-face"))
|
"font-lock-comment-face"))
|
||||||
|
;; (add-to-list 'auto-mode-alist
|
||||||
|
;; (cons "/erc/logs/" 'erc-log-read-mode))
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
(cons "/erc/logs/" 'erc-log-read-mode))
|
(cons ".erclog$" 'erc-log-read-mode))
|
||||||
|
|
||||||
(with-eval-after-load 'rcirc
|
(with-eval-after-load 'rcirc
|
||||||
(setq
|
(setq
|
||||||
|
@ -124,3 +144,6 @@
|
||||||
rcirc-default-nick "contrapunctus"
|
rcirc-default-nick "contrapunctus"
|
||||||
;; rcirc-coding-system-alist '(("" . 'utf-8))
|
;; rcirc-coding-system-alist '(("" . 'utf-8))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
;; TODO
|
||||||
|
;; open log file for current channel
|
||||||
|
|
Loading…
Reference in New Issue
Block a user