From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help,gmane.emacs.erc.general,gmane.emacs.devel Subject: ERC custom ERC command reloaded Date: Wed, 20 Mar 2019 06:21:41 +0100 Message-ID: <86bm266ryy.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="169434"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cc: erc-discuss@gnu.org, emacs-devel@gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 20 06:26:53 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6TkY-000hwG-CQ for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Mar 2019 06:26:50 +0100 Original-Received: from localhost ([127.0.0.1]:43105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6TkX-0003D8-9d for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Mar 2019 01:26:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6TkJ-0003C7-8K for help-gnu-emacs@gnu.org; Wed, 20 Mar 2019 01:26:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Tfk-0001tv-SH for help-gnu-emacs@gnu.org; Wed, 20 Mar 2019 01:21:53 -0400 Original-Received: from [195.159.176.226] (port=35594 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6Tfk-0001pG-J3 for help-gnu-emacs@gnu.org; Wed, 20 Mar 2019 01:21:52 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h6Tfg-000cqU-GW for help-gnu-emacs@gnu.org; Wed, 20 Mar 2019 06:21:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Followup-To: gmane.emacs.help Mail-Copies-To: never Cancel-Lock: sha1:4VdrDTEF4FaaQpL7420F8QBxgzM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119693 gmane.emacs.erc.general:1469 gmane.emacs.devel:234392 Archived-At: On gnu.emacs.help, Felix Dietrich wrote: > Anyway, here is my take on your “erc-cmd-R” function: > > (defun erc-cmd-R () > "Repeat the last message or command." > (if (and erc-input-ring > ; >1 because the /r command will have been put on the > ; ring. > (> (ring-length erc-input-ring) 1)) > (progn > (ring-remove erc-input-ring 0) ; Remove the /r command > (erc-send-input (ring-ref erc-input-ring 0)) > ; Do not put the command just send on ERC's input ring > ; again. > (ring-remove erc-input-ring 0)) > (message "ERC: No previous command or message to repeat"))) Great, only now it is as much your function as it is/was mine. I now use this version in my source as well [1]. You are perhaps unaware of this (because of the br0ken gateway between the listbot and the Usenet newsgroup), but ERC custom commands was recently discussed on gmane.emacs.help and gmane.emacs.erc.general and I think even on gmane.emacs.devel, and they deserve to hear about your much improved version of my prototype. So I will send a copy of this post to them newsgroups as well. BTW this should enter ERC! [1] line 10 @ http://user.it.uu.se/~embe8573/emacs-init/erc-my.el -- underground experts united http://user.it.uu.se/~embe8573