emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-today broken
@ 2019-02-01  1:41 Samuel Wales
  2019-02-01  4:12 ` Kyle Meyer
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Wales @ 2019-02-01  1:41 UTC (permalink / raw)
  To: emacs-orgmode

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: <http://thekafkapandemic.blogspot.com>

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." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

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

* Re: org-today broken
  2019-02-01  1:41 org-today broken Samuel Wales
@ 2019-02-01  4:12 ` Kyle Meyer
  2019-02-01 12:55   ` Marco Wahl
  2019-02-04 23:38   ` Samuel Wales
  0 siblings, 2 replies; 7+ messages in thread
From: Kyle Meyer @ 2019-02-01  4:12 UTC (permalink / raw)
  To: Samuel Wales, emacs-orgmode

Samuel Wales <samologist@gmail.com> 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

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

* Re: org-today broken
  2019-02-01  4:12 ` Kyle Meyer
@ 2019-02-01 12:55   ` Marco Wahl
  2019-02-01 13:23     ` Marcin Borkowski
  2019-02-04  1:10     ` Kyle Meyer
  2019-02-04 23:38   ` Samuel Wales
  1 sibling, 2 replies; 7+ messages in thread
From: Marco Wahl @ 2019-02-01 12:55 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

Kyle Meyer <kyle@kyleam.com> writes:

> Samuel Wales <samologist@gmail.com> 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

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

* Re: org-today broken
  2019-02-01 12:55   ` Marco Wahl
@ 2019-02-01 13:23     ` Marcin Borkowski
  2019-02-04  1:10     ` Kyle Meyer
  1 sibling, 0 replies; 7+ messages in thread
From: Marcin Borkowski @ 2019-02-01 13:23 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode


On 2019-02-01, at 13:55, Marco Wahl <marcowahlsoft@gmail.com> wrote:

> Kyle Meyer <kyle@kyleam.com> writes:
>
>> Samuel Wales <samologist@gmail.com> 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

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

* Re: org-today broken
  2019-02-01 12:55   ` Marco Wahl
  2019-02-01 13:23     ` Marcin Borkowski
@ 2019-02-04  1:10     ` Kyle Meyer
  2019-02-04 11:10       ` Marco Wahl
  1 sibling, 1 reply; 7+ messages in thread
From: Kyle Meyer @ 2019-02-04  1:10 UTC (permalink / raw)
  To: Marco Wahl; +Cc: emacs-orgmode

Hi Marco,

Marco Wahl <marcowahlsoft@gmail.com> 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

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

* Re: org-today broken
  2019-02-04  1:10     ` Kyle Meyer
@ 2019-02-04 11:10       ` Marco Wahl
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Wahl @ 2019-02-04 11:10 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: org-today broken
  2019-02-01  4:12 ` Kyle Meyer
  2019-02-01 12:55   ` Marco Wahl
@ 2019-02-04 23:38   ` Samuel Wales
  1 sibling, 0 replies; 7+ messages in thread
From: Samuel Wales @ 2019-02-04 23:38 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

On 1/31/19, Kyle Meyer <kyle@kyleam.com> 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.

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

end of thread, other threads:[~2019-02-04 23:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01  1:41 org-today broken Samuel Wales
2019-02-01  4:12 ` Kyle Meyer
2019-02-01 12:55   ` Marco Wahl
2019-02-01 13:23     ` Marcin Borkowski
2019-02-04  1:10     ` Kyle Meyer
2019-02-04 11:10       ` Marco Wahl
2019-02-04 23:38   ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).