* Re: gnus-agent-read-local
@ 2006-05-29 16:39 Kevin Greiner
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Greiner @ 2006-05-29 16:39 UTC (permalink / raw)
Cc: semi-gnus-ja
Done.
---------- Original Message ----------------------------------
From: Katsumi Yamaoka <yamaoka@jpl.org>
Date: Mon, 29 May 2006 23:27:04 +0900
>>>>>> In <200605290901.AA34537584@mail.ev1.net>
>>>>>> "Kevin Greiner" <kevin.greiner@compsol.cc> wrote:
>
>> Binding obarray to my-obarray while calling read will avoid
>> creating an initial global symbol. I've made the change and
>> checked it in.
>
>> Thanks for catching this...
>> Kevin
>
>Thanks! Could you please also fix the v5-10 branch?
>
>
________________________________________________________________
Sent via the EV1 webmail system at mail.ev1.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gnus-agent-read-local
@ 2006-05-29 14:01 Kevin Greiner
2006-05-29 14:27 ` gnus-agent-read-local Katsumi Yamaoka
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Greiner @ 2006-05-29 14:01 UTC (permalink / raw)
Cc: semi-gnus-ja
Binding obarray to my-obarray while calling read will avoid
creating an initial global symbol. I've made the change and
checked it in.
Thanks for catching this...
Kevin
---------- Original Message ----------------------------------
From: Katsumi Yamaoka <yamaoka@jpl.org>
Date: Mon, 29 May 2006 10:13:01 +0900
>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,
>
>
________________________________________________________________
Sent via the EV1 webmail system at mail.ev1.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gnus-agent-read-local
2006-05-29 14:01 gnus-agent-read-local Kevin Greiner
@ 2006-05-29 14:27 ` Katsumi Yamaoka
0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2006-05-29 14:27 UTC (permalink / raw)
Cc: semi-gnus-ja
>>>>> In <200605290901.AA34537584@mail.ev1.net>
>>>>> "Kevin Greiner" <kevin.greiner@compsol.cc> wrote:
> Binding obarray to my-obarray while calling read will avoid
> creating an initial global symbol. I've made the change and
> checked it in.
> Thanks for catching this...
> Kevin
Thanks! Could you please also fix the v5-10 branch?
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <u7j49jaz2.fsf@ybb.ne.jp>]
* Re: gnus-agent-read-local
[not found] <u7j49jaz2.fsf@ybb.ne.jp>
@ 2006-05-29 1:13 ` Katsumi Yamaoka
0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2006-05-29 1:13 UTC (permalink / raw)
Cc: semi-gnus-ja
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,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-29 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-29 16:39 gnus-agent-read-local Kevin Greiner
-- strict thread matches above, loose matches on Subject: below --
2006-05-29 14:01 gnus-agent-read-local Kevin Greiner
2006-05-29 14:27 ` gnus-agent-read-local Katsumi Yamaoka
[not found] <u7j49jaz2.fsf@ybb.ne.jp>
2006-05-29 1:13 ` gnus-agent-read-local Katsumi Yamaoka
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).