-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"multiple vnodes with (same) gnx" errors when using reload-settings #427
Comments
Uau, that's really Getting Things Done! Resolution confirmed on my side with:
I've seen you even corrected a bug I had also detected when using the "demo;;" tree-abbreviation... but was waiting to have more time to reproduce it and master the tree abbreviations before reporting. Great! |
On Mon, Feb 27, 2017 at 8:41 AM, XGiD ***@***.***> wrote:
Uau, that's really *Getting Things Done*! Resolution confirmed on my side
with:
Leo 5.4, build 20170227081518, Mon Feb 27 08:15:18 CST 2017
Git repo info: branch = master, commit = a9b8ce5
Python 3.5.2, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.14393) SP0
Thanks. These confirmations are important.
I've seen you even corrected a bug I had also detected when using the
"demo;;" tree-abbreviation... but was waiting to have more time to
reproduce it and master the tree abbreviations before reporting. Great!
Glad to hear it. Not redrawing the tree properly was a bad bug. Leo acted
strangely until the next redraw.
Edward
|
By the way, tree abbreviations are IMPRESSIVE, to say the least! I'm trying to master them in order to see their possibilities, are they explained in depth somewhere? I could not find too much at Leo's Documentation... |
On Mon, Feb 27, 2017 at 10:41 AM, XGiD ***@***.***> wrote:
By the way, tree abbreviations are *IMPRESSIVE*, to say the least!
I'm trying to master them in order to see their possibilities, are they
explained in depth somewhere? I could not find too much at Leo's
Documentation <http://leoeditor.com/search.html?q=abbreviation>...
When I have questions about settings, I look first in leoSettings.leo.
There is a little explanation at:
unl://C:\leo.repo\leo-editor\leo\config\leoSettings.leo#@settings:3-->Abbreviations:0-->@outline-data%20tree-abbreviations:5
But not very much. There are more formal docs here
<http://leoeditor.com/tutorial-pim.html#using-abbreviations-and-templates>,
but it doesn't cover tree abbreviations. I've just made a note to expand
both places.
Please ask any questions you like. Our discussion will be pre-writing for
the docs.
Edward
|
Thanks for offering your help. I've read all the explanations you've pointed me to and at this point I've been left with these questions (which for some of them I think I already know the answer for, but I'd better get your confirmation):
without success. I think I'm done for now. |
On Wed, Mar 1, 2017 at 11:54 PM, XGiD ***@***.***> wrote:
Is there any way to insert placeholders for fields to be filled in (like
<|a-field-name|>) in tree abbreviations like there's for simple
abbreviations (what you call templates)? I think the answer is NO.
Why do you say no? The
per-commander-plugin;; abbreviation in leoSettings.leo contains, for
example:
'''
<|docstring|>
'''
- Can I include *abbreviation scripts* in the headlines and/or body of
any of the nodes of a tree abbreviation and they will be evaluated as
expected?
Yes. Why wouldn't they? Have you run a few tests?
- What kind of expressions can I set as *abbreviation scripts*? Why is
the x= part in expressions like {|{x=str('@')}|} necessary?
Scripts execute in an environment, and the assignment alters that
environment. The symbol "x" is used in various ways by the background
machinery. Yes, it's a bit wonky, but if you follow the pattern things will
work.
The @DaTa abbreviations-subst-env actually determines the environment. As
you will see, the children of this node define various functions. If you
*really* want to understand the details, read that code.
- Is there a reason why the "demo;;" example defines a node starting
with @@button instead of just @button?
- I understand that this is the only way to avoid Leo from
interpreting the @button as a definition of a button to add right
there, in the leoSettings.leo file itself.
Yes.
- If my guess above is right: is there any way to make the resulting
tree (after the tree abbreviation expansion) to have a heading with an
@button instead of an @@button?
Make the change by hand. It shouldn't be too odious ;-)
Edward
|
I'm sorry it took me so long to answer to your questions.
Well, I did not look at that example because I could not even understand the meaning of "per-commander-plugin"... :P I just tried with a tree-abbreviation of my own like this one:
That's a tree-abbreviation with one only node with a placeholder in its headline. It did not work. The ",," shortcut did not found any placeholder to jump to. Thanks to your example, now I see that this only fails for placeholders in the headlines. Placeholders in node bodies do work as expected. Is this a bug?
OK, as a workaround to the avobe, I've seen I can use the "ask" function. That will suffice. Of all the functions defined there, I think I understand all but the "insert":
I've made some tests and just don't get it. But that's a minor problem. Thanks alot for your answers and your time! |
Here's what should happen for any abbreviation, assuming usual default settings and abbreviations that end with ;; (two semicolons) Type the abbreviation. When you type the second ; Leo will insert the entire abbreviation and will select the first item to be filled in. Type the field and then then type ,, (two commas) to move to the next field. When you have filled in the last field, typing two commas does nothing more (except delete the first comma you typed) |
Hi Edward, thanks for your explanation. I had already figured out what was the expected behaviour for abbreviations with placeholders (items to be filled in). What I was trying to say was that they are not working in the expected way you describe when the placeholders are present at the headlines of any of the nodes of the tree-abbreviation. Let me slightly change the tree abbreviation example of my previous comment to make it more clear:
Now the tree abbreviation has a second placeholder ( So the placeholder in the headline ( I hope I've explained it more clearly now. I think this is a bug, but would like a confirmation before opening a new issue (as clearly has nothing to do with this present issue). Thanks. |
@xgid Yes, please open a new issue. |
Done: #438 |
Hi,
I was trying to use the new reload-settings command to reload some abbreviations I've just added to
myLeoSettings.leo
, but this error message was shown at the Log Pane when invoking reload-settings:What I did first was to copy the whole node
leoSettings.leo#@settings-->Abbreviations
to myLeoSettings.leo, remove from it the@data global-abbreviations
child node and add some custom abbreviations to the body of my@data abbreviations
node. Then invoked reload-settings while having myLeoSettings.leo tab focused (and some other tabs opened as well, one of them corresponding to theleoSettings.leo
file).I'm not sure that the error has to do with the reload-settings command, so please change the issue title accordingly.
Version info:
Leo 5.4, build 20170225074748, Sat Feb 25 07:47:48 CST 2017
Git repo info: branch = master, commit = a17f1d3
Python 3.5.2, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.14393) SP0
The text was updated successfully, but these errors were encountered: