help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to debug functions depending on (current-time)?


From: Filipp Gunbin
Subject: Re: How to debug functions depending on (current-time)?
Date: Thu, 16 Jul 2015 00:44:19 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

On 15/07/2015 22:16 +0200, Marcin Borkowski wrote:

> Hi all,
>
> I have a bunch of functions depending on (current-time), and I'm
> wondering how to test/debug them.  Is it safe to (temporarily) redefine
> `current-time'?  Maybe it's better to do that in a separate Emacs
> instance?  I could of course change their source code for the time of
> debugging, but this still lefts the problem of testing (esp. automatic
> testing) open.

As your code may use some builtin functions which use current-time, this
won't be reliable.

So I'd do what Pascal suggested.

Filipp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]