unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: "Gijs Hillenius" <gijs@hillenius.net>
Cc: emacs-devel@gnu.org
Subject: Re: diary-lib.el how about adding diary-schedule
Date: Thu, 26 Aug 2021 17:22:04 +0200	[thread overview]
Message-ID: <87czq0s02r.fsf@web.de> (raw)
In-Reply-To: <87pmu22csm.fsf@hillenius.net> ("Gijs Hillenius"'s message of "Wed, 25 Aug 2021 09:39:37 +0200")

Gijs Hillenius <gijs@hillenius.net> writes:

> this indeed does what I want:
>
> %%(and (diary-block 15 07 2020 30 06 2021) (diary-cyclic 7 15 07 2020))
>   14:00-14:30 some weekly meeting

Gijs, Lars, should we try to improve the manual a bit?

(1) Would it be helpful to add something like the above as an example?

(2) This paragraph in (info "(emacs) Sexp Diary Entries"):

|    The generality of sexp diary entries lets you specify any diary entry
| that you can describe algorithmically.  A sexp diary entry contains an
| expression that computes whether the entry applies to any given date.
| If its value is non-‘nil’, the entry applies to that date; otherwise, it
| does not.  The expression can use the variable ‘date’ to find the date
| being considered; its value is a list (MONTH DAY YEAR) that refers to
| the Gregorian calendar.

explains what we talked about.  It could say clearer that DATE is bound
as a (dynamical) variable, and it should also say that the variable
ENTRY is also provided (bound to the text found after the expression in
the diary file - see the docstring of `diary-list-sexp-entries' which
explains this better.)

Maybe also say that the predefined diary sexp functions use these
variables implicitly, so that users are not confused about the fact that
most diary sexps don't contain a reference to DATE.

(3) Something else?  What I don't like about the diary part of the
manual is that it tells so many details before you get to the above
paragraph that most people think this is complicated magic.  Whereby
diary sexps are only trivial Elisp sexps that can refer to the variables
DATE and ENTRY and whose return value is interpreted by the
diary/calendar (how the return value is actually interpreted is
explained quite well OTOH).

What do you think?

I also ask Lars because I very much hope he is motivated to make the
change, should we agree about something.  This is because I don't speak
texinfo, and I will soon be on vacation.  Nonetheless I'm happy to
answer any questions if I can.


Michael.



  parent reply	other threads:[~2021-08-26 15:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20  9:57 diary-lib.el how about adding diary-schedule Gijs Hillenius
2021-08-21 13:09 ` Lars Ingebrigtsen
2021-08-22  7:33   ` Gijs Hillenius
2021-08-22 21:59     ` Lars Ingebrigtsen
2021-08-24 14:37     ` Michael Heerdegen
2021-08-25  7:39       ` Gijs Hillenius
2021-08-25 10:55         ` Michael Heerdegen
2021-08-26 15:22         ` Michael Heerdegen [this message]
2021-08-26 19:48           ` Lars Ingebrigtsen

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czq0s02r.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=emacs-devel@gnu.org \
    --cc=gijs@hillenius.net \
    /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.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).