best practice for managing calendar events

135 views
Skip to first unread message

Austin(Xu) Wang

unread,
Aug 26, 2019, 2:51:35 AM8/26/19
to leo-editor
Hello Leonine,

I have a number of projects in my leo file, some of the projects have events.  For example:

ProjectA -> Meeting With Donald (Next Monday 10:00)
ProjectB -> Meeting with Steve(6th Sept 15:30)
....

Is there a way I can see a list of events for all the projects?

BR,Austin

Matt Wilkie

unread,
Aug 26, 2019, 3:32:14 PM8/26/19
to leo-editor
Have a look at todo.py plugin. I think it's enabled by default, see [Task] tab next to [Nav], [Tags] etc. (Disclaimer I haven't used it)

matt

Austin(Xu) Wang

unread,
Aug 27, 2019, 5:35:32 AM8/27/19
to leo-editor
Thanks Matt.. 

I checked http://leo.zwiki.org/Tododoc for document. Also play with the [task] tab.  
My understanding is todo.py can set priority and progress of node.

My use case is I have too many projects, and each project may have one or more meeting reservations. 
I want to have one list or a calendar to check all the events.

I am trying the following solutions:
1) Modify the headline of the node if it's a meeting. make it starting with "20190827-10:00..."
2) Clone the node to one top level node named "Calendar"
3) Sort the Calendar children, so I get a list of coming events.

For Step #2, is there an easy way to clone one node and move it under another specific node?

BR,Austin

vitalije

unread,
Aug 27, 2019, 5:47:22 AM8/27/19
to leo-editor
For Step #2, is there an easy way to clone one node and move it under another specific node?

BR,Austin


If you put the following code into a node with the headline `@button clone-to-calendar @key=Alt-4`:
v = p.v
cal
= c.find_h('Calendar')[0]
cal_v
= cal.v
if cal_v not in v.parents:
    cal_v
.children.append(v)
    v
.parents.append(cal_v)
    cal_v
.children.sort(key=lambda x:x.h)
    c
.redraw()

The next time you open this outline, whenever you wish to clone a meeting node to the calendar you just select the meeting node and press Alt-4. Of course you can change the shortcut to whatever you prefer, just change the headline of the @button node.

HTH Vitalije


 

Edward K. Ream

unread,
Aug 27, 2019, 10:11:08 AM8/27/19
to leo-editor
On Tue, Aug 27, 2019 at 4:35 AM Austin(Xu) Wang <xu4...@gmail.com> wrote:

My use case is I have too many projects, and each project may have one or more meeting reservations. 
I want to have one list or a calendar to check all the events.

Perhaps a calendar in a global dock would work better.  It's not possible now, but perhaps when --global-docks is in effect. This would imply a change, perhaps slight, to todo.py.

Edward

Chris George

unread,
Aug 27, 2019, 11:37:57 AM8/27/19
to leo-editor
The only reason I do not use todo.py extensively as my organizer is the total lack of integration with an online calendar application.

I am sure it could be done. It is likely still beyond my skills to make it so but it would certainly be an important and worthwhile feature for many people like me who see "PIM" and "Organizer" in Leo's descriptions and find out it is really "roll your own".

Chris

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS3bgGFy0_DcQ-6EzpcDUk7QwhROdLMDyo3Wgq5QSMBCyA%40mail.gmail.com.

Austin(Xu) Wang

unread,
Aug 27, 2019, 12:51:02 PM8/27/19
to leo-editor

If you put the following code into a node with the headline `@button clone-to-calendar @key=Alt-4`:
v = p.v
cal
= c.find_h('Calendar')[0]
cal_v
= cal.v
if cal_v not in v.parents:
    cal_v
.children.append(v)
    v
.parents.append(cal_v)
    cal_v
.children.sort(key=lambda x:x.h)
    c
.redraw()

Yes. The code works. I put it under one @command button, and I can use a shortcut key to clone current node.  Like a magic!

I'm trying to optimize it by adding an abbreviation.  I put below to my @data abbreviations

cal;;={|{

\:v = p.v

\:cal = c.find_h('Calendar')[0]

\:cal_v = cal.v

\:if cal_v not in v.parents:

\: cal_v.children.append(v)

\: v.parents.append(cal_v)

\: cal_v.children.sort(key=lambda x:x.h)

\: c.redraw()

\:}|}


I am expecting when I key in cal;;, the node will be automatically cloned. So I will not need to lose my focus when editing the meeting node body.

However, the cal;; is not working as my expected. The editor must understood cal;; since I cannot key in another ';' after cal;;.


Do you know is there any limitation to implement such logic inside an abbreviation?


Thanks Again.


BR,Austin




Reply all
Reply to author
Forward
0 new messages