[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Headline generation as in diary?
From: |
Ihor Radchenko |
Subject: |
Re: Headline generation as in diary? |
Date: |
Thu, 03 Sep 2020 23:31:00 +0800 |
> 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.
- Re: Headline generation as in diary?, (continued)
- Re: Headline generation as in diary?, Robert Horn, 2020/09/01
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/01
- Re: Headline generation as in diary?, Robert Pluim, 2020/09/02
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/02
- Re: Headline generation as in diary?, Robert Pluim, 2020/09/02
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/02
- Re: Headline generation as in diary?, Robert Pluim, 2020/09/03
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/03
- Re: Headline generation as in diary?, Ihor Radchenko, 2020/09/03
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/03
- Re: Headline generation as in diary?,
Ihor Radchenko <=
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/03
- Re: Headline generation as in diary?, Ihor Radchenko, 2020/09/03
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/03
- Re: Headline generation as in diary?, Robert Pluim, 2020/09/03
- Re: Headline generation as in diary?, Michael Heerdegen, 2020/09/03
- Re: Headline generation as in diary?, Robert Pluim, 2020/09/03
- Re: Headline generation as in diary?, Ihor Radchenko, 2020/09/03