semi @auto?

25 views
Skip to first unread message

F.S.

unread,
Oct 18, 2012, 2:17:25 PM10/18/12
to leo-e...@googlegroups.com
I really like @auto. I can just define functions/classes without worrying about creating nodes for each. But it would be nice to be able to manually annotate as well. For example to broadly group nodes together or even to clone nodes. Is there any way to combine the best of both worlds? Ideally users can create meta information about a file and store it in .leo outline. And Leo can take advantage of such meta information when parsing in the @auto nodes and add the user annotation on top of the structural information inherent in the file.

Also I don't seem to be able to re-read @auto nodes from files after I make updates. It would be nice to be able to see the new functions/classes in the outline pane without having to close the outline file and restart.

Ville M. Vainio

unread,
Oct 18, 2012, 3:24:49 PM10/18/12
to leo-e...@googlegroups.com

For question 2, rclick on the @auto node and choose 'refresh from disk'.

Q1 has been discussed previously, without conclusion to implement the feature (so far)

On Oct 18, 2012 9:17 PM, "F.S." <speec...@gmail.com> wrote:
I really like @auto. I can just define functions/classes without worrying about creating nodes for each. But it would be nice to be able to manually annotate as well. For example to broadly group nodes together or even to clone nodes. Is there any way to combine the best of both worlds? Ideally users can create meta information about a file and store it in .leo outline. And Leo can take advantage of such meta information when parsing in the @auto nodes and add the user annotation on top of the structural information inherent in the file.

Also I don't seem to be able to re-read @auto nodes from files after I make updates. It would be nice to be able to see the new functions/classes in the outline pane without having to close the outline file and restart.

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To view this discussion on the web visit https://groups.google.com/d/msg/leo-editor/-/kw-VFioDREgJ.
To post to this group, send email to leo-e...@googlegroups.com.
To unsubscribe from this group, send email to leo-editor+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.

F.S.

unread,
Oct 18, 2012, 4:28:13 PM10/18/12
to leo-e...@googlegroups.com
Ville,
Is this the same as File->Read Write->Read @auto nodes? That read @auto nodes seems to always complain about inconsistent state and put the new read in @ignore.
I will give the refresh a try. Is there a command line as well or is this rclick only?
Thanks.

F.S.

unread,
Oct 18, 2012, 7:38:46 PM10/18/12
to leo-e...@googlegroups.com
Verified that this has the same problem for me. What I did:
open leo file. @auto files auto loaded with no problem. do any edits. save. refresh the edited @auto node, got importation error instead. 
Leo claimed that the first mismatch is at the end of the original file. In log pane the original file looks correct but the imported file looks mis-constructed:

first mismatched line: 1051 (original) = 1051 (imported)
Original file...
... lines from last def
1051 u'if __name__ == "__main__":\n'
1052  ...
Imported file...
1050 same as above
1051 now wraps to the first line of file instead, missing the text after @others

Structurally it looks like what happened is that there is some confusion about the text after @others in @auto node, at least in the reconstructed version. The refresh somehow missed that text and wrapped around to the beginning of the file (the first sub node of @auto).
 

On Thursday, October 18, 2012 12:24:50 PM UTC-7, Ville M. Vainio wrote:

Edward K. Ream

unread,
Oct 19, 2012, 6:55:49 AM10/19/12
to leo-e...@googlegroups.com
On Thu, Oct 18, 2012 at 6:38 PM, F.S. <speec...@gmail.com> wrote:

[big snip]

> Structurally it looks like what happened is that there is some confusion about the text after @others in @auto node

Thanks for this report. Please send me a small file that illustrates
the problem. Send to edre...@gmail.com. Thanks.

Edward
Reply all
Reply to author
Forward
0 new messages