aboutsummaryrefslogtreecommitdiff
path: root/modules/erc-config.el
diff options
context:
space:
mode:
Diffstat (limited to 'modules/erc-config.el')
-rw-r--r--modules/erc-config.el37
1 files changed, 18 insertions, 19 deletions
diff --git a/modules/erc-config.el b/modules/erc-config.el
index 067b1e577..c89e46bb3 100644
--- a/modules/erc-config.el
+++ b/modules/erc-config.el
@@ -184,6 +184,14 @@ Auto-adds # prefix if missing. Offers completion from configured channels."
(erc-join-channel channel)))
(message "Failed to establish an active ERC connection")))
+(defun cj/erc-generate-buffer-name (parms)
+ "Generate buffer name in the format SERVER-CHANNEL."
+ (let ((network (plist-get parms :server))
+ (target (plist-get parms :target)))
+ (if target
+ (concat (or network "") "-" (or target ""))
+ (or network ""))))
+
;; Keymap for ERC commands (must be defined before use-package erc)
(defvar-keymap cj/erc-keymap
:doc "Keymap for ERC-related commands"
@@ -259,15 +267,7 @@ Auto-adds # prefix if missing. Offers completion from configured channels."
;; Note: erc-rename-buffers is obsolete as of Emacs 29.1 (old behavior is now permanent)
(setq erc-unique-buffers t)
- ;; Custom buffer naming function
- (defun cj/erc-generate-buffer-name (parms)
- "Generate buffer name in the format SERVER-CHANNEL."
- (let ((network (plist-get parms :server))
- (target (plist-get parms :target)))
- (if target
- (concat (or network "") "-" (or target ""))
- (or network ""))))
-
+ ;; Custom buffer naming (cj/erc-generate-buffer-name is defined at top level)
(setq erc-generate-buffer-name-function 'cj/erc-generate-buffer-name)
;; Configure erc-track (show channel activity in modeline)
@@ -338,16 +338,15 @@ NICK is the sender and MESSAGE is the message text."
:after erc
:hook (erc-mode . erc-nicks-mode))
-;; ------------------------------ ERC Yank To Gist -----------------------------
-;; automatically create a Gist if pasting more than 5 lines
-;; this module requires https://github.com/defunkt/gist
-;; via ruby: 'gem install gist' via the aur: yay -S gist
-
-(use-package erc-yank
- :after erc
- :bind
- (:map erc-mode-map
- ("C-y" . erc-yank)))
+;; -------------------------------- ERC Yank ----------------------------------
+;; The erc-yank package was dropped 2026-06-20: a paste over 5 lines became a
+;; PUBLIC gist (it called `gist -P', the clipboard paste flag, with no
+;; `--private'), behind only a single y-or-n-p and with no guard if the `gist'
+;; binary was absent -- a one-keystroke path to publishing whatever sat on the
+;; system clipboard. No replacement binding is needed: erc-mode-map defines no
+;; C-y of its own, so with erc-yank gone C-y falls through to the ordinary
+;; global `yank' and a paste stays local. Gist a large snippet by hand when
+;; that's actually wanted.
(provide 'erc-config)
;;; erc-config.el ends here