Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: semi-gnus-ja@meadowy.org
Subject: Re: gnus-agent-read-local
Date: Mon, 29 May 2006 10:13:01 +0900	[thread overview]
Message-ID: <b4mu079y6oy.fsf@jpl.org> (raw)
In-Reply-To: <u7j49jaz2.fsf@ybb.ne.jp>

Hi,

YAGI Tatsuya reported that there is a bug in the
`gnus-agent-read-local' function.  When it reads a
"~/News/agent/BACKEND/SERVER/agent.lib/local" file, many group
names listed in that file will be bound as global symbols.  For
instance, if the file contains the following entry,

gnu\.emacs\.gnus 1234 5678

the variable `gnu\.emacs\.gnus' will be bound globally and set
to the value `(1234 . 5678)'.  As long as I understand, all such
symbols should be in the private obarray.  Actually, the code
will do so if the first element of each entry is a string.
However, it doesn't, since all they are now just symbols.
Here's an extract of the `gnus-agent-read-local' function:

--8<---------------cut here---------------start------------->8---
              (setq group (read cur)
                    min (read cur)
                    max (read cur))

              (when (stringp group)
                (setq group (intern group my-obarray)))

              ;; NOTE: The '+ 0' ensure that min and max are both numerics.
              (set group (cons (+ 0 min) (+ 0 max)))
--8<---------------cut here---------------end--------------->8---

I think the middle part should be replaced with

--8<---------------cut here---------------start------------->8---
	      (if (stringp group)
		  (setq group (intern group my-obarray))
		(setq group (intern (symbol-name group) my-obarray)))
--8<---------------cut here---------------end--------------->8---

or simply with

--8<---------------cut here---------------start------------->8---
	      (setq group (intern (symbol-name group) my-obarray))
--8<---------------cut here---------------end--------------->8---

However, I'm not sure the other functions work correctly
assuming those variables are the ones in the private obarray,
not global variables.  Could anyone fix this properly?

Regards,


       reply	other threads:[~2006-05-29  1:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <u7j49jaz2.fsf@ybb.ne.jp>
2006-05-29  1:13 ` Katsumi Yamaoka [this message]
2006-05-29 14:01 gnus-agent-read-local Kevin Greiner
2006-05-29 14:27 ` gnus-agent-read-local Katsumi Yamaoka
2006-05-29 16:39 gnus-agent-read-local Kevin Greiner

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=b4mu079y6oy.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=semi-gnus-ja@meadowy.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).