unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch to fix ERC mode's IRC protocol logging
@ 2010-07-19 17:19 Fran Litterio
  2010-07-19 23:21 ` Deniz Dogan
  0 siblings, 1 reply; 6+ messages in thread
From: Fran Litterio @ 2010-07-19 17:19 UTC (permalink / raw)
  To: emacs-devel

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 interactively
toggle protocol logging so that it doesn't interfere with View mode bindings.
--
Fran


--- lisp/erc/erc.el~    2010-07-15 12:10:04.000000000 -0400
+++ lisp/erc/erc.el    2010-07-19 13:06:51.656250000 -0400
@@ -2306,14 +2306,14 @@
       (insert (erc-make-notice "This buffer displays all IRC protocol
traffic exchanged with each server.\n"))
       (insert (erc-make-notice "Kill this buffer to terminate
protocol logging.\n\n")))
     (use-local-map (make-sparse-keymap))
-    (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol))
+    (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
       (add-hook 'kill-buffer-hook
         #'(lambda () (setq erc-debug-irc-protocol nil))
         nil 'local)
       (goto-char (point-max))
       (let ((inhibit-read-only t))
     (insert (erc-make-notice
-         (format "IRC protocol logging %s at %s -- Press ENTER to
toggle logging.\n"
+         (format "IRC protocol logging %s at %s -- Press 't' to
toggle logging.\n"
              (if erc-debug-irc-protocol "disabled" "enabled")
              (current-time-string))))))
     (setq erc-debug-irc-protocol (not erc-debug-irc-protocol))



--- lisp/erc/erc-backend.el~    2010-07-15 12:10:04.000000000 -0400
+++ lisp/erc/erc-backend.el    2010-07-19 13:06:49.234375000 -0400
@@ -574,6 +574,7 @@
                       nil
                     (substring erc-server-filter-data
                                (match-end 0))))
+            (erc-log-irc-protocol line nil)
             (erc-parse-server-response process line)))))))

 (defsubst erc-server-reconnect-p (event)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch to fix ERC mode's IRC protocol logging
  2010-07-19 17:19 Patch to fix ERC mode's IRC protocol logging Fran Litterio
@ 2010-07-19 23:21 ` Deniz Dogan
  0 siblings, 0 replies; 6+ messages in thread
From: Deniz Dogan @ 2010-07-19 23:21 UTC (permalink / raw)
  To: Fran Litterio; +Cc: emacs-devel

2010/7/19 Fran Litterio <flitterio@gmail.com>:
> 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 interactively
> toggle protocol logging so that it doesn't interfere with View mode bindings.
> --
> Fran
>
>
> --- lisp/erc/erc.el~    2010-07-15 12:10:04.000000000 -0400
> +++ lisp/erc/erc.el    2010-07-19 13:06:51.656250000 -0400
> @@ -2306,14 +2306,14 @@
>        (insert (erc-make-notice "This buffer displays all IRC protocol
> traffic exchanged with each server.\n"))
>        (insert (erc-make-notice "Kill this buffer to terminate
> protocol logging.\n\n")))
>      (use-local-map (make-sparse-keymap))
> -    (local-set-key (kbd "RET") 'erc-toggle-debug-irc-protocol))
> +    (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
>        (add-hook 'kill-buffer-hook
>          #'(lambda () (setq erc-debug-irc-protocol nil))
>          nil 'local)
>        (goto-char (point-max))
>        (let ((inhibit-read-only t))
>      (insert (erc-make-notice
> -         (format "IRC protocol logging %s at %s -- Press ENTER to
> toggle logging.\n"
> +         (format "IRC protocol logging %s at %s -- Press 't' to
> toggle logging.\n"
>               (if erc-debug-irc-protocol "disabled" "enabled")
>               (current-time-string))))))
>      (setq erc-debug-irc-protocol (not erc-debug-irc-protocol))
>
>
>
> --- lisp/erc/erc-backend.el~    2010-07-15 12:10:04.000000000 -0400
> +++ lisp/erc/erc-backend.el    2010-07-19 13:06:49.234375000 -0400
> @@ -574,6 +574,7 @@
>                        nil
>                      (substring erc-server-filter-data
>                                 (match-end 0))))
> +            (erc-log-irc-protocol line nil)
>              (erc-parse-server-response process line)))))))
>
>  (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.

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch to fix ERC mode's IRC protocol logging
@ 2010-07-20  2:55 Francis Litterio
  2010-07-20  3:22 ` Deniz Dogan
  0 siblings, 1 reply; 6+ messages in thread
From: Francis Litterio @ 2010-07-20  2:55 UTC (permalink / raw)
  To: emacs-devel; +Cc: deniz.a.m.dogan

Deniz Dogan wrote:

> 2010/7/19 Fran Litterio:
> > 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 interactively
> > toggle protocol logging so that it doesn't interfere with View mode bindings.

> Thank you! You should probably also send it to erc-discuss <at> gnu.org in
> case the ERC mantainer doesn't read emacs-devel.

Do patches for ERC have to go into the upstream ERC source first in
order to make it into Emacs?  I thought that since ERC was now part of
Emacs, patches can go directly into the Emacs source.
--
Fran



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch to fix ERC mode's IRC protocol logging
  2010-07-20  2:55 Francis Litterio
@ 2010-07-20  3:22 ` Deniz Dogan
  2010-08-04 17:27   ` Michael Olson
  0 siblings, 1 reply; 6+ messages in thread
From: Deniz Dogan @ 2010-07-20  3:22 UTC (permalink / raw)
  To: Francis Litterio; +Cc: emacs-devel

2010/7/20 Francis Litterio <flitterio@gmail.com>:
> Deniz Dogan wrote:
>
>> 2010/7/19 Fran Litterio:
>> > 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 interactively
>> > toggle protocol logging so that it doesn't interfere with View mode bindings.
>
>> Thank you! You should probably also send it to erc-discuss <at> gnu.org in
>> case the ERC mantainer doesn't read emacs-devel.
>
> Do patches for ERC have to go into the upstream ERC source first in
> order to make it into Emacs?  I thought that since ERC was now part of
> Emacs, patches can go directly into the Emacs source.

I guess I have the same understanding as you, but it may be more
likely that you receive more feedback on the patch from erc-discuss.

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch to fix ERC mode's IRC protocol logging
  2010-07-20  3:22 ` Deniz Dogan
@ 2010-08-04 17:27   ` Michael Olson
  2010-08-08 22:14     ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olson @ 2010-08-04 17:27 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: ERC Discussion, Francis Litterio, emacs-devel

The patch looks good to me.  I'd say check it into Emacs (if you
haven't already done so) and send a courtesy copy to erc-discuss for
future patches.  The version of ERC in Emacs is probably going to be
the most canonical going forward, since it's the easiest to commit
changes to.

On Mon, Jul 19, 2010 at 8:22 PM, Deniz Dogan <deniz.a.m.dogan@gmail.com> wrote:
> 2010/7/20 Francis Litterio <flitterio@gmail.com>:
>> Deniz Dogan wrote:
>>
>>> 2010/7/19 Fran Litterio:
>>> > 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 interactively
>>> > toggle protocol logging so that it doesn't interfere with View mode bindings.
>>
>>> Thank you! You should probably also send it to erc-discuss <at> gnu.org in
>>> case the ERC mantainer doesn't read emacs-devel.
>>
>> Do patches for ERC have to go into the upstream ERC source first in
>> order to make it into Emacs?  I thought that since ERC was now part of
>> Emacs, patches can go directly into the Emacs source.
>
> I guess I have the same understanding as you, but it may be more
> likely that you receive more feedback on the patch from erc-discuss.
>
> --
> Deniz Dogan
>
>



-- 
Michael Olson  |  http://mwolson.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Patch to fix ERC mode's IRC protocol logging
  2010-08-04 17:27   ` Michael Olson
@ 2010-08-08 22:14     ` Chong Yidong
  0 siblings, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2010-08-08 22:14 UTC (permalink / raw)
  To: Michael Olson; +Cc: ERC Discussion, emacs-devel, Francis Litterio, Deniz Dogan

Michael Olson <mwolson@gnu.org> writes:

> The patch looks good to me.  I'd say check it into Emacs (if you
> haven't already done so) and send a courtesy copy to erc-discuss for
> future patches.  The version of ERC in Emacs is probably going to be
> the most canonical going forward, since it's the easiest to commit
> changes to.

I've checked the patch into the trunk.  Thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-08 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-19 17:19 Patch to fix ERC mode's IRC protocol logging Fran Litterio
2010-07-19 23:21 ` Deniz Dogan
  -- strict thread matches above, loose matches on Subject: below --
2010-07-20  2:55 Francis Litterio
2010-07-20  3:22 ` Deniz Dogan
2010-08-04 17:27   ` Michael Olson
2010-08-08 22:14     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).