Re: Creating LEO outline from python program outside of LEO

2023-09-10 Thread brian
ry but that would be easy too, especially if you already know how > to do work with the library. The standard Python library > *xml.etree.ElementTree* should do. > On Thursday, September 7, 2023 at 10:07:08 PM UTC-4 brian wrote: > >> I’ve written a program that manages media and crea

Re: Creating LEO outline from python program outside of LEO

2023-09-07 Thread brian
ome kind of > server like leoserver, but you'd have to write a client for that. But > perhaps there is another way to do what you want to end up with. > > On Thursday, September 7, 2023 at 4:16:56 PM UTC-4 brian wrote: > >> How do I create a Leo outline from within a Python pr

Creating LEO outline from python program outside of LEO

2023-09-07 Thread brian
How do I create a Leo outline from within a Python program? I have a Python program where I want to export into a Leo outline format file. All the snippets of code I’ve found assumes the code is running within Leo. I want to run outside LEO I tried this: from leo.core import leoGlobals

Re: Clones - How To Return To "Original" Node?

2021-02-28 Thread Brian Theado
e directory): python3 ~/leo-editor/leo/core/runLeo.py Whatever issue you have with that should have nothing to do with the shebang line: '#! /usr/bin/env python'. Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe fro

Re: Creating 6.3 documentation gives error

2021-02-07 Thread brian
On GitHub, I opened issues #1815 and #1816. On Thursday, February 4, 2021 at 10:46:54 PM UTC-5 tbp1...@gmail.com wrote: > On Thursday, February 4, 2021 at 7:15:33 PM UTC-5 brian wrote: > >> The dev has the same problem as 6.3. I did a diff between the dev and >> 6.3. The c

Re: Creating 6.3 documentation gives error

2021-02-04 Thread brian
k is never defined. Also, the fn parameter has a value of '/home/brian/pyDev/yLeoBook/leo/dev/leo/doc/c:/test/test.html'. "C:" is a Windows drive letter. The doc has a hard coded windows dir: /home/brian/pyDev/yLeoBook/leo/dev/leo/doc/LeoDocs.leo#Leo's Documentation-->How to..

Re: Creating 6.3 documentation gives error

2021-02-04 Thread brian
aceback (most recent call last): File "/home/brian/pyDev/yLeoBook/leo/dev/leo/core/leoGlobals.py", line 296, in new_cmd_wrapper func(self, event=event) File "/home/brian/pyDev/yLeoBook/leo/dev/leo/core/leoRst.py", line 509, in rst3 self.processTopTree(self.c.p)

Creating 6.3 documentation gives error

2021-02-02 Thread brian
/usr/local/python3p9/bin/python3 /home/brian/pyDev/yLeoBook/leo/leo-editor-6.3/launchLeo.py /home/brian/pyDev/yLeoBook/leo/leo-editor-6.3/leo/doc/LeoDocs.leo & Then I browsed to the "Leo's Documentation" Node. Next I did Alt-x, RST3 .

Re: Leo's new unit testing world

2020-12-06 Thread Brian Theado
r Brian's > comment > <https://groups.google.com/g/leo-editor/c/DTUe32_WhUs/m/duDmZOPEBQAJ>: > > "I tend to favor composition over inheritance and functions over classes. > The fixture feature helps with this preference." > > Thanks, Brian. > I'm glad my comment was

Re: SB: Please Read. Huge Ahas re unit testing

2020-11-29 Thread Brian Theado
Having measurable code coverage of the automated tests will be useful. The coverage.py library is not at all tied to pytest. About a year ago I tried running its standalone version against Leo's existing tests. However, some of the coverage results were not making sense. Possibly the way leo's

Re: leo\doc\LeoDocs.leo.orig

2020-08-27 Thread Brian Theado
recommendation about the gitignore file could help prevent future mistakes like this. Closely inspecting diffs before making a commit can also help. Brian On Mon, Aug 24, 2020 at 4:46 PM Edward K. Ream wrote: > > > On Mon, Aug 24, 2020 at 3:44 PM George Zipperlen < > websearch.su...@g

Re: leo stops working

2020-07-30 Thread Brian Theado
REY EVANS wrote: > Thanks Brian, > Sorry for the huge file. There's nothing in it that I can recognize > as *the* problem, but others will have more skill and knowledge ofthese > areas. > > geoff > > (base) geoff:1567>python leo-editor-master/launchLeo.py > Fatal Pytho

Re: **Important**: keys branch merged into devel

2020-07-26 Thread Brian Theado
!text = Shift-Tab +# OLD: +# unindent-region = ctrl-less # Ctrl-Shift- +# unindent-region = Shift-tab # Only when text is selected. yank = Ctrl-Y yank-pop= Alt-Y zap-to-character

Re: **Important**: keys branch merged into devel

2020-07-26 Thread Brian Theado
inspecting the diffs one last time through the pull request UI might have helped you spot the issue. Either way, I don't think a PR provides any extra history preservation. The commits are all still there. Brian -- You received this message because you are subscribed to the Google Groups "

Re: Félix, please give me commit access to leoInteg

2020-07-19 Thread Brian Theado
erhaps that explains the situation. Author's don't need commit access to create pull requests. HTH, Brian -- 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 l

Re: ENB: Hypothesis might make #1269 feasible

2020-05-15 Thread Brian Theado
tual action (insert-node, end-of-line, find-next, etc). Another which mainly just changes self.state. Am I on the right track? Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop r

Re: A fix for abbreviations with foreign keyboards is in the #1563 branch

2020-05-10 Thread Brian Theado
out '#1563' Branch '#1563' set up to track remote branch '#1563' from 'origin'. Switched to a new branch '#1563' Brian -- 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

Re: ENB: Qt-prototype is finished

2020-05-10 Thread Brian Theado
d a hypothesis test which instead of executing the random modification methods one-at-a-time, they get executed via execute_script? Maybe there are some bugs to shake out there. Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscrib

Re: ENB: Qt-prototype is finished

2020-05-09 Thread Brian Theado
Vitalije, On Fri, May 8, 2020 at 7:51 AM vitalije wrote: > *What next?* > > The main purpose of this prototype was to prove my claims about how Leo > architecture should change. Which parts should be moved to View, which > should be moved to Model and which should be moved to the Controller. >

Re: Qt-prototype report and some thoughts about executeScript command

2020-05-09 Thread Brian Theado
polishing the prototype is not as important as figuring out how to proceed to see how/whether it can replace the existing qt gui. On Sat, May 9, 2020 at 4:48 PM vitalije wrote: > Good catch Brian. Revision 8184a2023e5f9 contains the fix for this issue. > Now hoist/dehoist commands are a

Re: Qt-prototype report and some thoughts about executeScript command

2020-05-09 Thread Brian Theado
Vitalije On Thu, May 7, 2020 at 2:42 PM vitalije wrote: > In last few days I've been working on tests to be sure that all commands > in new prototype are working correctly and that no crash will ever occur. I > am pretty sure now that the implementation is correct and there are no > remaining

Re: Qt-prototype report and some thoughts about executeScript command

2020-05-09 Thread Brian Theado
You can try making these changes: -from hypothesis import given, settings +from hypothesis import given, settings, Verbosity -@settings(max_examples=5000, deadline=timedelta(seconds=4)) +@settings(max_examples=5000, deadline=timedelta(seconds=4), verbosity=Verbosity.verbose) And then add the

Re: ENB: Qt-prototype is finished

2020-05-08 Thread Brian Theado
Vitalije On Fri, May 8, 2020 at 7:51 AM vitalije wrote: > As Brian suggested in another thread I have changed the strategy for > performing hypothesis tests. Now test chooses a sequence of commands > excluding undo and redo commands. After each command if the outline has > c

Re: Qt-prototype report and some thoughts about executeScript command

2020-05-07 Thread Brian Theado
> Have you also considered using the property of random operation + undo = original tree widget state? And random operation + undo + redo = 2nd state? I'm not sure that would reveal anything from what you are already testing. Just a thought. Brian -- You received this message because you are sub

Re: A new tree drawing approach

2020-04-08 Thread Brian Theado
to the "set of links" you are using to represent the outline structure? Thanks, Brian On Tue, Apr 7, 2020 at 9:02 AM vitalije wrote: > For several days now, I've been working on a new drawing approach. The > preliminary results of this work can be seen in the new branch >

Re: Opening a theme file doesn't work in Leo 6.1b1

2020-04-04 Thread Brian Theado
otherwise stated, it is recommended to pass args as a sequence*" So maybe passing as a list rather than string will work for both platforms. Instead of this: command = f'{g.sys.executable} {g.app.loadDir}/runLeo.py "{fn}"' this command = [g.sys.executable, f"{g.app.loadDir}/runLeo.py&q

Re: font size shrank

2020-03-31 Thread Brian Theado
BTW, I meant two finger drag up and down on the mouse trackpad. On Tue, Mar 31, 2020, 4:26 PM Brian Theado wrote: > Are you using leo on a Mac laptop? I've found it easy to accidentally > change the font size in the body when on Mac. It took me a long time to > figure out what gestu

Re: font size shrank

2020-03-31 Thread Brian Theado
Are you using leo on a Mac laptop? I've found it easy to accidentally change the font size in the body when on Mac. It took me a long time to figure out what gesture caused it. If you hold down the Command key and two finger drag up and down, the font size will shrink and grow respectively. I'm

Re: New installation log

2020-03-29 Thread Brian Theado
On Sun, Mar 29, 2020 at 6:09 AM Edward K. Ream wrote: [...] > I am seriously considering ignoring Anaconda and miniconda in Leo's > installation instructions: > > Install python 3 > (ubuntu) apt-get install pip3 > pip install PyQt5 > (optional, if not using git) pip install leo > PyQt5 isn't

Re: Some excellent pytest articles/presentations

2020-03-16 Thread Brian Theado
On Mon, Mar 16, 2020 at 6:23 AM Edward K. Ream wrote: > When I awoke this morning I understood why you might suggest this. It > would, supposedly, make it possible to instantiate multiple instances of > the LeoApp class. I have just created #1537 >

Re: Some excellent pytest articles/presentations

2020-03-15 Thread Brian Theado
while app.windowList: +w = app.windowList[0] +if not app.closeLeoWindow(w): break -if g.app.windowList: -g.app.quitting = False # If we get here the quit has been disabled. +if app.windowList: +app.quitting = False # If we get here the quit has been

Some excellent pytest articles/presentations

2020-03-13 Thread Brian Theado
tate is wrong" https://github.com/okken/pycascades2020 - Multiply your Testing Effectiveness with Parametrized Testing I haven't gone through this one as thoroughly, but it also seems pretty good. Brian -- You received this message because you are subscribed to the Google Groups

Re: How To Intercept Clicks On Links in a QT5 Browser Widget

2020-02-27 Thread Brian Theado
On Wed, Feb 26, 2020 at 11:05 PM Thomas Passin wrote: > Thanks! Wow, that will save me lots of time. U, I don't see how to > "paste as node". My version of Leo has no menu item or leo command that > seems to be that. Of course I can just paste it into the body of a node, > but that won't

Re: How To Intercept Clicks On Links in a QT5 Browser Widget

2020-02-26 Thread Brian Theado
Thomas, Below I've pasted a leo subtree containing a demo @button which will display html hyperlinks to nodes inside a QTextBrowser. To use it copy the xml and in a leo outline, "paste as node". Create a script button from it and after clicking the button, a new pane should appear containing

Re: zombie process generated by g.execute_shell_commands

2020-02-11 Thread Brian Theado
This is working fine for me now. I don't see zombie processes for the exited background commands anymore. Nice work. On Sun, Feb 9, 2020 at 8:07 AM Edward K. Ream wrote: > On Sunday, February 9, 2020 at 6:08:42 AM UTC-6, Edward K. Ream wrote: > > > I have just created #1489 >

Re: zombie process generated by g.execute_shell_commands

2020-02-08 Thread Brian Theado
ll method ( https://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll). Maybe if g.execute_shell_commands is called with 'not wait', then leo should save the proc object and at idle time make a call to proc.poll for it (and any other launched background tasks). Then at the next idle call proc.

Re: pytest coverage testing is a wow

2020-01-16 Thread Brian Theado
On Thu, Jan 16, 2020 at 4:20 PM Edward K. Ream wrote: [...] > The test_one_line_pet_peeves function contains a table of snippets. Modulo > some housekeeping, it is: > > for contents in table: # table not shown. Some tests in the table fail. > contents, tokens, tree = self.make_data(contents,

More Python parsing libraries

2020-01-16 Thread Brian Theado
I was looking up mutation testing libraries for python and came across several references to Python parsing which I thought in light of recent work, Edward would be interested in. Mutation testing deserves its own thread. Here I'm just sharing the parsing references. The mutation testing library

Re: Please review the new docs for #1440

2020-01-15 Thread Brian Theado
On Wed, Jan 15, 2020 at 3:57 AM Edward K. Ream wrote: > On Tue, Jan 14, 2020 at 7:06 PM Brian Theado > wrote: > [...] > The ast module is particularly deficient in this regard. The documentation > for ast.walk <https://docs.python.org/3/library/ast.html#ast.walk> is: &g

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
er the other? On Tue, Jan 14, 2020 at 7:06 PM Brian Theado wrote: > In the theory of operation: > > "The notion of a *token order traversal* of a parse tree is the > foundation of this project" > > In contrast, what traversal order do parse trees provide? How is to

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
his library can collapse the complexity of these and any projects which change Python text" On Tue, Jan 14, 2020 at 6:10 PM Brian Theado wrote: > Ok, now I see in your proposed email response in the other thread you do > mention the asttokens project. And also later in #1440 you s

Re: Discuss: a proposed answer to python issue #33337

2020-01-14 Thread Brian Theado
On Tue, Jan 14, 2020 at 4:05 PM Edward K. Ream wrote: > On Tue, Jan 14, 2020 at 3:00 PM Terry Brown wrote: > >> I wonder if a couple of demos would help, >> > > Thanks for this suggestion. Imo, the demo is the TOG class compared with > similar code in asttokens, fstringify and black. The

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
luable. Examples are usually the first thing I want to see. Can you have something similar in #1440? On Tue, Jan 14, 2020 at 5:59 PM Brian Theado wrote: > I just followed the stackoverflow link ( > https://stackoverflow.com/questions/16748029/how-to-get-source-corresponding-to-a-python-ast-node#

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
I just followed the stackoverflow link ( https://stackoverflow.com/questions/16748029/how-to-get-source-corresponding-to-a-python-ast-node#) and someone posted that they created https://github.com/gristlabs/asttokens which "Annotates Python AST trees with source text and token information". Is

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-12 Thread Brian Theado
Oops accidentally hit send when I was pasting in the two examples. Here is the other one: else: # Some fields contain ints or strings. assert isinstance(z, (int, str)), z.__class__.__name__ On Sun, Jan 12, 2020 at 9:49 AM Brian Theado

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-12 Thread Brian Theado
On Sun, Jan 12, 2020 at 8:18 AM Edward K. Ream wrote: > > > On Sat, Jan 11, 2020 at 2:11 PM Brian Theado > wrote: > > > I have doubts about the following entries you are suppressing: assert, > except, raise. > > Imo, they are fine. Assert signal tha

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-11 Thread Brian Theado
counters it. So my 2 cents says it would be better to have case-by-case suppression for the exceptions catching and raising whose purpose is to alert you to bugs in your own code. Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To un

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-09 Thread Brian Theado
On Thu, Jan 9, 2020 at 5:10 AM Edward K. Ream wrote: > On Wed, Jan 8, 2020 at 5:55 AM Brian Theado > wrote: > > > I often read unit tests in source code projects in the hope of finding > simple, concrete usage examples. These examples not only serve to test the >

Re: Using Vitalije's code patterns

2020-01-09 Thread Brian Theado
On Thu, Jan 9, 2020 at 5:28 AM Edward K. Ream wrote: > On Wed, Jan 8, 2020 at 10:49 PM Brian Theado > wrote: > > *>> Prefer functions to classes/methods* > > > The TokenOrderTraverser class looks to me like a good opportunity to > follow the above principle.

Re: Using Vitalije's code patterns

2020-01-08 Thread Brian Theado
def visit(node): print(str(node)) TokenOrderPrinter().print(tree) The function/generator way has so much less friction for the developer using it: for node in traverse_in_token_order(tree): print(str(node)) Brian -- You received this message because you are subscribed to the Goog

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-08 Thread Brian Theado
w.com/questions/929021/what-are-static-factory-methods/929273) which makes it easy to instantiate the class. On Tue, Jan 7, 2020 at 1:32 PM Brian Theado wrote: > > > On Tue, Jan 7, 2020 at 5:01 AM Edward K. Ream wrote: > >> On Sunday, December 29, 2019 at 7:

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-07 Thread Brian Theado
On Tue, Jan 7, 2020 at 5:01 AM Edward K. Ream wrote: > On Sunday, December 29, 2019 at 7:19:03 PM UTC-5, btheado wrote: > > I was looking at the tests in leoAst.py in the fstringify branch and I >> don't find any asserts in the tests themselves. >> > > The tests in the TestTOG are actually

Re: #1467: Use traditional unit test (almost?) everywhere

2020-01-07 Thread Brian Theado
On Sun, Dec 29, 2019 at 5:54 PM Edward K. Ream wrote: > On Sun, Dec 29, 2019 at 5:29 PM Brian Theado > wrote: > [...] > > You might also find the code coverage report useful: > > Yes, that's interesting. The TOG classes remember which visitors have > been visited, s

Re: Question about "Import leoGlobals, but do NOT set g."

2020-01-03 Thread Brian Theado
On Fri, Jan 3, 2020 at 7:21 AM Edward K. Ream wrote: > On Thu, Jan 2, 2020 at 12:11 PM Brian Theado > wrote: > > For runLeo.py, the code looks like this: >> >> # Import leoGlobals, but do NOT set g. >> import leo.core.leoGlobals as leoGlobals >> # Cre

Question about "Import leoGlobals, but do NOT set g."

2020-01-02 Thread Brian Theado
out python identifiers I'm missing? Brian -- 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+unsubscr...@googlegroups.com. To view this discuss

Re: Leo requires tkinter module to be configured in Python environment

2020-01-01 Thread Brian Theado
Viktor, On Tue, Dec 31, 2019 at 11:45 AM Viktor Ransmayr wrote: > You were right with your assumption. - I tried it both with Leo 6.1-final > as well as 6.2-b1-devel - and - it works as you suspected. > > In both cases it does throw a type error related to ...\spellCommands.py - > but - it does

Re: #1467: Use traditional unit test (almost?) everywhere

2019-12-29 Thread Brian Theado
tests in leoAst.py in the fstringify branch and I don't find any asserts in the tests themselves. I expected to find assertions which verify the actual results of the test match some expected results. Is this just an early version of the tests or do you have some different approach? Brian -- You received this m

Re: #1467: Use traditional unit test (almost?) everywhere

2019-12-29 Thread Brian Theado
test >> >> > The first line didn't work. I did `git clone > https://github.com/btheado/leo-editor.git brian`, but I don't see the > pytest folder in the leo/test folder, which is strange. > Sorry about that. Not sure what is wrong with my instructions. Your clone should work just as

Re: #1467: Use traditional unit test (almost?) everywhere

2019-12-28 Thread Brian Theado
I've been experimenting lately writing pytest tests for leo. I just published my work at https://github.com/btheado/leo-editor/tree/pytest-experiment. You should be able try it out with these commands (untested): git origin add btheado https://github.com/btheado/leo-editor.git git checkout

Re: How to install console leo w/o installing pyqt?

2019-12-23 Thread Brian Theado
Just don't install pyqt at all. I was playing with the web app version of flexx a while back and I think I only installed these pip packages: pip install docutils nbformat pylint pypandoc sphinx semantic_version flexx and then ran leo from the git checkout with --gui=browser. You should be

Re: Progress report re #1451: unsaved files

2019-12-15 Thread Brian Theado
Edward, On Sun, Dec 15, 2019 at 5:42 PM Edward K. Ream wrote: > On Sun, Dec 15, 2019 at 7:59 AM Brian Theado > wrote: > [...] > That behavior doesn't seem to be the most user friendly. Better that than >> having the bug where changes are lost, but I wonder if there is a w

Re: Progress report re #1451: unsaved files

2019-12-15 Thread Brian Theado
If I'm understanding correctly, with your planned changes if a user opens a leo file and makes a few changes and then undoes all the changes and tries to close the file, then the user will be prompted about saving changes even though the outline matches everything on disk. Is that correct? That

Re: book authoring: formatting, auto-save, auto-commit to git

2019-12-08 Thread Brian Theado
See also this thread: https://groups.google.com/d/msg/leo-editor/1VOYPUJrNEM/ItZwstC0AwAJ. It might be helpful related to git autocommit. On Fri, Dec 6, 2019 at 12:36 PM Terrence-Monroe: Brannon < thequietcen...@gmail.com> wrote: > I found a good answer to git auto-committing: >

Re: Enhancing color scheme

2019-12-06 Thread Brian Theado
use changed version? I should edit files in the git repo and then make a pull request? It sounds like you are making improvements which would benefit everyone. IMO, for those cases it would make sense to edit the files in the git repo and make a pull request. Brian On Fri, Dec 6, 2019 at 2:56 A

Re: Enhancing color scheme

2019-12-05 Thread Brian Theado
Sorry, I meant ctrl-shift-V On Thu, Dec 5, 2019 at 3:00 PM Brian Theado wrote: > Copy the xml text to your clipboard. Open a leo outline and hit > ctrl-shift-C. Or right click on a node and select "Paste Node" > > On Thu, Dec 5, 2019 at 2:53 PM gar wrote: > >>

Re: Enhancing color scheme

2019-12-05 Thread Brian Theado
Copy the xml text to your clipboard. Open a leo outline and hit ctrl-shift-C. Or right click on a node and select "Paste Node" On Thu, Dec 5, 2019 at 2:53 PM gar wrote: > Thanks! > But how can I paste raw xml as a node? Couldnt even imagine that this were > possible > > четверг, 5 декабря

Re: Enhancing color scheme

2019-12-05 Thread Brian Theado
This thread may interest you: "Defining colorizer modes in @script" https://groups.google.com/d/msg/leo-editor/X9tjxbOq6es/lxyaIooWQzsJ. I never followed through on avoiding the need for the monkey patch. I don't use this code anymore and when I tested it didn't work. I made a small change

Re: Bob H: would distinct Leo IDs help with #1348?

2019-11-08 Thread Brian Theado
On Fri, Nov 8, 2019 at 8:35 AM vitalije wrote: > >> 1) Eliminate the generation of a GNX before reading a file. >>> >> >> Hmm. I wasn't aware that Leo did that. Why does this cause problems? >> >> Since the hidden root node always has GNX hidden-root-vnode-gnx, the >>> motivation for this GNX

Re: @button for displaying all parents of a clone to log pane

2019-10-12 Thread Brian Theado
using those options? I didn't include those options in my show-clone-ancestors, but that is easy to change. I figured the important part is that if you click on the same-looking links, it will still take you to the distinct instances of that position Brian -- You received this message

Re: @button for displaying all parents of a clone to log pane

2019-10-10 Thread Brian Theado
Edward, On Thu, Oct 10, 2019 at 12:36 PM Edward K. Ream wrote: [...] > Done at 5e0117d, if I understand you correctly. > Thanks! > I confess that I find both commands confusing, but I'll leave them in. > Thanks for the feedback. Do you mean you find the output confusing or how to use it

Re: @button for displaying all parents of a clone to log pane

2019-10-10 Thread Brian Theado
newline = False) g.es_clickable_link(c, clone, 1, runl + "\n") SegundoBob, this one should work better for your clone structure, though in general there will be more output from this one than the other one. On Tue, Oct 8, 2019 at 8:56 AM Brian Theado wrote: > In my previous email

Re: @button for displaying all parents of a clone to log pane

2019-10-08 Thread Brian Theado
p.v)[0]) #c.selectPosition(c.vnode2allPositions(p.v)[1]) On Tue, Oct 8, 2019 at 3:59 AM Edward K. Ream wrote: > On Mon, Oct 7, 2019 at 5:49 PM Segundo Bob wrote: > > Brian is right. Edward, I think your fix does not fix the problem. >> > > Please let me know what cod

Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Brian Theado
Thanks, Edward for putting this code into the core as a command. You interpreted SegundoBob's request differently, than I did. I was thinking he didn't mind that the duplicates are there (and maybe prefers it?), just that he wanted the displayed links go to the separate instances of the clones.

Re: @button for displaying all parents of a clone to log pane

2019-10-07 Thread Brian Theado
. Maybe the g.handleUnl method (which is the callback when a UNL link is clicked) is doing something wrong. The short answer is that this is standard, core Leo code I'm calling. The long answer is that it will take some investigation. Brian On Mon, Oct 7, 2019 at 2:05 PM SegundoBob wrote

@button for displaying all parents of a clone to log pane

2019-10-06 Thread Brian Theado
and the clone is displayed: @button show clones for clone in c.vnode2allPositions(p.v): parent = clone.parent() if parent: g.es_clickable_link(c, clone, 1, f"{parent.h }->{clone.h}\n") Thanks to the c.vnode2allPositions and g.es_clickable_link methods, the code is easy! B

Re: New plugin history_tracer

2019-10-03 Thread Brian Theado
Did you actually make a change to your outline? Body edits don't count. Iirc Vitalije's code doesn't send anything unless a command is executed. On Thu, Oct 3, 2019 at 3:35 PM Edward K. Ream wrote: > > > On Thu, Oct 3, 2019 at 10:22 AM vitalije wrote: > >> Try to write leo-ver-server-files.txt

Re: Pytest command

2019-10-02 Thread Brian Theado
Vitalije, I was looking at the execute-pytest code and it looked to me like only the assertion rewrite functionality from pytest is being used. I would guess none of the hooks or fixtures and maybe most plugins will work. I don't much trust my code reading so I figured I'd better test it, but I

Re: leo from devel fail to start on windows

2019-10-01 Thread Brian Theado
Try looking in your %HOME%/.leo/db directory (or whatever it is on windows). See if there is a file with scripts.leo in its name. If so, then move the db directory to db.bak and try starting leo again. I encountered a similar issue the other day and I didn't realize it might be due to new leo

Re: How to trace Leo Core?

2019-09-29 Thread Brian Theado
thon leo-bridge-test.py 2>&1 | less -R Not sure this is really what you are after, but I thought I'd share in case in helps. Brian On Sun, Sep 29, 2019 at 3:43 PM Viktor Ransmayr wrote: > Hello Edward, > > I tried to find out, if I can enable 'auditing/ tracing' for Leo in

Re: New plugin history_tracer

2019-09-28 Thread Brian Theado
gt; > contains > the plugin. > > On Saturday, September 28, 2019 at 10:10:03 PM UTC+2, btheado wrote: >> >> Vitalije, >> >> I'm see a blank @file history_tracer.py. Did you forget a 'git add'? >> >> Brian >> >> On Sat, Sep 28, 2019 at 2:22

Re: New plugin history_tracer

2019-09-28 Thread Brian Theado
Vitalije, I'm see a blank @file history_tracer.py. Did you forget a 'git add'? Brian On Sat, Sep 28, 2019 at 2:22 PM vitalije wrote: > I finally got around to pack and publish my new plugin history_tracer. > > In order to be useful one must have installed leo-ver-serv utility. I

Re: Pytest command

2019-09-26 Thread Brian Theado
/latest/plugins.html#using-plugins https://docs.pytest.org/en/latest/reference.html#collection-hooks https://pluggy.readthedocs.io/en/latest/ That's quite an impressive plugin system pytest has. Brian On Thu, Sep 26, 2019 at 6:31 AM vitalije wrote: > Hm, looking in the output it se

Re: Automatically move to the beginning/end of line

2019-09-26 Thread Brian Theado
Thanks a lot, Edward! I'll give it a try later. I discovered when using my code on a mac laptop that I had to bind to Keypad-Up and Keypad-Down. Apparently the laptop keyboard on my mac doesn't have any keys mapping to just plain Up and Down. On Thu, Sep 26, 2019 at 12:10 PM Edward K. Ream

Re: Automatically move to the beginning/end of line

2019-09-26 Thread Brian Theado
the beginning of the line > 2. press shift and up twice > 3. press tab > 4. enjoy with how first not selected line is idented > > чт, 26 сент. 2019 г. в 16:41, Edward K. Ream : > >> >> >> On Thu, Sep 26, 2019 at 8:16 AM gar wrote: >> >>> Thanks for tha

Automatically move to the beginning/end of line

2019-09-26 Thread Brian Theado
When moving down a text editor line-by-line, I rely on the common behavior of automatically moving to the end of the line when trying to scroll down past the last line. Similar for when scrolling up past the first line. Leo doesn't have this behavior, so I wrote the below script. Thought I'd share

Re: Devs, please don't add commit_timestamp.json

2019-09-23 Thread Brian Theado
Maybe vitalije still has the old git hook: $ git log -- leo/core/commit_timestamp.json [...] commit 65ca5ec3d4a3af17c538026d825fcea782eb5b8a Author: vitalije Date: Mon Sep 23 08:17:05 2019 +0200 Fixed issue #658 Leo build: 20190923061705 On Mon, Sep 23, 2019 at 7:16 AM Edward K.

Re: Unpredictable bug: "NewHeadline" instead of actual headline

2019-09-19 Thread Brian Theado
Without seeing actual code, I find it difficult to understand your explanation enough to come up with any guess. But it seems you have 3 things: leo code, your comparison code, and your unit test code. Since this problem started happening, at least one of those things had to have changed right? I

Re: Automatic git commit on save using entr

2019-09-15 Thread Brian Theado
In one tab I launch leo. If I leo exits, I just launch >> again within the same console instance. With that use case I expect to end >> up with multiple instances of rerun2. >> >> Brian >> > > By using the & after the command in the bash script,

Re: Automatic git commit on save using entr

2019-09-15 Thread Brian Theado
Vitalije, YMMV, but I had a bad experience with watching files when using Leo. Leo > often writes files in two phases and it happened to me more than once that > process watching on files take an empty file or not completely written > because of this. So, I had to add some latency to watcher. >

Re: Automatic git commit on save using entr

2019-09-15 Thread Brian Theado
leo exits, I just launch again within the same console instance. With that use case I expect to end up with multiple instances of rerun2. Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and sto

Re: Automatic git commit on save using entr

2019-09-15 Thread Brian Theado
Thanks, Vitalije. I had rejected the 'save2' approach because I wanted to run the git commit in the background so it wouldn't add any extra time to the save. Using 'save2' doesn't preclude running the process in the background, but if I take the "naive" approach of using g.execute_shell_commands,

Automatic git commit on save using entr

2019-09-14 Thread Brian Theado
ll watch the given list # of filenames and run the commands whenever changed g.execute_shell_commands( f"""&( flock -n 9 || exit 1 ls {c.fileName()} | entr -s 'git diff . | cat git commit -m "$(date +%Y-%m-%d) autocommit" .' ) 9> {c.fi

Re: Global variables in user scripts

2019-09-11 Thread Brian Theado
htDockWidgetArea, dock) >> dock.setWidget(w) >> dock.show() >> >> >> And a function to use the above: >> >> def display_html(html, name = 'test html'): >> w = QtWidgets.QTextBrowser() >> w.setHtml(html) >> display_widge

Global variables in user scripts

2019-09-11 Thread Brian Theado
ieve the old widget each time to perform some sort of delete/cleanup? Brian -- 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+unsubsc

Re: Please test the docks branch

2019-09-06 Thread Brian Theado
I found some strange behavior when launching leo with a non-existent file on the command line. If I don't give any files on the command line or if I give the path to an existing file, then it is fine. But with the new file on command line, the tips windows appears and leo is still running, but

Re: Active settings outline: status report

2019-09-01 Thread Brian Theado
ion causes openFindTab to be called. While this is likely not a valid mode to be running leo, maybe it does point to some actual issue? I'm surprised it causes core to be dumped. Brian -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To

Re: I've just killed two issues

2019-08-26 Thread Brian Theado
ier for the user to deal with just like the complicated sqlite tables were easier for our configuration users, and the settings db you propose is easier for the code to deal with just as our simplified C structure was for our server software. Data transformations can be useful! Brian -- You r

Re: Having trouble writing a simple grouped undo/redo

2019-08-24 Thread Brian Theado
a chance. On Wed, Aug 21, 2019 at 7:45 AM Brian Theado wrote: > Sure, I'll do that or figure out the segfault issue sometime this week. > > On Tue, Aug 20, 2019 at 7:26 AM Edward K. Ream > wrote: > >> Unfortunately, I'm not able to run unit tests without getting a seg

Re: Invalid position error on redo position move

2019-08-21 Thread Brian Theado
f > you are certain that the only changes made are under one vnode (for example > @ftlist node), then it is more efficient to store only subtree of @ftlist. > Thanks a lot for your help. Brian -- You received this message because you are subscribed to the Google Groups "leo-edito

Re: Invalid position error on redo position move

2019-08-21 Thread Brian Theado
Thanks vitalije for noticing the position error. I wonder why it only gave an error on redo and not also for the original operation. Thanks for the vnode-based code. Based on a quick test, it seems better than my position based code as I haven't seen any errors on undo/redo. I'm finding the

  1   2   3   >