Re: [O] org-today broken

2019-02-04 Thread Samuel Wales
On 1/31/19, Kyle Meyer  wrote:
> Thanks for the report.  I introduced this and a handful of other related
> incompatibilities with my port of Emacs's c75f505de.  I've reverted the
> problematic spots.

thank you.



Re: [O] org-today broken

2019-02-04 Thread Marco Wahl
Hi Kyle,

>> Occasionally I like to bend time to see what the agenda would look like
>> if another day was current.  This can be achieved conveniently when
>> solely function "current-time" is the source for the current time.
>>
>> So I'm all for using the explicit calls to current-time instead of using
>> alternatve sources for the current time.
>
> Sorry for making your time travel harder :]

:[

> Emacs's c75f505dea6 argues for replacing current-time calls with nil
> where possible because "nil is a bit more efficient and should have less
> timing error".  But if there are any particular spots where you'd like
> to use current-time for the reasons you give above, please feel free to
> make those changes.  (There are already quite a few places where I've
> done this because we depend on overriding current-time in tests.)

Thanks for the clarification.

I think it's a not so great idea to build on an assumption about some
internal stuff, here concretely the expectation that the current time is
retrieved per call to `current-time' everywhere in Org.

If there shall be a time travel feature in Org this feature should be
made explicit, I think, which BTW could be ensured with suitable tests.

Possibly one could use external tools to get even more powerful
timetravel, as Marcin proposed IIRC.

So go ahead with every optimization you can find!


Best regards,  Marco




Re: [O] org-today broken

2019-02-03 Thread Kyle Meyer
Hi Marco,

Marco Wahl  writes:

> Occasionally I like to bend time to see what the agenda would look like
> if another day was current.  This can be achieved conveniently when
> solely function "current-time" is the source for the current time.
>
> So I'm all for using the explicit calls to current-time instead of using
> alternatve sources for the current time.

Sorry for making your time travel harder :]

Emacs's c75f505dea6 argues for replacing current-time calls with nil
where possible because "nil is a bit more efficient and should have less
timing error".  But if there are any particular spots where you'd like
to use current-time for the reasons you give above, please feel free to
make those changes.  (There are already quite a few places where I've
done this because we depend on overriding current-time in tests.)

-- 
Kyle



Re: [O] org-today broken

2019-02-01 Thread Marcin Borkowski


On 2019-02-01, at 13:55, Marco Wahl  wrote:

> Kyle Meyer  writes:
>
>> Samuel Wales  writes:
>>
>>> recent versions of maint and probably master have nil instead of
>>> current time in org-today.
>>>
>>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>>>   time-subtract(nil (0 0 0))
>>>   org-today()
>>>   (message "org today is %s" (org-today))
>>
>> Thanks for the report.  I introduced this and a handful of other related
>> incompatibilities with my port of Emacs's c75f505de.  I've reverted the
>> problematic spots.
>
> Thanks for the revert!
>
> Occasionally I like to bend time to see what the agenda would look like
> if another day was current.  This can be achieved conveniently when
> solely function "current-time" is the source for the current time.
>
> So I'm all for using the explicit calls to current-time instead of using
> alternatve sources for the current time.

You are aware that datefudge exists, aren't you?

http://manpages.ubuntu.com/manpages/trusty/man1/datefudge.1.html

My 2 cents,

-- 
Marcin Borkowski
http://mbork.pl



Re: [O] org-today broken

2019-02-01 Thread Marco Wahl
Kyle Meyer  writes:

> Samuel Wales  writes:
>
>> recent versions of maint and probably master have nil instead of
>> current time in org-today.
>>
>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>>   time-subtract(nil (0 0 0))
>>   org-today()
>>   (message "org today is %s" (org-today))
>
> Thanks for the report.  I introduced this and a handful of other related
> incompatibilities with my port of Emacs's c75f505de.  I've reverted the
> problematic spots.

Thanks for the revert!

Occasionally I like to bend time to see what the agenda would look like
if another day was current.  This can be achieved conveniently when
solely function "current-time" is the source for the current time.

So I'm all for using the explicit calls to current-time instead of using
alternatve sources for the current time.


My 2ct,  Marco



Re: [O] org-today broken

2019-01-31 Thread Kyle Meyer
Samuel Wales  writes:

> recent versions of maint and probably master have nil instead of
> current time in org-today.
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   time-subtract(nil (0 0 0))
>   org-today()
>   (message "org today is %s" (org-today))

Thanks for the report.  I introduced this and a handful of other related
incompatibilities with my port of Emacs's c75f505de.  I've reverted the
problematic spots.

-- 
Kyle



[O] org-today broken

2019-01-31 Thread Samuel Wales
recent versions of maint and probably master have nil instead of
current time in org-today.

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  time-subtract(nil (0 0 0))
  org-today()
  (message "org today is %s" (org-today))

(time-subtract nil (list 0 (* 3600 org-extend-today-until) 0)).

i am running 24.

org-news says "From now on, Org expects at least Emacs 24.3, although
Emacs 24.4 or above is suggested.".  the newer notes don't mentioning
dropping emacs 24.  there is also no crash that says "your emacs is
too old, luddite!".

thanks.

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.