Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: nntp-record-commands is named badly; nnbackend-debug is needed
Date: Wed, 18 May 2011 16:01:44 -0500	[thread overview]
Message-ID: <87hb8r3epz.fsf@lifelogs.com> (raw)
In-Reply-To: <87oc30cn8d.fsf@lifelogs.com>

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




  reply	other threads:[~2011-05-18 21:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 10:33 Ted Zlatanov
2011-05-18 21:01 ` Ted Zlatanov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hb8r3epz.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).