Gnus development mailing list
 help / color / mirror / Atom feed
* nntp-record-commands is named badly; nnbackend-debug is needed
@ 2011-05-18 10:33 Ted Zlatanov
  2011-05-18 21:01 ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-05-18 10:33 UTC (permalink / raw)
  To: ding

`nntp-record-commands' should be called "nntp-debug" or "nntp-verbose"
similar to the other backends.

In fact all the backends should have a nnbackend-debug nnvoo variable
and respect it uniformly.  Right now that's done per backend which leads
to the situation above.  But it should also work for mail-sources, how
would that work?

Let me know if this makes sense and what I can do to implement it.

Ted




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-18 10:33 nntp-record-commands is named badly; nnbackend-debug is needed Ted Zlatanov
@ 2011-05-18 21:01 ` Ted Zlatanov
  2011-05-30 18:31   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-05-18 21:01 UTC (permalink / raw)
  To: ding

On Wed, 18 May 2011 05:33:06 -0500 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> `nntp-record-commands' should be called "nntp-debug" or "nntp-verbose"
TZ> similar to the other backends.

TZ> In fact all the backends should have a nnbackend-debug nnvoo variable
TZ> and respect it uniformly.  Right now that's done per backend which leads
TZ> to the situation above.  But it should also work for mail-sources, how
TZ> would that work?

TZ> Let me know if this makes sense and what I can do to implement it.

How about a `gnus-network-debug' variable that is a list of '(imap nntp)
for instance?  Here's a working macro.

#+begin_src lisp
(defvar gnus-network-debug '(nntp))

(defmacro nnoo-debug (token text &rest arguments)
  `(when (memq ',token gnus-network-debug)
     (with-current-buffer (get-buffer-create ,(format "*%s-debug*" token))
       (insert (format ,text ,@arguments)))))

(defmacro nntp-debug (text &rest arguments)
  `(nnoo-debug nntp ,text ,@arguments))

(defmacro nnimap-debug (text &rest arguments)
  `(nnoo-debug nnimap ,text ,@arguments))

(nntp-debug "hello\n")

#+end_src

I think that's much better than the current "hunt for *-debug variables
all over the place" setup.

Ted




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-18 21:01 ` Ted Zlatanov
@ 2011-05-30 18:31   ` Lars Magne Ingebrigtsen
  2011-05-31  9:47     ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-30 18:31 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> TZ> `nntp-record-commands' should be called "nntp-debug" or "nntp-verbose"
> TZ> similar to the other backends.

True.  I think it's called that for hysterical raisins. 

> How about a `gnus-network-debug' variable that is a list of '(imap nntp)
> for instance?  Here's a working macro.

Wouldn't just renaming the variable to `nntp-debug' be easier?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-30 18:31   ` Lars Magne Ingebrigtsen
@ 2011-05-31  9:47     ` Ted Zlatanov
  2011-05-31 18:53       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-05-31  9:47 UTC (permalink / raw)
  To: ding

On Mon, 30 May 2011 20:31:09 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
TZ> `nntp-record-commands' should be called "nntp-debug" or "nntp-verbose"
TZ> similar to the other backends.

LMI> True.  I think it's called that for hysterical raisins. 

>> How about a `gnus-network-debug' variable that is a list of '(imap nntp)
>> for instance?  Here's a working macro.

LMI> Wouldn't just renaming the variable to `nntp-debug' be easier?

I am trying to avoid the annoyance of having a *-debug variable for each
backend.  My debug macro IMHO is an improvement over the current
approach of "do whatever debugging, however you want" and is analogous
to how `gnus-message' improves messaging for Gnus.

Ted




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-31  9:47     ` Ted Zlatanov
@ 2011-05-31 18:53       ` Lars Magne Ingebrigtsen
  2011-05-31 19:22         ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-31 18:53 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> I am trying to avoid the annoyance of having a *-debug variable for each
> backend.  My debug macro IMHO is an improvement over the current
> approach of "do whatever debugging, however you want" and is analogous
> to how `gnus-message' improves messaging for Gnus.

There's also some value to keeping things simple.  The backend debugging
stuff isn't as pervasive as the `gnus-message' stuff, I think.

And the `gnus-message' thing is meant to be tweaked by the user, while
the debug thing isn't...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-31 18:53       ` Lars Magne Ingebrigtsen
@ 2011-05-31 19:22         ` Ted Zlatanov
  2011-05-31 19:27           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Ted Zlatanov @ 2011-05-31 19:22 UTC (permalink / raw)
  To: ding

On Tue, 31 May 2011 20:53:18 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I am trying to avoid the annoyance of having a *-debug variable for each
>> backend.  My debug macro IMHO is an improvement over the current
>> approach of "do whatever debugging, however you want" and is analogous
>> to how `gnus-message' improves messaging for Gnus.

LMI> There's also some value to keeping things simple.  The backend debugging
LMI> stuff isn't as pervasive as the `gnus-message' stuff, I think.

True, but it's badly named and scattered all over the place as it is.
Do you think the situation will get better over time?  I doubt it.

LMI> And the `gnus-message' thing is meant to be tweaked by the user, while
LMI> the debug thing isn't...

Every time someone has a bug report, we say "turn xyz-debug on, then..."
so obviously it's important to make it as easy as possible.  It will
help the users and the developers to have just one variable to customize
instead of 5 or so.

Ted




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-31 19:22         ` Ted Zlatanov
@ 2011-05-31 19:27           ` Lars Magne Ingebrigtsen
  2011-05-31 19:41             ` Ted Zlatanov
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-05-31 19:27 UTC (permalink / raw)
  To: ding

Ted Zlatanov <tzz@lifelogs.com> writes:

> Every time someone has a bug report, we say "turn xyz-debug on, then..."
> so obviously it's important to make it as easy as possible. 

Yeah, that's true.

Please go ahead and add the infrastructure you described.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

* Re: nntp-record-commands is named badly; nnbackend-debug is needed
  2011-05-31 19:27           ` Lars Magne Ingebrigtsen
@ 2011-05-31 19:41             ` Ted Zlatanov
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Zlatanov @ 2011-05-31 19:41 UTC (permalink / raw)
  To: ding

On Tue, 31 May 2011 21:27:10 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Every time someone has a bug report, we say "turn xyz-debug on, then..."
>> so obviously it's important to make it as easy as possible. 

LMI> Yeah, that's true.

LMI> Please go ahead and add the infrastructure you described.

Damn it.  I hate it when I make work for myself.

Ted




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

end of thread, other threads:[~2011-05-31 19:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 10:33 nntp-record-commands is named badly; nnbackend-debug is needed Ted Zlatanov
2011-05-18 21:01 ` Ted Zlatanov
2011-05-30 18:31   ` Lars Magne Ingebrigtsen
2011-05-31  9:47     ` Ted Zlatanov
2011-05-31 18:53       ` Lars Magne Ingebrigtsen
2011-05-31 19:22         ` Ted Zlatanov
2011-05-31 19:27           ` Lars Magne Ingebrigtsen
2011-05-31 19:41             ` Ted Zlatanov

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 NNTP newsgroup(s).