Re: Help with script.

2018-02-13 Thread Chris George
I now have better control using Leo. When I want to commit an @clean file, I use the second method. When I save a .leo file, I use the first. I'll look at the fossil method as well. I too have been tinkering around the edges with fossil for a while and recently committed to giving it a go. Of c

Re: Help with script.

2018-02-12 Thread Matt Wilkie
> The @button saved the .leo file, triggering the save of the text file as > well. Fossil picked up both changes. > > Is it possible to write the @clean node to disk without saving the .leo > file? That would let me give unique commit messages for each @clean file > and also for the .leo file

Re: Help with script.

2018-02-12 Thread Chris George
No, but now I will be looking into them. Chris On Sun, Feb 11, 2018 at 10:42 PM, Edward K. Ream wrote: > On Sun, Feb 11, 2018 at 1:05 PM, Chris George > wrote: > > Oh man, it is Christmas all over again. >> > > ​Glad you have found Leo helpful ;-) > > Do you know about Leo's shell-command and

Re: Help with script.

2018-02-11 Thread Edward K. Ream
On Sun, Feb 11, 2018 at 1:05 PM, Chris George wrote: Oh man, it is Christmas all over again. > ​Glad you have found Leo helpful ;-) Do you know about Leo's shell-command and shell-command-on-region commands? Edward -- You received this message because you are subscribed to the Google Groups

Re: Help with script.

2018-02-11 Thread Chris George
Oh man, it is Christmas all over again. Here is a modification to your script that other writers and wordies might find useful. It pulls an overview of a word from the Wordnet dataset and returns it to the log pane. w = c.frame.body.wrapper p = w.getSelectedText() message = p.replace('"', "

Re: Help with script.

2018-02-11 Thread Edward K. Ream
On Sunday, February 11, 2018 at 8:26:26 AM UTC-6, Chris George wrote: > Thank-you. ​You're welcome. Imo, being a Leo guru means knowing how to find useful code. I knew the code was in leoAtFile.py. Looking inside the top-level at.Writing node was natural. Another way to find similar code woul

Re: Help with script.

2018-02-11 Thread Chris George
Thank-you. I replaced if c.isChanged(): c.save() in the @button with the new code and it works flawlessly. This is very useful to me. It not only allows me to write discrete commit messages, it taught me a bunch about scripting in Leo. Chris On Sunday, February 11, 2018 at 1:58:44 AM UTC-8

Re: Help with script.

2018-02-11 Thread Edward K. Ream
On Saturday, February 10, 2018 at 9:12:08 PM UTC-6, Chris George wrote: > > The @button saved the .leo file, triggering the save of the text file as > well. Fossil picked up both changes. > > Is it possible to write the @clean node to disk without saving the .leo > file? > Sure. The only questio

Re: Help with script.

2018-02-10 Thread Chris George
The @button saved the .leo file, triggering the save of the text file as well. Fossil picked up both changes. Is it possible to write the @clean node to disk without saving the .leo file? That would let me give unique commit messages for each @clean file and also for the .leo file at the end of

Re: Help with script.

2018-02-10 Thread Chris George
To be clear, I switched to fossil a day or two ago from git, so there may well be things I don't quite get about it yet. Chris On Saturday, February 10, 2018 at 6:30:39 PM UTC-8, Edward K. Ream wrote: > > On Sat, Feb 10, 2018 at 3:09 PM, Chris George > wrote: > > I use Leo to write my weekly co

Re: Help with script.

2018-02-10 Thread Chris George
It worked great. Interestingly, firing the commit found ALL the changes in the entire repository, including the Leo files, irrespective of file path. So I dug a bit more. Adding the commit to the end of the batch file I use to run Leo also picks up ALL changes from ALL folders and commits the

Re: Help with script.

2018-02-10 Thread Terry Brown
I think the key issue is getting the command to execute with the right current directory. I wonder, would c.selectPosition() on the @file node do that? I have a script fragment (not on my phone :) I use for that, but it always seems it should just be p.cd_for_node() or something, and that should

Re: Help with script.

2018-02-10 Thread Edward K. Ream
On Sat, Feb 10, 2018 at 3:09 PM, Chris George wrote: I use Leo to write my weekly column using @clean nodes created using an > abbreviation. > > [I want an @button script to do the following]: > > 1) Save the @clean file to disk. > ​c.save() will do this. ​ > 2) Run a system command in the f