On Fri, Nov 22, 2013 at 6:24 PM, Chris George <technat...@gmail.com> wrote:

> So it works. I open a new window for the vr pane and set it to float above
> all other windows. The work flow then becomes:
>
> 1. Change content, move nodes around.
> 2. Move to appropriate place in the @rst tree and run rst3 command in the
> mini-buffer.
> 3. Navigate to the @auto node and refresh from disk.
> 4. Run vr-update to see the new output in context.
>
> Realtime would be better IMHO. But I am glad that I can do it at all.
>

You can get pretty much real time by doing this in a script.

Such scripts can be fantastically helpful.

For example, here is the contents of @button make-sphinx in LeoDocs.leo::

@language python
import os
trace = True
g.cls()
c.setComplexCommand('make-sphinx')
if c.isChanged():
    c.save()
aList = c.rstCommands.rst3()
if aList:
    path = g.os_path_finalize_join(g.app.loadDir,'..','doc','html')
    os.chdir(path)
    if len(aList) > 1: g.execute_shell_commands('make clean',trace=trace)
    g.execute_shell_commands('make html',trace=trace)
    fn = aList[0].h.strip() if len(aList) == 1 else 'leo_toc.html'
    fn =
g.os_path_finalize_join(path,'_build','html',g.os_path_basename(fn))
    if g.os_path_exists(fn):
        # Don't wait for this command to exit!
        g.execute_shell_commands(['&%s' % (fn)],trace=trace)

BTW, c.setComplexCommand('make-sphinx') allows me to type Ctrl-P
(repeat-complex-command) to execute this script again.

make-sphinx uses external processes.  From your description, you may not
have to do that.  In any case, 20 minutes spent writing such a script will
transform your workflow.  It did for me.

HTH.

Edward

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to