From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Jack Henahan <jhenahan@me.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] `org-clock--oldest-date` performance
Date: Sun, 21 Jan 2018 10:42:00 +0100 [thread overview]
Message-ID: <87lggrmtuf.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <m18tcsb7a3.fsf@me.com> (Jack Henahan's message of "Sat, 20 Jan 2018 15:32:36 -0500")
Hello,
Jack Henahan <jhenahan@me.com> writes:
> Functionally, this means that today `org-clock-special-range` produces a
> range from the current time until the current time if `start` ends up
> nil for whatever reason
That's not true. Currently, `org-clock-special-range' never returns
a nil start time. This is where I don't understand your patch:
> - (`untilnow org-clock--oldest-date)
> + (`untilnow nil)
> (_ (encode-time 0 m h d month y))))
> (end (pcase key
> (`interactive (org-read-date nil t nil "Range end? "))
> @@ -2283,8 +2251,12 @@ have priority."
> (`interactive "(Range interactively set)")
> (`untilnow "now"))))
> (if (not as-strings) (list start end text)
^^^^^
this can now be nil
> - (let ((f (cdr org-time-stamp-formats)))
> - (list (format-time-string f start)
> + (let ((f (cdr org-time-stamp-formats))
> + (safe-start
> + (if (not start)
> + (encode-time 0 0 0 0 0 -50000)
> + start)))
> + (list (format-time-string f safe-start)
> (format-time-string f end)
> text))))))
Why not replacing `org-clock--oldest-date' with (encode-time
0 0 0 0 0 -50000) in the let binding above?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2018-01-21 9:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 6:52 `org-clock--oldest-date` performance Jack Henahan
2018-01-20 11:14 ` Nicolas Goaziou
2018-01-20 17:00 ` [PATCH] " Jack Henahan
2018-01-20 17:05 ` Jack Henahan
2018-01-20 17:09 ` Jack Henahan
2018-01-20 18:18 ` Nicolas Goaziou
2018-01-20 20:32 ` Jack Henahan
2018-01-20 21:06 ` Jack Henahan
2018-01-21 9:42 ` Nicolas Goaziou [this message]
2018-01-21 16:04 ` Jack Henahan
2018-01-21 22:30 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lggrmtuf.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=jhenahan@me.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).