From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: dynamic date arithmetic in a macro or otherwise (simulating a "date counter")? Date: Tue, 22 Aug 2017 19:09:38 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="94eb2c13ec8e88230705575fb0e3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkIIo-0000Eg-K0 for emacs-orgmode@gnu.org; Tue, 22 Aug 2017 19:09:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkIIm-0002zx-Gp for emacs-orgmode@gnu.org; Tue, 22 Aug 2017 19:09:42 -0400 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]:36007) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkIIm-0002zT-6C for emacs-orgmode@gnu.org; Tue, 22 Aug 2017 19:09:40 -0400 Received: by mail-pf0-x235.google.com with SMTP id c28so465833pfe.3 for ; Tue, 22 Aug 2017 16:09:40 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode --94eb2c13ec8e88230705575fb0e3 Content-Type: multipart/alternative; boundary="94eb2c13ec8e88230205575fb0e1" --94eb2c13ec8e88230205575fb0e1 Content-Type: text/plain; charset="UTF-8" On Thu, Aug 17, 2017 at 3:25 PM, Matt Price wrote: > I'd love to be able generate dates dynamically using the {{{n}}} org > macro, or some other mechanism. I don't immediately see how that would be > possible but maybe someone can guide me. I'd want to do something > equivalent to this pseudo-elisp: > > (let ((base-date 2017-09-05)) > (+ base-date (* 7 {{{n}}})) > > I haven't looked into how date objects are parsed in org-mode, though, so > I have no idea how hard it would be to actually implement something like > this. > I made some progress on this (but not much). I defined a simple macro that adds times together and creates a timestamp that org can read -- in fact, this one adds some text as well: #+MACRO: w (eval (format-time-string "Week {{{n(week)}}} (<%Y-%m-%d %a>)" (time-add (encode-time 0 0 0 17 9 2017) (days-to-time (* 7 1)))) ) This does everything that I want *except* dynamically adding time to the previous macro call. I tried defining a dynamic version: #+MACRO: w (eval (format-time-string "Week {{{n(week)}}} (<%Y-%m-%d %a>)" (time-add (encode-time 0 0 0 17 9 2017) (days-to-time (* 7 $1)))) )) And then calling it with {{{w({{{n}}})}}} But unsurprisingly and appropriately, that didn't work. I also took a look at the patch Nicolas used to implement the {{{n}}} macro (I've reattached it here for convenience only!). It defines `org-macro--counter-initialize` and calls it from inside `org-macro-templates-initialize`. I guess I could copy that strategy but then I'd be maintaining my own copy of org-macro-templates-initialize, which seems like a terrible idea. So, I'm not sure how best to proceed. For my specific use-case, something like this would be a huge timesaver when multiplied over semesters/years. But I also wonder whether maybe other people would enjoy being able to do date arithmetic inside org files (and outside of tables -- I know from Sacha's 2015 blog post that this is possible inside a table -- http://sachachua.com/blog/2015/06/using-your-own-emacs-lisp-functions-in-org-mode-table-calculations-easier-dosage-totals/). If other people would also use such code, I could try to hack something together for submission. Generalizable functions will be hard for me to write because I am sometimes a bit dense. I would love to hear suggestions from the group... > Thank you everyone! > ^^ this still applies! Matt --94eb2c13ec8e88230205575fb0e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Aug 17, 2017 at 3:25 PM, Matt Price <moptop99@gmail.com&g= t; wrote:
I'd love to be able generate dates dynamically using t= he {{{n}}} org macro, or some other mechanism.=C2=A0 I don't immediatel= y see how that would be possible but maybe someone can guide me.=C2=A0 I= 9;d want to do something equivalent to this pseudo-elisp:

(let ((base-date 2017-09-05))
=C2=A0 (+ base-date (* 7 {{= {n}}}))

I haven't looked into how date objects= are parsed in org-mode, though, so I have no idea how hard it would be to = actually implement something like this.=C2=A0=C2=A0

I made some progress on this (but not much).=C2=A0

I defined a simple macro that adds times togethe= r and creates a timestamp that org can read -- in fact, this one adds some = text as well:

#+MACRO: w (eval (format-time-s= tring "Week {{{n(week)}}} (<%Y-%m-%d %a>)" (time-add (encod= e-time 0 0 0 17 9 2017) (days-to-time (* 7 1)))) )

=
This does everything that I want *except* dynamically adding time to t= he previous macro call.=C2=A0 I tried defining a dynamic version:

#+MACRO: w (eval (format-time-string "Week {{{n(week)}= }} (<%Y-%m-%d %a>)" (time-add (encode-time 0 0 0 17 9 2017) (day= s-to-time (* 7 $1)))) ))

And then calling it with =

{{{w({{{n}}})}}}

But= unsurprisingly and appropriately, that didn't work.

=
I also took a look at the patch Nicolas used to implement the {{= {n}}} macro (I've reattached it here for convenience only!).=C2=A0 It d= efines `org-macro--counter-initialize` and calls it from inside `org-macro-= templates-initialize`.=C2=A0 I guess I could copy that strategy but then I&= #39;d be maintaining my own copy of org-macro-templates-initialize, which s= eems like a terrible idea.=C2=A0

So, I'm = not sure how best to proceed. For my specific use-case, something like this= would be a huge timesaver when multiplied over semesters/years. But I also= wonder whether maybe other people would enjoy being able to do date arithm= etic inside org files (and outside of tables -- I know from Sacha's 201= 5 blog post=C2=A0 that this is possible inside a table -- http://sachachua.com/blog/2015/0= 6/using-your-own-emacs-lisp-functions-in-org-mode-table-calculations-easier= -dosage-totals/).=C2=A0 If other people would also use such code, I cou= ld try to hack something together for submission. Generalizable functions w= ill be hard for me to write because I am sometimes a bit dense. I would lov= e to hear suggestions from the group...


Thank you everyone!

^^ thi= s still applies!
Matt

--94eb2c13ec8e88230205575fb0e1-- --94eb2c13ec8e88230705575fb0e3 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org-macro-Implement-the-n-macro.patch" Content-Disposition: attachment; filename="0001-org-macro-Implement-the-n-macro.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j6o6jr050 RnJvbSA5ODBiNzEzZjI4NTk2YzdmNjQ4NmRjMWNjZmE4MmY3NmRlN2M5NjNkIE1vbiBTZXAgMTcg MDA6M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