Re: Can Leo render math in markdonw node ?

2016-04-14 Thread Peter Mills
Certainly with VR3 math is rendered fine in reStructuredText using the usual 
syntax built into reST:

.. math::

  Put latex here without dollar signs

You can use the default HTML renderer or choose mathjax for slightly better but 
slower rendering.

However, for markdown, I haven't heard anything about capability to accept 
latex.

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Peter: VR3 is ready for you

2016-04-02 Thread Peter Mills
On Saturday, April 2, 2016 at 12:33:11 AM UTC+10, Edward K. Ream wrote:
>
> Peter, I am going to hand over this project to you.  You should be the one 
> to carry on.  Only the code in WebViewPlus class should need to change.  
>
 
Yep, I'll pick this up and see what pops out ;-) 

That's all for now.  VR is already obsolete, imo, and I hope VR2 will 
> quickly become obsolete as well.  Once you have finished your work, we can 
> see whether the global VR3 switch should always be on, or whether it should 
> be replaced by a user option.
>

I've checked a few things and VR3-mode does most of what it is supposed to 
- I've made a list of things to fix (some outstanding for some time).  As 
you've suggested, I think they'll nearly all be in the WebViewPlus class.

What I have just said is probably pretty much Greek to everyone.  I expect 
> that Peter will have to read the code to see what I am talking about.
>

I've spent a couple of hours figuring out where VR2/3 is up to and I think 
I've got my head around it.

When I think I'm done, should I generate a github pull-request?  (I've 
created a separate branch for these changes)

Peter.

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Encoded stickynote bug?

2016-04-01 Thread Peter Mills
On Thursday, March 31, 2016 at 12:24:40 AM UTC+10, Terry Brown wrote:
>
> Should be fixed, should have been g.toUnicode(txt), seeing unicode() 
> doesn't exist in Python 3.  If you can try the latest commit and 
> confirm, that would be good. 
>
 
Thanks Terry (including correctly interpreting my incomplete test sets).

Assuming I have properly pulled this into my local repository, it still 
fails, but with a new error:

Leo 5.3-devel, build 20160331215754, Thu Mar 31 21:57:54 CDT 2016

Git repo info: branch = master, commit = 59b4cf2d7d95

Python 3.5.1, PyQt version 4.8.7
linux

Traceback (most recent call last):
  File "/home/peter/Dropbox/git/leo-editor/leo/plugins/qt_events.py", line 126, 
in eventFilter
k.masterKeyHandler(event)
  File "/home/peter/Dropbox/git/leo-editor/leo/core/leoKeys.py", line 3300, in 
masterKeyHandler
done = k.doMode(event, state, stroke)
  File "/home/peter/Dropbox/git/leo-editor/leo/core/leoKeys.py", line 3378, in 
doMode
val = k.callStateFunction(event) # Calls end-command.
  File "/home/peter/Dropbox/git/leo-editor/leo/core/leoKeys.py", line 3353, in 
callStateFunction
val = k.state.handler(event)
  File "/home/peter/Dropbox/git/leo-editor/leo/core/leoKeys.py", line 2534, in 
fullCommand
ok = k.callAltXFunction(k.mb_event)
  File "/home/peter/Dropbox/git/leo-editor/leo/core/leoKeys.py", line 2588, in 
callAltXFunction
func(event)
  File "/home/peter/Dropbox/git/leo-editor/leo/plugins/stickynotes.py", line 
354, in stickynoteenc_f
sn_getenckey()
  File "/home/peter/Dropbox/git/leo-editor/leo/plugins/stickynotes.py", line 
421, in sn_getenckey
sha.update(txt)
  File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/Crypto/Hash/hashalgo.py",
 line 69, in update
return self._hash.update(data)
TypeError: Unicode-objects must be encoded before hashing

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Encoded stickynote bug?

2016-03-29 Thread Peter Mills
I'm getting tracebacks when I use Leo's "stickynoteenc" command on an 
encoded node.  Immediately after I put in my password, the traceback below 
occurs.  However, it doesn't occur in all my environments and 
installations.  The successes and failures are listed below.  Obviously it 
coincides with Python 3, which combined with a unicode error matches up 
nicely ;-)  I've looked quickly at the code, but I can't see what it going 
on (I'm relatively new to Python3 and unicode stuff).  But it would seem 
that the bug goes back to December of last year at least.  Does this mean 
I'm the I the only regular user of stickynoteenc or is my testing faulty?

Hope that helps
Peter.
..

Note that there are several combinations of Leo build, python version, PyQt 
version and operating system here:


Works fine:

   - Leo 5.3-devel, build 20160327164927, Sun Mar 27 16:49:27 CDT 2016
   Not running from a git repo
   Python 2.7.6, PyQt version 4.8.6
   linux2
   - Leo 5.3-devel, build 20160327164927, Sun Mar 27 16:49:27 CDT 2016
   Not running from a git repo
   Python 2.7.11 [ed: from Anaconda], PyQt version 4.8.7
   linux2
   
Fails with exception:

   - Leo 5.1-final, build 20151207062203, Mon Dec 7 06:22:03 CST 2015
   Not running from a git repo
   Python 3.5.1 [ed: from Anaconda], PyQt version 4.8.7
   linux
   - Leo 5.2-b1, build 20160313181002, Sun Mar 13 18:10:02 CDT 2016
   Not running from a git repo
   Python 3.5.1, PyQt version 4.8.7
   Windows 7 AMD64 (build 6.1.7601) SP1
   
Typical Traceback (only the paths differ):


File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/plugins/qt_events.py",
 line 126, in eventFilter
  k.masterKeyHandler(event)
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/core/leoKeys.py",
 line 3299, in masterKeyHandler
  done = k.doMode(event, state, stroke)
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/core/leoKeys.py",
 line 3377, in doMode
  val = k.callStateFunction(event) # Calls end-command.
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/core/leoKeys.py",
 line 3352, in callStateFunction
  val = k.state.handler(event)
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/core/leoKeys.py",
 line 2533, in fullCommand
  ok = k.callAltXFunction(k.mb_event)
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/core/leoKeys.py",
 line 2587, in callAltXFunction
  func(event)
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/plugins/stickynotes.py",
 line 366, in stickynoteenc_f
  sn_getenckey()
File 
"/home/peter/anaconda2/envs/py3/lib/python3.5/site-packages/leo/plugins/stickynotes.py",
 line 428, in sn_getenckey
  txt = unicode(txt)
NameError: name 'unicode' is not defined

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: MD or RST?

2016-03-28 Thread Peter Mills


Sorry for the late reply.


I agree Edward, although rather than having VR2 based on VR, I think there 
should only be *one* viewrendered-type plugin. Having two must confuse a 
lot of users!

A few comments:

   - 
   
   There was a proposal in 2015 to merge VR2 and VR2 - 
   
https://groups.google.com/forum/?hl=en-GB#!searchin/leo-editor/VR2/leo-editor/cgmkazlacxg/YDrBKCyUBFMJ
   - 
   
   As I mentioned in that thread:
   
   “.. it was always intended to be merged with VR later on because of all 
   the common code that remained and the confusion caused by the multiple VR 
   plugins. Also, when installed, VR2 masquerades as VR anyway, to retain 
   compatibility with the pane management etc.”
   - 
   
   (re Jake’s comment) Multiple VR2 panes was not only possible but 
   incorporated into the design and GUI. VR2’s “Lock to node” option allowed a 
   VR2 pane to stay rendering the nominated node, even when another VR2 pane 
   was opened (using freelayout) and followed the highlighted node. This could 
   in theory be extended to several VR2 panes locked to their own nodes. Alas, 
   this “lock to node” feature broke somewhere in the very necessary 
   conversion to Python3 code (the fix is not that hard though).
   
   Now that I test this (not having had multiple VR2 panes open for a long 
   while), I find that a second VR2 pane refuses to open. It definitely used 
   to work well. Similarly, with a VR2 pane open, getting help on a plugin 
   would open a second VR2 pane (which also doesn’t work now).
   - 
   
   As Edward points out, VR2 is essentially a modified copy of VR that uses 
   the QWebView renderer and a little GUI. This makes maintenance of both a 
   chore because updates to the VR code has to be redone on VR2 in order to 
   keep them in sync.
   - 
   
   I still use only VR2 (in fact this post has had it's html copied and 
   pasted out of VR2) so I know it still does most of the things it was 
   intended for, although I do sometimes patch in some fixes, like for the 
   above “lock to node” bug.
   
In summary, I’d suggest (depending on how well VR2 has kept up with VR’s 
updates) that VR2 is essentially a superset of VR functionality, and should 
become the *only* VR plugin. If there is something that the VR renderer has 
that VR2’s QWebview pane cannot reproduce, then incorporating that would be 
good. It must be a superset of VR functionality to allow us to drop VR. 
Worst case, if necessary, would be to have a configuration item to choose 
which renderer the *only* VR plugin uses.


Of course we would need to fix some bugs in VR2 too ;-). I think I have a 
bit better handle on “git” these days, so I could probably be able to 
successfully submit a pull request as Edward suggested in the earlier 
discussion ;-)


Peter

On Saturday, 26 March 2016 10:53:24 UTC+10, Edward K. Ream wrote:
>
> On Fri, Mar 25, 2016 at 7:47 PM, gatesphere <gates...@gmail.com 
> > wrote:
>
>> On 3/25/2016 8:25 PM, Edward K. Ream wrote:
>>
>> On Fri, Mar 25, 2016 at 4:14 PM, 'Terry Brown' via leo-editor < 
>> leo-e...@googlegroups.com > wrote:
>> Furthermore, why not have the "id" be 
>> WhateverProvider.__class__.__name__?  This works provided that each 
>> Provider class actually has a distinct name.
>>
>> What do you think?  Would it be somehow inconvenient to dispense with the 
>> Provider classes?
>>
>> The details are murky now, but I remember a while back fixing a few bugs 
>> when viewrendered2 came about -- IIRC, the various help/docstring/plugin 
>> docs commands pretty much expect there to be a single vr pane.  I have no 
>> idea if that's still the case.
>>
>
> ​It sure looks that way to me.
>
> BTW, the subtle differences between VR and VR2 are making ​my head spin.  
> I'm thinking that one way forward would be to base VR2 on VR.  That is, VR2 
> would use import leo.plugins.viewrendered and use the VR version of 
> ViewRenderedController, perhaps with a mode bit, or just monkey patching 
> the VR html_class ivar.
>
> In other words, I would really like the only difference between the VR and 
> VR2 plugins to be the value of the html_class ivar.  I'm not sure that 
> makes sense, but it sure doesn't make sense to have two different 
> almost-but-not-quite-identical ViewRenderedController classes!
>
> Peter Mills, if you are following this, I'd like your comments.
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: merge both viewrendered plugins

2015-06-17 Thread Peter Mills
I agree.  When I first wrote VR2, it was always intended to be merged with 
VR later on because of all the common code that remained and the confusion 
caused by the multiple VR options.  Also, when installed, VR2 masquerades 
as VR anyway, to retain compatibility with the pane management etc.

If you are going to merge them, I have some bug fixes for VR2 that I 
haven't submitted yet (mostly due to not having mastered git and 
pull-requests).  I can generate a patch file if that helps?

Peter

-- 
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: Implementing goto-next-N-visible

2015-06-04 Thread Peter Mills
On Friday, May 29, 2015 at 9:02:32 PM UTC+10, john lunzer wrote:

 I had a suspicion that a plugin could be causing the problem. Sure enough the 
 todo.py plugin causes the significant lack of visual updates. Even with all 
 plugins disable traversing the list using Up/Down-arrow is still a little 
 choppy but much much better. It is only the todo.py plugin which causes the 
 significant lag in visual updating in the tree, however.


I've experienced the same annoying slow, non-updating tree movement with 
the up/down key navigation.  I didn't think to look into the plugins.  Lo 
and behold, removing the todo plugin fixes that problem for me too!  There 
is only a barely noticeable visual lag remaining now (which may well be due 
to syntax highlighting, but I thought highlighting was delayed so that it 
didn't interfere).  Thanks for the tip! 

Leo 5.1-final, build 20150421110203, Tue Apr 21 11:02:03 CDT 2015
Python 2.7.6, PyQt version 4.8.4
Windows 8 AMD64 (build 6.2.9200) 

That said, there is still visual lag when holding down Ctrl+Up or Ctrl+Down 
 in the body which moves a line of text. That may be a whole other 
 bug/issue. Can somebody confirm if they're seeing this behavior?


I didn't know this shortcut existed; it will probably get used a lot from 
now on.  I can confirm that this slow visual updating behaviour remains for 
me, even after removing the todo plugin.

-- 
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-04-30 Thread Peter Mills
I've done a bit of looking at Spyder myself with similar ideas.  However, 
Spyder's IPython console uses an external IPython kernel, so it would be 
impossible(?) to access Leo's innards using this technique.  In fact, I 
haven't been able to find a way to have both the GUI of IPython QtConsole 
and the kernel running within another application.  It seems (from the 
IPython documentation) that you can have one or the other but not both.

Having said that, I know that Spyder manages to send blocks of code (from 
the editor) to the IPython kernel to execute.  This could be useful for 
executing code from nodes, so long as there isn't a need to access the Leo 
node tree from the IPython kernel.

Good luck with your study of Spyder/ILeo!

-- 
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-04-28 Thread Peter Mills
Wow.  I'll have to try both these plugins.  I too use Spyder and have found 
it difficult to do without its console or some sort of external console 
even when working within Leo.  These plugins within the Leo GUI should make 
a huge difference for me.  

John L, is the IPython console functional apart from the g,c,p omissions, 
or does it need the ILeo bug fixed first?  Is the code available yet?

On Wednesday, April 29, 2015 at 5:06:56 AM UTC+10, Jacob Peck wrote:

  Hi all,
  
 Rev d30c0993f8 includes a new plugin, python_terminal.py, that adds an 
 interactive python session to your log pane.  Here's the docstring:

  Leo.plugins.python_terminal 

 Provides an interactive python terminal in the log pane.

 By Jacob M. Peck
  Usage 

 Enabling this plugin will add a new tab to the Log pane, labeled “Python 
 Console”. This is a fully interactive python command shell, with access to
  g, c, and p included!

 Features:


- Includes support for g, c, and p 
- Each outline tab has a separate python console, with a separate 
namespace (aside from g, of course) 
- Extremely primitive tab-completion 
- Command history (use !hist to list, and !hist(n) to recall the n’th 
entry) 
- !clear to clear the console 

  Caveats:


- The console swallows stdout and stderr while focused, but properly 
resets it to the default values when unfocused 
- Just as with scripts, if you do something dangerous, you’re on your 
own 

  This code is largely lifted from 
 http://stackoverflow.com/questions/12431555/enabling-code-completion-in-an-embedded-python-interpreter,
  
 with some modifications made for Leo embedding.
  
 

 I hope it comes in handy for those who wish to work with Leo in a 'live' 
 capacity (as an alternative to livecode.py), or those who simply like to 
 see a REPL while they're thinking about things :)  Or those who want a 
 simple calculator... or something.

 Anyways, enjoy :)

 --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.


Re: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-20 Thread Peter Mills
This is a good point to raise, to make sure VR2 and Leo stays as good 
general purpose tools, that are useful widely.

For the MathJax option, I think the .js and font downloading and internet 
connection don't happen when docutils renders a page without any math 
included.  I've looked at the exported html file for a node without math 
and I can't find any js or MathJax references, so I don't think this slows 
down the render in any way.

I think for anyone who genuinely uses math, the math.css rendering is 
almost useless and certainly wouldn't be regarded as production quality 
(unless I'm doing something very wrong).  

One of the reasons that I wrote VR2 was to have output that looked 
production quality out of the box and math for me was a key element. 
 Strangely, in my mind, if I got stuck with the latex output because I 
don't have an internet connection, I'd prefer that to the math.css 
rendering (so that, in theory, you can actually figure out what it should 
have looked like).  The IPython Notebook also uses MathJax even when used 
entirely within the same machine.

So my vote would be to keep MathJax as the default.  It seems that it won't 
make any difference to those who don't use math.  Thoughts?


On Sunday, April 20, 2014 11:31:44 AM UTC+10, T P wrote:

 On Sat, Apr 19, 2014 at 4:20 PM, Peter Mills 
 peter.m...@gmail.comjavascript:
  wrote:

 @language rest 

 .. math:: 

   α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ 

 This renders beautifully when exported. 


 Does when exported mean it doesn't render at all in VR2 or is it just 
 ugly?  I have noticed that within VR2 (and the WebView class) that MathJax 
 renders the math quite small, in contrast with an export to Chrome.  This 
 can be improved by right-clicking on the math, choosing Math 
 Settings--Scale All Math and setting it to 300% or so.  This scaling seems 
 to be persistent for all rendering of any node in that outline; however it 
 reverts to its original scale when the outline is closed and reopened.


 At least on my system, the latex
  
 looking code displays for a few seconds initially and then the MathJax 
 javascript kicks in and the math is displayed correctly but very tiny.

 I was a bit surprised actually that MathJax works by default. At least 
 with Sphinx, you used to have to change your template file to add the 
 MathJax stuff to the head tag. I looked around and saw that you set the 
 default for the docutils math_output option to MathJax. I think that really 
 should be HTML math.css, the docutils default [1]. I actually would 
 prefer it if viewrendered2 was designed so you could specify a vr- 
 setting **without** actually setting that docutils option. Now those two 
 concepts are conflated in the getConfig() method.

 Currently, the MathJax.js gets added, its fonts are downloaded, you need 
 to be connected to the internet to connect to the MathJax CDN, and in 
 general page loading is slower. Not everyone will be displaying math so 
 they shouldn't have to pay these penalties. This is not as big an issue 
 with real web browsers as the javascript and fonts are cached. However, I'm 
 not sure how that works with QWebKit?

 [1] http://docutils.sourceforge.net/docs/user/config.html#math-output
  

-- 
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: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-20 Thread Peter Mills


 Currently, the MathJax.js gets added, its fonts are downloaded, you need 
 to be connected to the internet to connect to the MathJax CDN, and in 
 general page loading is slower. Not everyone will be displaying math so 
 they shouldn't have to pay these penalties. This is not as big an issue 
 with real web browsers as the javascript and fonts are cached. However, I'm 
 not sure how that works with QWebKit?


This is a good point to raise, to make sure VR2 and Leo stays as good 
general purpose tools, that are useful widely.

For the MathJax option, I think the .js and font downloading and internet 
connection don't happen when docutils renders a page without any math 
included.  I've looked at the exported html file for a node without math 
and I can't find any js or MathJax references, so I don't think this slows 
down the render in any way.

I think for anyone who genuinely uses math, the math.css rendering is 
almost useless and certainly wouldn't be regarded as production quality 
(unless I'm doing something very wrong).  

One of the reasons that I wrote VR2 was to have output that looked 
production quality out of the box and math for me was a key element. 
 Strangely, in my mind, if I got stuck with the latex output because I 
don't have an internet connection, I'd prefer that to the math.css 
rendering (so that, in theory, you can actually figure out what it should 
have looked like).  The IPython Notebook also uses MathJax even when used 
entirely within the same machine.

So my vote would be to keep MathJax as the default.  It seems that it won't 
make any difference to those who don't use math.  Thoughts? 

-- 
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: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-19 Thread Peter Mills



 getConfig(gc.getString, 'syntax_highlight', 'long')
 getConfig(gc.getBool,   'no_compact_lists', False)
 getConfig(gc.getBool,   'no_compact_field_lists', False)

 and also specifying in your @settings at least:

 @string vr-syntax-highlight = short


These look like really important additions to the default configuration in 
the plugin.  Given that Leo uses Pygments for syntax colouring, would we 
not make the default value in the GetConfig 'short' so we wouldn't need the 
nuisance requirement to have the 'short' option set in the @settings tree? 

Only after reading this thread have I realised that my leo_vr.css that I 
use and included in an earlier post was in fact a customised css 
specifically to get around this short/long problem.  I'd completely 
forgotten about that kludge.

-- 
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: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-19 Thread Peter Mills


 @language rest 

 .. math:: 

   α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ 

 This renders beautifully when exported. 


Does when exported mean it doesn't render at all in VR2 or is it just 
ugly?  I have noticed that within VR2 (and the WebView class) that MathJax 
renders the math quite small, in contrast with an export to Chrome.  This 
can be improved by right-clicking on the math, choosing Math 
Settings--Scale All Math and setting it to 300% or so.  This scaling seems 
to be persistent for all rendering of any node in that outline; however it 
reverts to its original scale when the outline is closed and reopened.

-- 
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: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-18 Thread Peter Mills


 Ooops. Sorry about that. I, of course, should have linked to the messages 
 that started it all. My only excuse is that I had to read lots of stuff 
 written by people who already were very familiar with Leo and often assumed 
 knowledge I didn't have. I was mainly focused on writing a summary with 
 everything I learned in one place for easier reference. But yes, I 
 definitely should have mentioned you so thanks for correcting my 
 embarrassing oversight :)

 
No apology required - I wasn't at all worried about attribution or the 
accuracy of your already comprehensive bibliography.  I was mostly 
concerned that you may not have seen those earlier css and js attachments 
before you dived into VR2's workings.

Thanks also for critiquing VR2.  As you pointed out, there tends to be 
confusion between VR1 and VR2 at the moment and I would like to see VR2 to 
be the only version - at the end of the day VR2 is only really different in 
they way it treats reST and (with Jake's additions) md.  This means making 
sure nothing of significance is lost from VR1 and that VR2 is reasonably 
bugless.  There are some specific bugs I have in mind that I hope to fix 
over the next week or so (if I can get my head around git and GitHub). 

On that note I was particularly interested in **how** you got that layout? 
 Every time I've tried to do anything other than the standard layout, I get 
 hit by all sorts of RuntimeError: wrapped C/C++ object of type 
 NestedSplitter has been deleted log messages every time I thereafter do 
 any sort of Window operation (typically on the Log pane). I'll eventually 
 get around to writing a detailed post about the issue but in the meantime I 
 was just curious.


Perhaps you are trying to use the menu items under Cmds for laying out 
panes - I've had similar errors come up for them. Instead, I use the 
freelayout plugin.  I'm not sure if it's installed by default, but 
right-clicking on the blue borders between panes brings up a menu of layout 
modifications.

Finally, thank you for forcing me to wonder how you managed to link to a 
 particular Google Groups message. I never noticed that the Reply button 
 dropdown menu has a Link item for that :)  A web interface feature that 
 people who only use the email interface might never be able to use (oblique 
 reference to another post of my mine called Turning on more Google Groups 
 features).

 
Yes, I only just discovered that on the above post too. 

-- 
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: HOWTO: Display reStructuredText with stylesheets using the Viewrendered2 plugin

2014-04-17 Thread Peter Mills
Hi

That's a really useful write-up!  Thanks.

It is also worth noting, in case you haven't seen it yet, that there is 
some further information contained in the post:

Re: viewrendered2 plugin - Manual and support files
https://groups.google.com/d/msg/leo-editor/BDzmytlSegw/xb-G_fk_m6kJ

This post, unsurprisingly, contains a reasonable manual of the 
viewrendered2 plugin, as well as some support files including some css 
which will get a nicer output than the docutils default.  It also contains 
the support files for making the s5 slideshow functionality work (although 
for best results a patch is required to docutils).  There is also a 
VR2test.leo file which demonstrates some of these features, although at 
least one element of the notebook functionality in this demo requires the 
matplotlib package to be installed (for the plot).

Unfortunately, the manual from that post hasn't made it into the plugin's 
docstring yet - I was hoping to get time to improve on it before putting it 
in there.  That hasn't happened yet.

Earlier in the same leo-editor topic (viewrendered2 plugin) there is a 
bit of background to why I wrote it in the first place, and where I think 
its limitations lie.

Have fun with it.

Peter

On Thursday, April 17, 2014 12:14:45 PM UTC+10, T P wrote:

 I've only been using Leo for a few days, and spent most of today figuring 
 out how to get the new Viewrendered2 plugin to use stylesheets while 
 displaying reStructuredText (and Markdown) nodes. So here's a brief summary 
 to make this easier for others.

 As far as prerequisites go for using reStructuredText I suggest you just 
 use easy_install -U Sphinx to get Sphinx (http://sphinx-doc.org/), 
 since it not only installs Sphinx but its dependencies:  Jinja2, docutils, 
 and Pygments. In any case, you'll need at least:

 * docutils (https://pypi.python.org/pypi/docutils/0.11)

 * pygments (http://pygments.org/)

 The new viewrendered2 plugin only works with the latest version of Leo on 
 github. It doesn't work with Leo 4.11 Final. The only way I could get the 
 viewerendered2 plugin to work was to change the Global Settings 
 (leoSettings.leo) --- something the documentation recommends you **not** 
 do. In the @enabled-plugins node, I commented out viewrendered.py and added 
 viewrendered2.py.

 After you restart Leo, pick a node and hit Alt+0 (zero) --- or even better 
 right-click the splitters and chose Open Window  Viewrendered to get a 
 free floating window that can be maximized on a second screen. You'll now 
 see full HTML rendering just like a browser shows. 

 Currently, there seems to be a little bug. You have to add::

 @language rest

 to the top of a @rst node in order for more than just the first paragraph 
 to be rendered [1]?

 Unfortunately, the results are pretty dull looking. The rest of this 
 section describes how to connect stylesheets to what is displayed in the 
 viewrendered2 window.

 First all you need to have a stylesheet. It can be pretty daunting to 
 create a docutils compatible stylesheet from scratch so choose one of the 
 following to get started:

* https://bitbucket.org/cskeeters/rst2html-style Nice clean look.

* http://docutils.sourceforge.net/sandbox/stylesheets/voidspace.css  
 somewhat ugly but shows the possibilities?

* 
 pythondir/Lib/site-packages/docutils/writers/html4css1/html4css1.css The 
 default but boring appearance.

 If you want to have colorized code blocks using pygments, you also need 
 have styles for it. To see what the possible pygment built-in styles [2] 
 are, at a Python prompt do::

  from pygments.styles import get_all_styles
  styles = list(get_all_styles())
  styles.sort()
  styles
 ['autumn', 'borland', 'bw', 'colorful', 'default', 'emacs', 
 'friendly', 'fruity', 'manni', 'monokai', 'murphy', 'native', 'pastie', 
 'perldoc', 'tango', 'trac', 'vim', 'vs']

 Then generate a .css file for whatever style you want to use::

pygmentize -S default -f html -a .code pygments_default.css

 Next, I suggest you create a mystyles.css file. Normally it would be in 
 the same place as your .leo file. Inside it put, for example::

   @import url(skeeterstyle.css);
   @import url(pygments_default.css);
   any additional style customizations here

 I figured out how to use viewrendered2 by choosing it from the Plugins 
 menu and reading the displayed documentation. If you scroll down, 
 eventually you'll see the list of all the docutils related settings::

   @string vr-stylesheet-path
   @int vr-halt-level = 6
   @string vr-math-output = mathjax
   @bool vr-smart-quotes = True
   @bool vr-embed_stylesheet = True
   @bool vr-xml-declaration', False

 (Optional) I changed my local copy of 
 leo.plugins.viewrendered2.WebViewPlus#init_config() to add some additional 
 docutils options::

   getConfig(gc.getString, 'syntax_highlight', 'long')
   getConfig(gc.getBool,   'no_compact_lists', False)
   getConfig(gc.getBool,   

Nightly snapshots not up to date?

2014-04-05 Thread Peter Mills
Despite the file name of leo-editor-snapshot-20140405.zip in the nightly 
snapshot page, the files therein appear to to be from 2014-02-13.  A fish 
around in the files shows that viewrendered2.py is not included, confirming 
the snapshot's age.  I'm now getting my updates from git, but a friend I 
introduced to Leo seemed to end up with an old version by using the nightly 
snapshot option.

-- 
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: Nightly snapshots not up to date?

2014-04-05 Thread Peter Mills


On Sunday, April 6, 2014 8:26:30 AM UTC+10, Peter Mills wrote:

 Despite the file name of leo-editor-snapshot-20140405.zip in the nightly 
 snapshot page, the files therein appear to to be from 2014-02-13.  A fish 
 around in the files shows that viewrendered2.py is not included, confirming 
 the snapshot's age.  I'm now getting my updates from git, but a friend I 
 introduced to Leo seemed to end up with an old version by using the nightly 
 snapshot option.


(Forwarded from Terry)

Thanks for the heads up, I'll have a look.

yahoo isn't sending my mail, so forward this to the list if you would,
thanks.

Cheers -Terry 

-- 
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: Error when dropping files into Leo (Qt)

2014-03-31 Thread Peter Mills
I can confirm that this is happening with me also.  My full traceback 
follows:

Traceback (most recent call last):
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6031, in 
dropEvent
self.urlDrop(ev,p)
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6161, in 
urlDrop
changed |= self.doFileUrl(p,url)
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6188, in 
doFileUrl
self.doFileUrlHelper(fn,p,s)
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6204, in 
doFileUrlHelper
self.createAtFileNode(fn,p2,s)
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6224, in 
createAtFileNode
elif self.isAutoFile(fn):
  File M:\python\user\git\leo-editor\leo\plugins\qtGui.py, line 6301, in 
isAutoFile
d = c.importCommands.importDispatchDict
AttributeError: leoImportCommands instance has no attribute 
'importDispatchDict'

On Friday, March 21, 2014 8:40:08 PM UTC+10, Fidel N wrote:

 Hi:
 Im getting this error when I drop files to Leo. This used to create a new 
 node with the path to the file. With folders it works and creates an @path 
 node.

 http://i.imgur.com/SLRIyMh.png
 I will try to find more details on this.



-- 
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: Error when dropping files into Leo (Qt)

2014-03-31 Thread Peter Mills

On Monday, March 31, 2014 11:09:50 PM UTC+10, Fidel N wrote:

 Peter, in case you need @url nodes with paths to the files you are 
 dropping, I found a workaround that actually is pretty useful for me, since 
 it makes any dropped file into @url node, and then I can modify given url 
 at my convenience.
 The main advantage of this is that you can use a standarized way of 
 importing files or folders into Leo, and then use scripts to transform them 
 into what you want, instead of having to guess how the file will be 
 imported into Leo and making a specific script for each of the @directive 
 given to the diferent kind of files/folders.

 If you want this mod you have to go here:

 LeoPyRef.leo#Code--Qt gui--@file ../plugins/qtGui.py--  define text 
 widget classes --  define leoQtBaseTextWidget class -- Birth--ctor 
 (leoQtBaseTextWidget)-- define mouseReleaseEvent  (leoQtBaseTextWidget)

  
I can't find self.doFileUrl in that location.  Perhaps you have a different 
version of Leo to me (I think I have the latest now)?  I did find 
self.doFileUrl 
in the location below, but I'm not sure it is what you were describing.

LeoPyRef.leo#Code--Qt gui--@file ../plugins/qtGui.py--Frame and 
component classes...--class LeoQTreeWidget (QTreeWidget)--Event handlers 
(LeoQTreeWidget)--dropEvent  helpers--urlDrop  helpers

Then replace:


 self.doFileUrl


 with:


 self.doHttpUrl





-- 
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.


First bug fix through github pull request

2014-03-30 Thread Peter Mills
My travels are all done, so I'm looking forward to getting rid of a few 
bugs that have arisen in Viewrendered2.  The first one up is the getting 
the display of plugin help (scrolledTextMessage) working again.  I'm new to 
git, github and pull request so I'm just starting off with this single bug 
for this pull request (https://github.com/leo-editor/leo-editor/pull/21).  
If this goes smoothly and I haven't stuffed it up somehow, then I'll 
probably bunch up a few bug fixes into the next pull request.  Please let 
me know if what I've done is the correct way to get these bugfixes and 
improvements into Viewrendered2 and Leo.

Peter.

-- 
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: First bug fix through github pull request

2014-03-30 Thread Peter Mills
I've confirmed that I did NOT have my git workflow figured out properly, so 
this pull request is redundant.  Please ignore it.

I think I've figured out git a little more now.  Hopefully my next effort 
will be a little more effective!

Peter.

On Sunday, March 30, 2014 7:31:21 PM UTC+10, Peter Mills wrote:

 My travels are all done, so I'm looking forward to getting rid of a few 
 bugs that have arisen in Viewrendered2.  The first one up is the getting 
 the display of plugin help (scrolledTextMessage) working again.  I'm new to 
 git, github and pull request so I'm just starting off with this single bug 
 for this pull request (https://github.com/leo-editor/leo-editor/pull/21).  
 If this goes smoothly and I haven't stuffed it up somehow, then I'll 
 probably bunch up a few bug fixes into the next pull request.  Please let 
 me know if what I've done is the correct way to get these bugfixes and 
 improvements into Viewrendered2 and Leo.

 Peter.


-- 
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: viewrendered2 plugin - Manual and support files

2014-03-01 Thread Peter Mills
Thanks Edward 
I think that VR2 should definitely replace VR1, even in name, as it really is 
an evolution of the same plugin.  I would suggest that when we get the basic 
level of bugs fixed, that this happen, but not before?  I know there is a level 
of confusion created by having two options, but maybe a few more bugs need 
sorting out before it's production ready?  (Like the HTML rendering that 
someone just discovered).

Note that my published version of VR2 worked fine for the plugin help 
(scrolledMessage) - there was a specific change I needed to make for this to 
work.  Perhaps a bug has crept in with the reorganisation.  I won't have any 
time over the next week while travelling to make any contributions of substance 
so I can't look into this myself :-)

-- 
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.


Re: viewrendered2 plugin

2014-02-28 Thread Peter Mills


On Friday, February 28, 2014 7:23:27 PM UTC+10, lewis wrote:

 Using vr2, start leo, select F1 key. Here is the traceback:
 AssertionError
 [end]

 Lewis

Hi Lewis

I don't know which version of viewrendered2.py (my original or Edward's git 
version) you are testing so its hard to pinpoint a problem that others 
don't seem to be having. I would expect that the reason the viewrendered2 
plugin is not showing up in the plugin list is because of the error that 
occurred on loading - it didn't load, so it still doesn't exist in Leo.  I 
believe this essentially causes the Assertion error above.  The reason it 
doesn't load shows up as a syntax error - this syntax error certainly 
doesn't exist in my version.  However, this will depend on the version of 
viewrendered2 you have and also potentially which version of Python you 
have.  I have NOT tested this plugin on Python 3 (just in case you have 
this version) or on versions before 2.7.

Ultimately, if folk believe that the new reST rendering components of 
viewrendered2 are better than viewrendered, I don't really see any point to 
retaining the original.  However, at this point in time, it's probably 
worth a few people testing and commenting on it before that decision should 
be considered.

Peter

-- 
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.


Re: Working on the VR2 plugin

2014-02-28 Thread Peter Mills


On Friday, February 28, 2014 3:41:01 AM UTC+10, Edward K. Ream wrote:

 On Thursday, February 27, 2014 10:58:52 AM UTC-6, Edward K. Ream wrote:

  There should be no more big reorgs, so we should be able to merge our 
 work easily.

 Ach.  Rev e98bdb08b6f removes an unwanted clone that caused several 
 methods to be duplicated.

 Pylint found this and several other trivial problems.  The only complaint 
 now is about a to-do item.

 I plan no further work on VR2 today, so let the wild rumpus start.

 EKR

Edward

A quick run of the VR2test.leo outline that I've included in the other 
thread shows that the code execution functionality has lost the ability to 
run in a proper Notebook mode.  That is, namespace contents are no longer 
persistent across multiple code nodes.  With your revisions, the scope is 
re-initialised within exec_code and therefore for every node.  It should 
only be initialised at the start of the process_nodes method, so that all 
subsequent code nodes in the tree share the same namespace (I think I have 
my nomenclature correct with namespace; maybe I should be saying 
scope?).  Anyway, it is an important requirement for any kind of Notebook 
mode.

Thanks
Peter.

-- 
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.


Re: Working on the VR2 plugin

2014-02-28 Thread Peter Mills


On Friday, February 28, 2014 9:46:48 PM UTC+10, Peter Mills wrote:



 On Friday, February 28, 2014 3:41:01 AM UTC+10, Edward K. Ream wrote:

 On Thursday, February 27, 2014 10:58:52 AM UTC-6, Edward K. Ream wrote:

  There should be no more big reorgs, so we should be able to merge our 
 work easily.

 Ach.  Rev e98bdb08b6f removes an unwanted clone that caused several 
 methods to be duplicated.

 Pylint found this and several other trivial problems.  The only complaint 
 now is about a to-do item.

 I plan no further work on VR2 today, so let the wild rumpus start.

 EKR

 Edward

 A quick run of the VR2test.leo outline that I've included in the other 
 thread shows that the code execution functionality has lost the ability to 
 run in a proper Notebook mode.  That is, namespace contents are no longer 
 persistent across multiple code nodes.  With your revisions, the scope is 
 re-initialised within exec_code and therefore for every node.  It should 
 only be initialised at the start of the process_nodes method, so that all 
 subsequent code nodes in the tree share the same namespace (I think I have 
 my nomenclature correct with namespace; maybe I should be saying 
 scope?).  Anyway, it is an important requirement for any kind of Notebook 
 mode.

 Thanks
 Peter.

And one more: I note that there is another way that code execution now 
behaves differently - when a code block is executed, the source code is 
always logged in the Log pane.  This shouldn't occur, even if verbose mode 
is on.  I haven't been able to track down where this is happening yet 
because there has been significant restructuring of the code around the 
node processing and code execution.

Thanks.

-- 
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.


Re: viewrendered2 plugin

2014-02-28 Thread Peter Mills


On Thursday, February 27, 2014 10:18:24 PM UTC+10, Edward K. Ream wrote:

 On Wed, Feb 26, 2014 at 6:00 PM, Peter Mills 
 peter.m...@gmail.comjavascript:
  wrote:
 Yes, you should get a GitHub account.  Let me know when you have it set up 
 and I'll give you write access. 


Done: pmills
(I will need to study git a bit before I do anything though)
 

 Could you share the Leo outlines (and css, if relevant) used to generate 
 your example screen shots?  I'd like to see exactly how they were created. 
 Using the VR2 plugins is easy, but I want to make sure everyone (including 
 me) understands how to get the most of what you have created.


Done.  Elsewhere in this thread I've posted a manual of sorts to help 
everyone test it.  A more refined version should find its way into the 
docstring at some time.  As you've suggested I've also posted there the 
VR2test.leo that I've used, along with a couple of support directories, so 
that everyone can see a bit more of how I use the plugin.
 


 Thanks.

 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.


Re: Working on the VR2 plugin

2014-02-28 Thread Peter Mills


On Friday, February 28, 2014 3:29:15 AM UTC+10, Edward K. Ream wrote:

 On Thu, Feb 27, 2014 at 10:31 AM, Edward K. Ream 
 edre...@gmail.comjavascript:
  wrote:

 This thread will be for coordination among all those who are modifying 
 the viewrendered2.py plugin.


 ​Peter, there is one place to take a close look at.  It is the computation 
 of the various vars in wvp.process_directives.  I tried to simplify the 
 code, but I may have made a mistake.  Please review the lines marked # EKR 
 carefully.


These look good (and it reminded me of a few tricks with python that I 
could use more often).


 BTW, this reminds me that wvp.exec_code now predefines 'c' and 'p' as well 
 as 'g'.  I see no reason not to do that.  Do you?


This is great.  I did wonder if I should include the extras in there when I 
wrote that part, but a wave of laziness overcame me and I just put in what 
I absolutely needed. :-)
 


 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.


Re: viewrendered2 plugin

2014-02-27 Thread Peter Mills

On Friday, February 28, 2014 11:34:31 AM UTC+10, lewis wrote: 

 It's a good question :)
 I'm running the latest build (ddfc2646f465) and have confirmed that 
 viewrendered2.py is in the plugins folder

 Is viewrendered2.py intended as a replacement of viewrendered.py or an 
 additional plugin?

 Lewis

Viewrendered2 is a replacement for viewrendered.  It is unlikely to work if 
you have both enabled.

-- 
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.


Re: viewrendered2 plugin

2014-02-26 Thread Peter Mills

On Thursday, February 27, 2014 12:43:57 AM UTC+10, Edward K. Ream wrote: 

  On Wed, Feb 26, 2014 at 8:32 AM, Edward K. Ream 
 edre...@gmail.comjavascript:
  wrote:

  I am aware of the problem with tooltip text: there is a do-nothing 
 adjuster method that will deal with the problem asap.


 ​Done.  Also updated leoPluginsRef.py to include viewrendered2.py.  This 
 concludes my packaging work on this very important plugin.

 Please let me know immediately if I have introduced any problems.

 EKR

Thanks for tidying this up Edward.  Since I was using Spyder to develop it, 
I had been wondering how I could get the sentinals back in order.  I still 
have a bunch of minor bug fixes, corrections and further features that 
should be done here, so I would still like to contribute to VR2.  So having 
no idea of git and GitHub at this point, I assume I should get a GitHub 
account (as HaveF has suggested), install git, and of course use Leo to 
make any changes.  What sort of access approvals do I need and are you 
willing to have a newbie play in your sandpit?
 
Peter

-- 
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.


Re: Introduction and teaser

2014-02-25 Thread Peter Mills


On Tuesday, February 25, 2014 7:39:00 PM UTC+10, Fidel N wrote:

 Just checked the qt documentation, it could be done like this:

 void QWebView::selectionChanged() [signal]

 This signal is emitted whenever the selection changes - Link this signal 
 to the following function
 selectedText : const 
 QStringhttp://qt-project.org/doc/qt-5.0/qtcore/qstring.html


 When the signal selectionChanged is fired, we would get selectedText, 
 and find the node that contains that text, then select that node in Leo

Interesting ideas - maybe some trickery can be done after all.  However, I 
wouldn't like it to interfere with the ability to copy html from the 
rendered window by selecting text and pressing ctl-C.  But there might be a 
control-click signal or some other way we can distinguish the desire to 
jump back to the node.

Please have a read of my other post viewrendered2 plugin for the overview 
of this plugin and how it works (and possibly try it out).  It might fire 
up some more ideas on other tricks that might be played.

Peter.

-- 
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.


Re: Introduction and teaser

2014-02-25 Thread Peter Mills


On Tuesday, February 25, 2014 9:12:34 PM UTC+10, Fidel N wrote:

 Hehe yes I already read it twice, but will need some time to digest it, 
 since it comes with a lot of possibilities.
 Its really an amazing plugin, and Im specially impressed by both the 
 direct wikipedia rendering and the direct html exporting, along with the 
 whole subtree rendering hehehe...im currently in the middle of migrating to 
 github / last Leo version and with some issues with it, but as soon as I 
 solve that im definetly going to be playing with your plugin =)

I may have misled you by the image showing wikipedia.  On the path to 
seeing that image, the plugin renders the node as is with just the title 
and wikipedia link showing.  If you click on the wikipedia link it works 
just like a normal browser and brings up wikipedia.  Perhaps not as 
impressive as you originally thought :-(

-- 
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.


Re: Introduction and teaser

2014-02-24 Thread Peter Mills


On Tuesday, February 25, 2014 8:33:06 AM UTC+10, Edward K. Ream wrote:


 ​The matlab integration shown in the screenshot looks very cool.  I'll be 
 very interested in how you put it all together.  Many thanks for this work.

No, sorry Edward.  That isn't matlab.  That chart is from matplotlib (part 
of the SciPy collection of python tools).  The plot is generated 
automatically by the code block shown at the bottom of the screenshot. 
 This is part of the notebook type functionality of the new plugin (See 
my other post).  Hopefully, matlab will remain just a memory for me.

Peter


 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.