emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Dan Drake <dan.drake@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock
Date: Wed, 29 Jan 2020 10:49:05 +0100	[thread overview]
Message-ID: <8736byegoe.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAKqbAeGqrAehkkY1Vx8n4WCossD5YO9WOrRgVXLnnuaecR+L4Q@mail.gmail.com> (Dan Drake's message of "Tue, 28 Jan 2020 20:11:42 -0600")

Hello,

Dan Drake <dan.drake@gmail.com> writes:

> Thank you, Nicolas, for the review of my first patch. I've updated my code
> and have the new patch attached.

Thank you!

> I didn't inline the "time to minutes to keep function"; yes, that function
> is very short, but the function name makes the intent/purpose of the code
> obvious, and the org-clock-resolve a bit more readable. If it's important
> to inline that -- performance concerns about the function call overhead,
> accepting org-mode/emacs coding style, etc. -- I'm willing to do that.

If you think it makes the code more readable, which is debatable IMO,
one option is to simply add a comment where it is going to be inlined.

It is not about speed or Org coding style, but generally speaking,
defining a global function out of a one-liner, just to use it once, does
not sound reasonable. You may define it in a `let' within the function,
but I'm still confident that a comment and plain inlining is more than
enough.

> I added an entry to ORG-NEWS for version 9.4.

Great!

> I didn't write any tests, as the change seems so simple, and UI-focused.
> But again, if that's a dealbreaker, I can work on doing that.

It's certainly not a deal breaker in this case, but a regression test
more or less guarantees a future code refactoring will not unwillingly
break your feature.

Test can come later, or even never, that's your call. No worries.

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2020-01-29  9:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 20:13 [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock Dan Drake
2020-01-24 23:30 ` Nicolas Goaziou
2020-01-29  2:11   ` Dan Drake
2020-01-29  9:49     ` Nicolas Goaziou [this message]
2020-01-29 12:47   ` Bastien
2020-02-01 10:22     ` Nicolas Goaziou
2020-02-01 13:10       ` Bastien
2020-02-01 14:15         ` Nicolas Goaziou
2020-02-01 14:34           ` Bastien
2020-02-01 16:48             ` Nicolas Goaziou
2020-02-02 13:41               ` Dan Drake
2020-02-02 13:51                 ` Bastien
2020-02-03 14:41             ` Robert Pluim
2020-02-03 14:53               ` Bastien

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=8736byegoe.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=dan.drake@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).