For Step #2, is there an easy way to clone one node and move it under another specific node?BR,Austin
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()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.
--
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.
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()
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