all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: emacs-orgmode@gnu.org
Subject: Re: Headline generation as in diary?
Date: Wed, 28 Oct 2020 18:12:58 +0100	[thread overview]
Message-ID: <87tuue9sv9.fsf@web.de> (raw)
In-Reply-To: <878sdth8fm.fsf@web.de> (Michael Heerdegen's message of "Tue, 01 Sep 2020 16:34:53 +0200")

I <michael_heerdegen@web.de> wrote:

> With diary, I can use arbitrary Lisp expressions to generate dates, and
> those expressions can also return a string to use as non-nil return
> value to generate non-constant headlines including certain numbers for
> example. [...]

My solution so far: I've set up my `org-capture-templates' so that when
I hit T (instead of t) I am prompted for time+headline and optionally a
number of days for a reminder, and, for example, when I enter "21:00
Test" and a "2" I get an entry like

| ** TODO Special entry: "21:00 Test"
| %%(diary-remind
|    '(and
|      (dg-it-is "[2020-10-31 Sa]")
|      "TODO 21:00 Test")
|    2)

`dg-it-is' is a function that tests whether "it is" the given date
specified as an inactive org time stamp.  The nice thing about this is
that org recognizes the stamp and I can click on it with the mouse to
change it etc.

And I can freely edit the whole expression.  The entry gets listed in
the agenda correctly (also the reminder) and I get two appt.el
appointments (or rather, my substitution for it).

Cons: The headline is ignored, I use a dummy headline.  I don't have
emacs-lisp bindings to edit the expression in the Capture or Org buffer,
so if I want something more complicated I probably need to use *scratch*
as intermediate step  (I tried to use a source block, but then the %%()
expression is not recognized any more, and the time stamps are not
clickable any more).

And for whatever reason, the agenda doesn't fontify the word "TODO".

If anyone has ideas for improvements, I'm curious!


Regards,

Michael.


      parent reply	other threads:[~2020-10-28 17:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 14:34 Headline generation as in diary? Michael Heerdegen
2020-09-01 15:10 ` Eric S Fraga
2020-09-01 15:18   ` Michael Heerdegen
2020-09-01 15:28     ` Michael Heerdegen
2020-09-01 16:10     ` Robert Pluim
2020-09-01 16:17       ` Eric S Fraga
2020-09-01 16:51         ` Robert Horn
2020-09-01 21:56       ` Michael Heerdegen
2020-09-02  6:54         ` Robert Pluim
2020-09-02 13:45           ` Michael Heerdegen
2020-09-02 15:00             ` Robert Pluim
2020-09-02 22:51               ` Michael Heerdegen
2020-09-03  7:14                 ` Robert Pluim
2020-09-03 13:14                   ` Michael Heerdegen
2020-09-03 13:35                     ` Ihor Radchenko
2020-09-03 14:01                       ` Michael Heerdegen
2020-09-03 15:31                         ` Ihor Radchenko
2020-09-03 17:01                           ` Michael Heerdegen
2020-09-03 18:04                             ` Ihor Radchenko
2020-09-03 18:37                               ` Michael Heerdegen
2020-09-03 14:06                       ` Robert Pluim
2020-09-03 14:46                         ` Michael Heerdegen
2020-09-03 15:17                           ` Robert Pluim
2020-09-03 15:34                         ` Ihor Radchenko
2020-10-28 17:12 ` Michael Heerdegen [this message]

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

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

  git send-email \
    --in-reply-to=87tuue9sv9.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.