[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 19 Nov 2021 15:29:08 +0100
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
> I agree that more easily recalling previously sent input
> would improve interactions with bots and services. But what
> about something more general, like commands resembling
> from simple.el?
> Folks are already used to these interfaces, and many analogs
> exist across the Emacs universe and without as well (think
> readline's reverse-search-history and
> history-search-backward, for example).
You mean like this?
;;; -*- lexical-binding: t -*-
;;; this file:
;; improved by Felix Dietrich
(defun erc-cmd-R (&optional n)
"Resend the most recent or Nth `erc' message/command.
The most recent message, the default, has index N = 0."
(let ((num (or (and n (string-to-number n)) 0)))
(if (and erc-input-ring
(< (1+ num) (ring-length erc-input-ring)) )
(ring-remove erc-input-ring 0)
(erc-send-input (ring-ref erc-input-ring num))
(ring-remove erc-input-ring 0) )
(message "No data") )))
underground experts united
- repeat, Emanuel Berg, 2021/11/11
- Re: repeat, J.P., 2021/11/19
- Re: repeat,
Emanuel Berg <=