GNU bug report logs - #50195
[PATCH] Adding diary-offset, a diary-sexp offsetting another diary-sexp.

Previous Next

Package: emacs;

Reported by: Yuchen Pei <hi <at> ypei.me>

Date: Wed, 25 Aug 2021 05:57:01 UTC

Severity: wishlist

Tags: patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 50195 <at> debbugs.gnu.org (full text, mbox):

From: Yuchen Pei <hi <at> ypei.me>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 50195 <at> debbugs.gnu.org
Subject: Re: bug#50195: [PATCH] Adding diary-offset, a diary-sexp offsetting
 another diary-sexp.
Date: Fri, 27 Aug 2021 23:11:34 +1000
[Message part 1 (text/plain, inline)]
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Yuchen Pei <hi <at> ypei.me> writes:
>
>> A bit like diary-remind, as a diary-sexp rather than reminder, 
>> and
>> also support both positive and negative offsets.
>
> Because we are just talking about it: my personal solution for 
> this kind
> of problem: I extended the diary language with some date 
> arithmetic
> functions and a `date-let' macro, that allows you to solve the 
> same task
> like
>
>   (date-let ((date+ date 2))
>     SEXP)
>
> An advantage is that this saves one layer of `eval', and it 
> allows the
> delta of days to be an expression (that might depend on the 
> DATE).

Interesting - I never thought of defining my own let macro.

>
> I also worked on finer grained solutions for the problems of the 
> kind
> "every Nth Xday of the month unless it's a day that fulfills 
> some TEST
> (e.g., it's a holiday), then use an alternative date.  Useful 
> for
> specifying rules for garbage collection (real-life garbage, not 
> Emacs
> gc).
>
> I planned to provide these things as a separate library, and I'm 
> not
> against what has been supposed here, just wanted to mention an
> alternative view on the problem.

Thanks, I'll be curious to see your library when it gets 
published.

>
> Michael.


-- 
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.