OMG: @data history-list is *so* useful

2015-05-01 Thread Edward K. Ream
If you aren't using the @data history-list setting chances are that you 
missing a big chance to simplify your workflow. At one time I thought the 
history list was a minor feature.  I could not have been more wrong.

The body of the @data history-list node should contain a list of command 
names, one per line.  This list can include commands created by 
@command/@button nodes.

You execute items in the history list by doing Alt-X followed by an up 
arrow to get the first item in the list, or one or more down arrows to get 
later items in the list.  The last item you execute from this list goes to 
the head of the list.  Once you have executed an item, Ctrl-P (repeat 
complex command) will re-execute it.

The history list is perfect for commands that aren't quite worth a separate 
key binding, but that nevertheless you find you using quite often.

Even better, the history list is a perfect complement to @button and 
@command nodes that are tailored for a particular outline. For example, 
there is a button called cfa-code in leoPy.leo that executes the 
clone-find-all-flattened command starting at the top-level "Code" node.

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/d/optout.


Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Fri, May 1, 2015 at 5:01 PM, Edward K. Ream  wrote:

​> ​
So I think the problem is in PyInterp.

​Rev ca8fd45 fixes the problem.

PyInterp​.focusInEvent must call the base focusInEvent method in order for
ensureCursorVisible to have effect.  I prefer the following over calling
super::

QtWidgets.QTextEdit.focusInEvent(self,event)

Similarly for PyInterp​.focusOutEvent.

EKR

-- 
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/d/optout.


Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Fri, May 1, 2015 at 8:29 AM, Edward K. Ream  wrote:

2. It's off putting not to have a blinking cursor when the pane has focus.
>

​It took awhile to track down that c.​idle_focus_helper is the code that
checks for "missing" focus.  However, the "active" switch isn't set, which
means that
c.idle_focus_helper never actually changes focus.

Adding a "trace" arg to c.trace_idle_focus confirms that when I click in
the python console pane focus is in PyInterp class, a subclass of
QTextWidget.

So I think the problem is in PyInterp.  It's quite possible that the cursor
blinking is disabled explicitly.  I'll look into it.

EKR

-- 
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/d/optout.


Off-topic: jiphy

2015-05-01 Thread Jacob Peck

A neat looking project: https://github.com/timothycrosley/jiphy

-->Jake

--
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/d/optout.


I'd like help with #106, brew install for MacOS

2015-05-01 Thread Edward K. Ream
If somebody wants a brew install to happen, I would appreciate it if they 
take my latest formula  
and somehow figure out how to test it and make a pull request. I am pretty 
much fed up with the whole procedure.

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/d/optout.


Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Jacob Peck



On 5/1/2015 9:29 AM, Edward K. Ream wrote:

On Tuesday, April 28, 2015 at 2:06:56 PM UTC-5, Jacob Peck wrote:

> Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds 
an interactive python session to your log pane.


This is very cool.  A few comments:

1. The code is based on Python's code module in the standard library.  
The code there is about the same magnitude as the code in the plugin, 
so the entire project is smallish.


And indeed, largely ripped off from the stackexchange thread mentioned 
in the plugin's source ;-)


2. It's off putting not to have a blinking cursor when the pane has 
focus.  It's possible that Leo's focus-handling is to blame.  Jake, 
have you looked into this?  I would rate this the most important 
improvement.


This is my highest priority when I get back to picking at it.  It's on 
my list.  I do think it has something to do with Leo's focus-handling, 
or perhaps the Qt stylesheet.  *shrug*
3. > The console swallows stdout and stderr while focused, but 
properly resets it to the default values when unfocused.


Misleading. Both stdout and stderr are redirected to the interactive 
pane, as can easily be verified. Moreover, sys.__stdout__ and 
sys.__stderr__ are available should scripts need them.


Truth.  I misused 'console' there.  In that sentence, I meant 'the new 
interactive console pane' rather than 'the normal command-line 
console'.  This should be fixed -- I'll push an update soon.


Also, thanks for the hint on __stdout__ and __stderr__... Currently the 
plugin reassigns sys.stdout and sys.stderr to the values stored in 
g.user_dict['old_stdout'] and g.user_dict['old_stderr'] respectively, 
whenever it loses focus.  99% of the time, these will likely be the same 
values as sys.__stdout__ and sys.__stderr__, unless the user has some 
specific configuration in place that sets stdout and stderr to something 
else before the python_terminal plugin loads.


It should be noted in the docstring that sys.__stdout__ and 
sys.__stderr__ can be used inside the interactive pane to print to the 
proper CLI-console.  I'll add this as well.
4. The history stuff is quite useful.  It would be easy to update 
Leo's minibuffer history.  c.nodeHistory is an instance of the 
NodeHistory class defined in leoCommands.py.


Hmm, but the minibuffer lacks the ability to execute python code 
directly, no?  This !hist stores executable lines of python, not Leo 
minibuffer commands.  I'm failing to see the connection here :-/

5. The open-python-window command is much less useful than this plugin.


...I didn't even know that command existed!

Thanks, Jake, for this work.  It is intriguing.

It's strange how I hacked that together in an afternoon.  I'd been 
toying with the idea for about a year, but every time I hit a 
roadblock... then I found the Stackexchange code and it all just fit easily!


-->Jake

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/d/optout.


--
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/d/optout.


Re: New plugin: python_terminal.py, adds an interactive python session to your log pane

2015-05-01 Thread Edward K. Ream
On Tuesday, April 28, 2015 at 2:06:56 PM UTC-5, Jacob Peck wrote:

> Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an 
interactive python session to your log pane.

This is very cool.  A few comments:

1. The code is based on Python's code module in the standard library.  The 
code there is about the same magnitude as the code in the plugin, so the 
entire project is smallish.

2. It's off putting not to have a blinking cursor when the pane has focus.  
It's possible that Leo's focus-handling is to blame.  Jake, have you looked 
into this?  I would rate this the most important improvement.

3. > The console swallows stdout and stderr while focused, but properly 
resets it to the default values when unfocused.

Misleading. Both stdout and stderr are redirected to the interactive pane, 
as can easily be verified. Moreover, sys.__stdout__ and sys.__stderr__ are 
available should scripts need them.

4. The history stuff is quite useful.  It would be easy to update Leo's 
minibuffer history.  c.nodeHistory is an instance of the NodeHistory class 
defined in leoCommands.py.

5. The open-python-window command is much less useful than this plugin.

Thanks, Jake, for this work.  It is intriguing.

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/d/optout.


LeoDocs update - plugins. viewrendered

2015-05-01 Thread lewis
At LeoDocs.leo#Leo's Documentation-->Users Guide-->Plugins-->@rst 
html\plugins.html-->Summary

The entry for viewrendered is duplicated:
*``viewrendered.py``*
*Creates a window for *live* rendering of rst, html, etc.*
*This plugin uses docutils, http://docutils.sourceforge.net/,*
*to do the rendering, so installing docutils is recommended.*
*Supports @graphics-script, @image, @html, @movie and @svg nodes.*
*``viewrendered.py``*
*An alternate/enhanced version of viewrendered.py.*

The second should read viewrendered2.py

Regards
Lewis

-- 
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/d/optout.


Re: Strategy for #165: vim-open-file

2015-05-01 Thread Edward K. Ream
On Thu, Apr 30, 2015 at 1:12 PM, Steve Zatz  wrote:

> What needs to be placed under the @enabled-plugins node (which is under
> @settings) in myLeoSettings.Leo?
>

​vim.py on a line by itself.

​Once you do that, you will see this in the docstring when you open vim
from the plugins menu:

*Installation*

Set the vim_cmd and vim_exe settings as shown below.
Alternatively, you can put gvim.exe is on your PATH.

*Settings*

@string vim_cmd
The command to execute to start gvim. Something like:
/gvim --servername LEO

@string vim_exe
The path to the gvim executable.

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/d/optout.