From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fran Litterio Newsgroups: gmane.emacs.devel Subject: Patch to fix ERC mode's IRC protocol logging Date: Mon, 19 Jul 2010 13:19:01 -0400 Message-ID: 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 1279559952 30795 80.91.229.12 (19 Jul 2010 17:19:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Jul 2010 17:19:12 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 19 19:19:10 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 1Oatzi-0005yY-28 for ged-emacs-devel@m.gmane.org; Mon, 19 Jul 2010 19:19:10 +0200 Original-Received: from localhost ([127.0.0.1]:47066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oatzh-0004T9-CR for ged-emacs-devel@m.gmane.org; Mon, 19 Jul 2010 13:19:09 -0400 Original-Received: from [140.186.70.92] (port=51609 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oatzc-0004SE-BA for emacs-devel@gnu.org; Mon, 19 Jul 2010 13:19:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oatzb-0002cf-AG for emacs-devel@gnu.org; Mon, 19 Jul 2010 13:19:04 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:63754) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oatzb-0002cT-7D for emacs-devel@gnu.org; Mon, 19 Jul 2010 13:19:03 -0400 Original-Received: by iwn2 with SMTP id 2so6129615iwn.0 for ; Mon, 19 Jul 2010 10:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=BOehHmQpv8/zKFDQcpN/TiimlFefXzDd7aXZIzXhSxs=; b=sNwhTPDGbbSLBeXiKeYkiEJHXqXEYaw4v4lZsKkg4Dsp+WeoCm4AR5JppiTOyb4ErQ gAnqJtTZSFr+HiKLtjMa5GAP7t2xUz9IIQHK2+M+mEYu69SylVCphTbYEPPZ6SvBH8kv ZUe/b1ChAHXyg7/NQBLDhp4rCKSksLKAKz6F8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=QJUEvcHKCVX1bFKf/l+hk8/yguZ8/73BCKKzVeg2tqiYKPnwavBqBq2kQ/uCOV5AJ/ 7mE1ITtk5diqIJlV7M8Gqxq4nQ5SkS6xmD3qU9uN/5CM4zpDRlGeNc6JcdAR0MNFoSMO nE1hwHmNz7jxjJurQNZL4WK2Tc9XYrPDqydIo= Original-Received: by 10.231.157.212 with SMTP id c20mr5546556ibx.186.1279559941530; Mon, 19 Jul 2010 10:19:01 -0700 (PDT) Original-Received: by 10.231.154.203 with HTTP; Mon, 19 Jul 2010 10:19:01 -0700 (PDT) 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:127583 Archived-At: The below patch fixes a problem in ERC where erc-toggle-debug-irc-protocol was not logging inbound protocol data. It also changes the key to interacti= vely toggle protocol logging so that it doesn't interfere with View mode binding= s. -- 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 pro= tocol 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 ENT= ER 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 erc= -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 lin= e))))))) =A0(defsubst erc-server-reconnect-p (event)