Gnus development mailing list
 help / color / mirror / Atom feed
* pgg.el and run-at-time
@ 2003-12-09 11:27 Katsumi Yamaoka
  2003-12-09 16:45 ` Simon Josefsson
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2003-12-09 11:27 UTC (permalink / raw)


Hi,

I noticed the run-at-time function of the XEmacs version doesn't
work correctly, which runs a timer function almost immediately
at the first time, ignoring the specified time, and reported it
to the XEmacs-beta list today.

Also I found pgg.el uses run-at-time directly.  Although I'm not
using pgg, I'm afraid that the cached passphrase may immediately
be expired.  Is it better to replace it with nnheader-run-at-time?

Please note, the nnheader-run-at-time function is not complete
in XEmacs.  It is particular to the argument types as follows:

(nnheader-run-at-time 1 nil 'ignore (current-time))
 => itimer "nnheader-run-at-time" signaled: (invalid-function 16341)

We may possibly want to modify that function as follows:

(defun nnheader-xmas-run-at-time (time repeat function &rest args)
  (start-itimer
   "nnheader-run-at-time"
   `(lambda ()
      (,function ,@(mapcar (lambda (arg) (list 'quote arg)) args)))
   time repeat))

Regards,
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



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

* Re: pgg.el and run-at-time
  2003-12-09 11:27 pgg.el and run-at-time Katsumi Yamaoka
@ 2003-12-09 16:45 ` Simon Josefsson
  2003-12-10  0:36   ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2003-12-09 16:45 UTC (permalink / raw)
  Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Hi,
>
> I noticed the run-at-time function of the XEmacs version doesn't
> work correctly, which runs a timer function almost immediately
> at the first time, ignoring the specified time, and reported it
> to the XEmacs-beta list today.
>
> Also I found pgg.el uses run-at-time directly.  Although I'm not
> using pgg, I'm afraid that the cached passphrase may immediately
> be expired.  Is it better to replace it with nnheader-run-at-time?

I think PGG should not depend on Gnus files, but we could create a
pgg-run-at-time and use that.

Does XEmacs support run-at-time at all, or is it obsolete FSF
compatibility functionality?  I could not find neither documented in
the XEmacs Lispref manual.




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

* Re: pgg.el and run-at-time
  2003-12-09 16:45 ` Simon Josefsson
@ 2003-12-10  0:36   ` Katsumi Yamaoka
  2003-12-10  6:35     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2003-12-10  0:36 UTC (permalink / raw)


>>>>> In <iluwu96vt1t.fsf@latte.josefsson.org>
>>>>>	Simon Josefsson <jas@extundo.com> wrote:

>> Also I found pgg.el uses run-at-time directly.  Although I'm not
>> using pgg, I'm afraid that the cached passphrase may immediately
>> be expired.  Is it better to replace it with nnheader-run-at-time?

I noticed nnheader-xmas-run-at-time is also incomplete, oops.

> I think PGG should not depend on Gnus files, but we could create a
> pgg-run-at-time and use that.

That's good.

> Does XEmacs support run-at-time at all, or is it obsolete FSF
> compatibility functionality?  I could not find neither documented in
> the XEmacs Lispref manual.

Although I don't know the status of the fsf-compat package, I
think it is better not to use it.  I will start improvement of
nnheader-xmas-run-at-time.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



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

* Re: pgg.el and run-at-time
  2003-12-10  0:36   ` Katsumi Yamaoka
@ 2003-12-10  6:35     ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2003-12-10  6:35 UTC (permalink / raw)


>>>>> In <b9y1xrdzey6.fsf@jpl.org> Katsumi Yamaoka wrote:

> I noticed nnheader-xmas-run-at-time is also incomplete, oops.

I've fixed it without using fsf-compat so that it works
correctly for the 1st argument and handles any types of
arguments to be passed to a timer function.  Hopefully, it will
be able to use even if someone fixes the itimer in the future.

In addition, I also have installed the same function in pgg.el
as pgg-run-at-time.

Regards,
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



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

end of thread, other threads:[~2003-12-10  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 11:27 pgg.el and run-at-time Katsumi Yamaoka
2003-12-09 16:45 ` Simon Josefsson
2003-12-10  0:36   ` Katsumi Yamaoka
2003-12-10  6:35     ` 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).