From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.devel Subject: Re: Patch to fix ERC mode's IRC protocol logging Date: Tue, 20 Jul 2010 01:21:26 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1279581733 6711 80.91.229.12 (19 Jul 2010 23:22:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Jul 2010 23:22:13 +0000 (UTC) Cc: emacs-devel To: Fran Litterio Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 20 01:22:11 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oazex-0000pH-4J for ged-emacs-devel@m.gmane.org; Tue, 20 Jul 2010 01:22:07 +0200 Original-Received: from localhost ([127.0.0.1]:40891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oazew-000756-Ew for ged-emacs-devel@m.gmane.org; Mon, 19 Jul 2010 19:22:06 -0400 Original-Received: from [140.186.70.92] (port=48081 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oazeq-00074t-9Z for emacs-devel@gnu.org; Mon, 19 Jul 2010 19:22:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oazep-0000CV-5P for emacs-devel@gnu.org; Mon, 19 Jul 2010 19:22:00 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:48832) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oazep-0000CI-1Q for emacs-devel@gnu.org; Mon, 19 Jul 2010 19:21:59 -0400 Original-Received: by wwb17 with SMTP id 17so797413wwb.30 for ; Mon, 19 Jul 2010 16:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=AJxZKocgk7aG6YK7N3ZDA93g8xYZLTIaAreMMy3Rs6k=; b=wT75/wRHG49IhSaBOj7aV8/HU7sYdMyYlsJinDnMEWDad8A0wy1tdgQ7gygzRa4oOW uXW3FzDqIUFJwa1pM75mrIFpCc68w1edUBpUoBL4s7HV1MufdDhQOCh6d0CIrh6I8FPw kv4HYcy0/lJMjWlMdPVTDAGUyo1C1NI6xEUHM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=CSETM4WwKOzqoK4UURSOgIfjAp5k7M4ToFiDUMINQmx+SSn6sygchbJK/N2/caKvms IA7x41KtN+GNHnqF73eUDjbZoIzlUqFDlYrdhXpjUpsJwOl6t1xvfX2lTgLZzz9k3hbP Rr8FeoS68+pXjqSAmrs4Pbk0+VLgSbrk5birw= Original-Received: by 10.216.1.208 with SMTP id 58mr4544234wed.22.1279581717219; Mon, 19 Jul 2010 16:21:57 -0700 (PDT) Original-Received: by 10.216.175.76 with HTTP; Mon, 19 Jul 2010 16:21:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127592 Archived-At: 2010/7/19 Fran Litterio : > The below patch fixes a problem in ERC where erc-toggle-debug-irc-protoco= l > was not logging inbound protocol data. It also changes the key to interac= tively > toggle protocol logging so that it doesn't interfere with View mode bindi= ngs. > -- > Fran > > > --- lisp/erc/erc.el~=A0=A0=A0 2010-07-15 12:10:04.000000000 -0400 > +++ lisp/erc/erc.el=A0=A0=A0 2010-07-19 13:06:51.656250000 -0400 > @@ -2306,14 +2306,14 @@ > =A0=A0=A0=A0 =A0 (insert (erc-make-notice "This buffer displays all IRC p= rotocol > traffic exchanged with each server.\n")) > =A0=A0=A0=A0 =A0 (insert (erc-make-notice "Kill this buffer to terminate > protocol logging.\n\n"))) > =A0=A0=A0=A0 (use-local-map (make-sparse-keymap)) > -=A0=A0=A0 (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol)) > +=A0=A0=A0 (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol)) > =A0=A0=A0=A0=A0=A0 (add-hook 'kill-buffer-hook > =A0=A0=A0=A0 =A0=A0=A0 #'(lambda () (setq erc-debug-irc-protocol nil)) > =A0=A0=A0=A0 =A0=A0=A0 nil 'local) > =A0=A0=A0=A0=A0=A0 (goto-char (point-max)) > =A0=A0=A0=A0=A0=A0 (let ((inhibit-read-only t)) > =A0=A0=A0=A0 (insert (erc-make-notice > -=A0=A0=A0 =A0=A0=A0 =A0(format "IRC protocol logging %s at %s -- Press E= NTER to > toggle logging.\n" > +=A0=A0=A0 =A0=A0=A0 =A0(format "IRC protocol logging %s at %s -- Press '= t' to > toggle logging.\n" > =A0=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0(if erc-debug-irc-protocol "disabled"= "enabled") > =A0=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0(current-time-string)))))) > =A0=A0=A0=A0 (setq erc-debug-irc-protocol (not erc-debug-irc-protocol)) > > > > --- lisp/erc/erc-backend.el~=A0=A0=A0 2010-07-15 12:10:04.000000000 -0400 > +++ lisp/erc/erc-backend.el=A0=A0=A0 2010-07-19 13:06:49.234375000 -0400 > @@ -574,6 +574,7 @@ > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 nil > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (substring e= rc-server-filter-data > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 (match-end 0)))) > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (erc-log-irc-protocol line nil) > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (erc-parse-server-response process l= ine))))))) > > =A0(defsubst erc-server-reconnect-p (event) > > Thank you! You should probably also send it to erc-discuss@gnu.org in case the ERC mantainer doesn't read emacs-devel. --=20 Deniz Dogan