Re: Any reason to keep @auto or @shadow?

2015-02-18 Thread Largo84
Why not @clean? Just a thought

Rob...

On Wednesday, February 18, 2015 at 2:26:08 AM UTC-5, Matt Wilkie wrote:

 ...a thought now changed since I've caught up with the rest of this week's 
 conversations and learned that @auto needs to stay in deprecated mode for 
 at least a little while.

 The (r)evolution new-@nosent promises is worth a new name,
 but I lack the imagination at present to suggest a suitable one!

 matt



 On Tue, Feb 17, 2015 at 11:06 PM, Matt Wilkie map...@gmail.com 
 javascript: wrote:


 The only reason I can think of to prefer @auto is 


 ...it's a better name. :)

 If @nosent is a synonym for @auto, then the code-that-used-to-be-called 
 @auto can be relegated to history and the code-that-is-now @nosent can be 
 called @auto.

 It's a subtle thing, but I think having the primary documentation and leo 
 files using the word auto everywhere is better then have no  splattered 
 all over the place and in one's face as a daily mantra.

 just a thought.

 -matt




-- 
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: An xslt prototype for a read-only version of Leo as a web app

2015-02-18 Thread Matt Wilkie
On Wed, Feb 18, 2015 at 7:54 AM, Edward K. Ream edream...@gmail.com wrote:

 2. Open xslt-test.leo in your browser.  You should see something like this:



Yes I see an html rendered page. This is great!

For the remote-origin security issue: as long as the .leo file and .xlst
file reside on the same domain, shouldn't it just work? Or maybe I'm
misreading the problem.

Matt

-- 
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: An xslt prototype for a read-only version of Leo as a web app

2015-02-18 Thread Jacob Peck


On 2/18/2015 10:54 AM, Edward K. Ream wrote:

1.  Visiting http://leoeditor.com/xslt-test.leo does not work.

The browser renders xslt-test.leo xml, not html.  That is, the browser 
does not perform the xslt transformations.
Your web server is configured to send .leo files as MIME type 
'text/plain' rather than 'application/xml'.  That is a server-side 
configuration -- contact your webhost, they should be able to put in a 
rule for you, if it's not against their policy.  After that, all should 
work just peachy!


Proof:

$ curl -v http://leoeditor.com/xslt_test.leo
...snip...
 HTTP/1.1 200 OK
* Server nginx/1.6.2 is not blacklisted
 Server: nginx/1.6.2
 Content-Encoding: gzip
 Content-Length: 554
 *Content-Type: text/plain*
 Last-Modified: Wed, 18 Feb 2015 13:12:28 GMT
 Date: Wed, 18 Feb 2015 21:16:54 GMT
...snip...

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


@nosent and file parsing

2015-02-18 Thread Kent Tenney
I'm seeing that
@nosent file.py
doesn't create nodes for function definitions

I seem to remember that it did, am I mistaken?

Thanks,
Kent

Leo 5.0-final, build 20150127110559, Tue, Jan 27, 2015 11:05:59 AM
Git repo info: branch = master, commit = 823c0c8faf06

-- 
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: Any reason to keep @auto or @shadow?

2015-02-18 Thread Edward K. Ream
On Wed, Feb 18, 2015 at 1:06 AM, Matt Wilkie map...@gmail.com wrote:


 The only reason I can think of to prefer @auto is


 ...it's a better name. :)

 If @nosent is a synonym for @auto
 ​...


​At one time I thought that @auto could go away.  Now I see that that would
be a distracting mistake.  @auto, @auto-rst etc are here to stay.

The only question is how much to tell newbies ;-)

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: @nosent and file parsing

2015-02-18 Thread Edward K. Ream
On Wed, Feb 18, 2015 at 6:45 AM, Kent Tenney kten...@gmail.com wrote:

 OK, I think I see.
 I'm expecting the capability of @auto, which is
 more automatic ...

 I'm used to rclick refresh parsing on import, @nosent
 requires parsing manually, creating the required nodes.


​Exactly.

Note that once you add add (or delete, or reorder) nodes in the .leo file
and save the @nosent file, Leo will remember your new organization the next
time Leo opens the file.​


I would
 ​ ​
 hope the simple automation of @auto could remain,


​@auto will remain for the foreseeable future, that is, forever unless
something better comes along.

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: @nosent and file parsing

2015-02-18 Thread Kent Tenney
OK, I think I see.
I'm expecting the capability of @auto, which is
more automatic ...

I'm used to rclick refresh parsing on import, @nosent
requires parsing manually, creating the required nodes.

This is about sorting out the @xxx landscape. I would
hope the simple automation of @auto could remain,
for those wanting to keep the Leo file small and more
interested in effortless parsing of external files than
gnx and ua persistence.

Thanks,
Kent

On Wed, Feb 18, 2015 at 6:30 AM, Kent Tenney kten...@gmail.com wrote:
 I'm seeing that
 @nosent file.py
 doesn't create nodes for function definitions

 I seem to remember that it did, am I mistaken?

 Thanks,
 Kent

 Leo 5.0-final, build 20150127110559, Tue, Jan 27, 2015 11:05:59 AM
 Git repo info: branch = master, commit = 823c0c8faf06

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


A small theme customization suggestion

2015-02-18 Thread Andrea Nuvola
Hello there,
this is perhaps just a matter of no interest, but I would like to humbly 
make a suggestion about a couple of small customization issues.

Even when using Leo under Windows 8.1, the default PyQt left/right toolbar 
button icons are seemingly still the ones from the old Windows XP days, 
which look a bit ugly in a modern Windows GUI.

Also, the small open/closed node triangles in the outline tree cannot be 
clearly seen when using the dark theme provided with Leo.

For my part, after some trial-and-error, I have solved these problems by 
using custom icons/images.

This can be easily done after install by means of modifying nav_qt.py and 
systray.py to change the assignments of icon_l and icon_r, and by means of 
adding a couple of style sheet definitions in a `@data 
qt-gui-user-style-sheet' node in myLeoSettings so as to point to the 
\leo\Icons subfolder, where I put my custom icon/images. I attach two 
before/after pics to illustrate my point.

I would like to suggest that Leo toolbar and node icons should be made 
themeable, by putting them in a specific folder for each theme and then 
pointing all concerned files to this specific location.

As I said, this is probably a trivial matter, since it is easily fixed and 
aesthetic taste is subjective, but it would be a nice touch for 
customization.

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


An xslt prototype for a read-only version of Leo as a web app

2015-02-18 Thread Edward K. Ream
I have been wondering whether it would be possible to use xslt to render 
.leo files from web pages. This would build on Ville's work.  First, a demo:

1. Copy the two attached files to the same folder on your hard drive.

Note: recent revs have added these two files to the top-level leo folder, 
so you could also use those files instead. Both demo files are now in the 
top-level leo-editor in the git repo *and* on leoeditor.com.

2. Open xslt-test.leo in your browser.  You should see something like this:

   test.leo
   - 
   
   This is a test
   
   node 1
  - 
  
  Node 1 text.
  
  node 2
  - 
  
  Node 2 text.
  
  
That is, browsers (tested with IE and Mozilla) can render .leo files on 
your file system as html.

Alas, there are problems rending .leo files from urls instead of files. But 
when we succeed we will have a read-only version of Leo as a web app!

= About leo_to_html.xsl

Ville created leo_to_html.xsl, but I didn't understand its significance 
until early this morning.  This xslt file tells a web browser (or other 
xslt processor) how to render a .leo file as html.

I made several changes this morning to leo_to_html.xsl so that it works 
with the tryit editor for xslt at w3schools:
http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalogxsltfile=cdcatalog_ex1

This editor is a good way to discover problems either in .xsl files 
themselves or references to .xsl files from .xml files.

= Problems

It does not seem possible to use leo_to_html.xsl directly:

1.  Visiting http://leoeditor.com/xslt-test.leo does not work.  

The browser renders xslt-test.leo xml, not html.  That is, the browser does 
not perform the xslt transformations.

2. Visiting 
https://github.com/leo-editor/leo-editor/blob/master/xslt-test.leo shows 
the raw xml, without the xslt transformations being applied.

The reason is clear enough. The url is a *representation* of the .leo file, 
not the .leo file itself.

3. xslt-test.leo contains the following line::

?xml-stylesheet type=text/xsl href=leo_to_html.xsl?

This line is supposed to be set by the following setting::

@string stylesheet = ekr_test

This default is useless, and setting it to::

@string stylesheet = type=text/xsl href=leo_to_html.xsl

does not appear to work.  I'll look into this, but cutting and pasting the 
desired ?xml-stylesheet  element into .leo files should work well enough 
for testing.

4. By default, Mozilla refuses to render xslt-test.leo containing the 
following stylesheet element::

?xml-stylesheet type=text/xsl href=leoeditor.com/leo_to_html.xsl?

In other words, Mozilla refuses to execute remote .xsl files. A cryptic 
message is shown instead.  Googling that message gives:
http://stackoverflow.com/questions/3420513/firefox-and-remote-xsl-stylesheets

Apparently Mozilla enforces same origin policy.  But it's no good 
relaxing that policy: browsers on smart phones are probably even more 
restrictive.

= Conclusions

The tryit editor shows that it is possible to apply arbitrary xslt style 
sheets to arbitrary xml files.  We should be able to create a page, say on 
leoeditor.com, that would render .leo files properly using  
leo_to_html.xsl. The question is, how exactly to do this?

This is exciting, despite the problem listed above, and probably others.  
The xslt approach is almost infinitely easier than alternative approaches.

Once we can properly render, say, a link to a .leo file on GitHub, we can 
start improving leo_to_html.xsl.  The obvious thing to do is to change the 
xsl so that it generates html similar to that generated by Bernhard 
Mulder's mod_http plugin.

Your comments, please.

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.


leo_to_html.xsl
Description: XML document


xslt-test.leo
Description: Binary data