From: Ihor Radchenko <yantar92@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Robert Pluim <rpluim@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Headline generation as in diary?
Date: Thu, 03 Sep 2020 23:31:00 +0800 [thread overview]
Message-ID: <87363ynah7.fsf@localhost> (raw)
In-Reply-To: <87r1rjj6wx.fsf@web.de>
> Multi-line sexps in time stamps work would just be nice to have. Would
> it be hard to achieve? I mean, since multi-line %%(...) entries already
> work...
The problem is that org-mode assumes that planning line must be a single
line and a lot of internal logic hard-code this assumption.
For example, below is a fragment of org-get-property-block:
;; Move point to its position according to its positional rules.
(cond ((org-before-first-heading-p)
(while (and (org-at-comment-p) (bolp)) (forward-line)))
(t (forward-line)
(when (looking-at-p org-planning-line-re) (forward-line))))
The last line clearly assumes that planning line is always a single
line. The same assumption is made in many other places in org-mode
internals. Though one may write a patch to make multi-line sexps work in
org-mode, there is also a problem with external tools working with org.
I do not think there is support of multi-line planning everywhere.
> I think this is inconvenient. Ok, only a bit. But it would be nicer if
> I could specify my dates in only one file. Jumping around in my org
> file + my emacs init file is what I used to do.
You can always use file-local definition at the beginning or end of your
org file. Below is an example of local definition at the end of an org
file.
# Local Variables:
# eval: (defun your-function () (sexp))
Best,
Ihor
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> > When dealing with complicated date rules it can likely happen that a
>> > diary sexp doesn't fit into one line.
>>
>> Diary sexp can be a user-defined function. If your sexp needs to span
>> multiple lines, it is probably worth defining a function and simply
>> using <%%(your-function)> as a timestamp.
>
> I think this is inconvenient. Ok, only a bit. But it would be nicer if
> I could specify my dates in only one file. Jumping around in my org
> file + my emacs init file is what I used to do.
>
> Multi-line sexps in time stamps work would just be nice to have. Would
> it be hard to achieve? I mean, since multi-line %%(...) entries already
> work...
>
>
> Thanks,
>
> Michael.
next prev parent reply other threads:[~2020-09-03 15:37 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 [this message]
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
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=87363ynah7.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=rpluim@gmail.com \
/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).