A few noob questions: Abbreviation, multi-select cloning, @...

49 views
Skip to first unread message

Jacob Chang

unread,
Apr 5, 2021, 1:24:20 PM4/5/21
to leo-editor
So I finally figured out @bool enable-abbreviations.  This is a huge time saver for us who plan to use Leo primarily as PIM.  Question: does @bool and other @'s need to be in the node, can it be in the body, or it doesn't matter?

tbh;;=to be honest outputs to "to be honest" but date;;={|{import time ; x=time.asctime()}|} outputs {|{import time ; x=time.asctime()}|}, instead of the actual time and date.  What am I doing wrong?

Re. cloning, is there a way to multiselect nodes and clone them simultaneously into a destination node?

Also please feel free to direct me to a noob faq or something similar like a group chat, so I don't clutter this group with noob questions.  

Thank you.

Jacob

Rob

unread,
Apr 5, 2021, 3:52:43 PM4/5/21
to leo-editor
Noob questions welcome; we were there once. In some respects I still am, though I've been using Leo for many years.
  1. The @bool settings should be in either your myLeoSettings.leo file (my usual preference) or in an @settings node in your working Leo file.
  2. For the time/date abbreviation to work, you also need to enable scripting in your @settings file. (@bool scripting-abbreviations = True). The default setting is =false.
HTH

Rob...

Edward K. Ream

unread,
Apr 5, 2021, 4:14:51 PM4/5/21
to leo-editor
On Mon, Apr 5, 2021 at 12:24 PM Jacob Chang <jacobch...@gmail.com> wrote:

Question: does @bool and other @'s need to be in the node, can it be in the body, or it doesn't matter?

The type of each setting must be in the headline. Some settings use body text as part of the setting.  For example, @data uses body text. Note that @data isn't limited to p.b, Leo's config manager will scan all descendants of @data nodes.

tbh;;=to be honest outputs to "to be honest" but date;;={|{import time ; x=time.asctime()}|} outputs {|{import time ; x=time.asctime()}|}, instead of the actual time and date.  What am I doing wrong?

@bool scripting-abbreviations = True

It's time for you to start exploring leoSettings.leo. Leo has too many settings to remember, but the outline structure in leoSettings.leo comes to the rescue. Search for "Abbreviations" and you will find a node containing the relevant settings. The headline contains the setting, the body contains the documentation.

Re. cloning, is there a way to multiselect nodes and clone them simultaneously into a destination node?

The clone-find commands: clone-find-all-flattened (cff), clone-find-all (cfa), clone-find-marked (cfam), clone-find-tag (cft). Alt-x cf<tab> will show you the list, including aliases.

The clone find commands are one of Leo's killer features.

Also please feel free to direct me to a noob faq or something similar like a group chat, so I don't clutter this group with noob questions.  

There is the FAQ itself, but I think searching leoSettings is best for settings-related questions. In any case, don't worry about asking questions. It's always good for Leo's devs to know what confuses people.

Edward

Jacob Chang

unread,
Apr 5, 2021, 7:57:31 PM4/5/21
to leo-e...@googlegroups.com
Thank you, Rob and Edward.

Setting  @bool scripting-abbreviations = True still doesn't work, which is strange, since @bool enable-abbreviations = True works fine.
I think I may need to go through the installation steps properly again.  I'm not a programmer, so I don't know what this means, but the following is what shows in renderview when I input date;; :

{|{import time ; x=time.asctime()}|}
Docutils System Messages
System Message: ERROR/3 (<string>, line 23); backlink
Undefined substitution referenced: "{import time ; x=time.asctime()}".
System Message: ERROR/3 (<string>, line 23); backlink
Undefined substitution referenced: "{import time ; x=time.strftime("%Y%m%d%H%M%S")}".
System Message: ERROR/3 (<string>, line 26); backlink
Undefined substitution referenced: "{import time ; x=time.asctime()}". 



--
You received this message because you are subscribed to a topic in the Google Groups "leo-editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leo-editor/4lQjA_vKV5c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0nzQ_D0vfGb_ULQJD%2BQxU_NqddGPJe8xFuuUDxcJd2Dg%40mail.gmail.com.

Luka Golibrodo

unread,
Apr 6, 2021, 2:41:31 AM4/6/21
to leo-e...@googlegroups.com
Hi, Jacob!

Re. cloning, is there a way to multiselect nodes and clone them simultaneously into a destination node?

I also find Quickmove plugin very useful in some cases.

--
Luka


пн, 5 апр. 2021 г. в 20:24, Jacob Chang <jacobch...@gmail.com>:
--
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/e09491dd-ede8-4d80-8561-494d343690dan%40googlegroups.com.

Edward K. Ream

unread,
Apr 6, 2021, 4:23:06 PM4/6/21
to leo-editor


On Mon, Apr 5, 2021 at 6:57 PM Jacob Chang <jacobch...@gmail.com> wrote:
... the following is what shows in renderview when I input date;; :

{|{import time ; x=time.asctime()}|}
Docutils System Messages
System Message: ERROR/3 (<string>, line 23); backlink
Undefined substitution referenced: "{import time ; x=time.asctime()}".
System Message: ERROR/3 (<string>, line 23); backlink
Undefined substitution referenced: "{import time ; x=time.strftime("%Y%m%d%H%M%S")}".
System Message: ERROR/3 (<string>, line 26); backlink
Undefined substitution referenced: "{import time ; x=time.asctime()}". 

This message is expected. It simply means that Leo is expanding the abbreviation, but not evaluating the part between { and }. I don't understand the error message in detail, but the message is definitely from docutils.

Edward
Reply all
Reply to author
Forward
0 new messages