Re: New plugin: rss.py - Leo is now a primitive RSS reader

2013-10-12 Thread gatesphere
This plugin has been updated as of rev 6139 to make it more 
configurable.  Here's the relevant section of the docstring:



Configuration Settings

==


This plugin is configured with the following @settings:


@string rss-date-format

---


Format string to provide datetime.time.strftime, to format entry dates. 
Defaults to '%Y-%m-%d %I:%M %p' if not provided.



@bool rss-sort-newest-first

---


If True, newest entries are placed before older entries. If False, older 
entries are placed before newer entries.



@string rss-headline-format

---


The format of an entry headline, specified with various tokens. Defaults 
to '[] ' if not provided.



Valid tokens are:

|  - the date, formatted according to `@string rss-date-format`

|  - the entry title

|  - the entry link (not recommended in headline)

|  - the entry summary (extremely not recommeded in headline)


Anything that isn't a valid token is retained untouched, such as the 
square brackets in the default setting.



@data rss-body-format

-


The body of this node will provide the structure of the body of parsed 
entry nodes. Empty lines should be denoted with '\\n' on a line by 
itself. It defaults to the following, if not provided::


@url 

\n





\n




Valid tokens are the same as for `@string rss-headline-format`. Any 
instance of '\n' on a line by itself is replaced with an empty line. All 
other strings that are not valid tokens are retained untouched, such as 
the `@url` directive in the default.




-->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/groups/opt_out.


Re: A 3-part organization for tutorials

2013-10-12 Thread vili
>>@edward: The value of the 3-part organization is that quite a few people 
might use Leo as a PIM, or to write documents, without being programmers.

Hi there,

I am one of those apparently rare freaks. I've been using Leo for several 
years now for all but programming. Yes, it has been a pain to struggle with 
installations but rewarding as I'm organizing my life with Leo. 

On the first level below root node I list every important aspect of my life 
(health, family, business 1, business 2, research,...) in the form of 
longer term goals I want to achieve. Then I refine these goals to more fine 
grained and shorter term ones until I reach activities I plan to do next in 
each aspect of my life. Then I clone these "next to-do" planned activities 
from each aspect area to a special "view node" - called "actual 
activities". This way I manage to look at all my projects in life two ways: 
1. theoretical, atemporal way in the context of a specific project and 2. 
situated, practical way in the context what can I do now (these days). So, 
*clones 
are* equally *awesome* for "top-down" use (the "literate" part of "literate 
programming") as they are for you, programmers, when debugging or else.

I have been using Leo also for writing especially in early phase when 
conceptualizing longer document. The "Extract" function (Ctrl+Shift+D) also 
helped me a lot for analyzing otherwise poor readable flat documents.

Cheers, Vili

Disclaimer: I do have o good friend of mine, who is a programmer and 
informed me about the existence of Leo, helped sometimes with installation 
and served as "a backup" in my mind if I needed to ask something...



On Monday, October 7, 2013 3:30:42 PM UTC+2, Edward K. Ream wrote:
>
>
> The value of the 3-part organization is that quite a few people might use 
> Leo as a PIM, or to write documents, without being programmers.
>
>
>  

-- 
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: Check out Leo's new theory of operation

2013-10-12 Thread gatesphere

On 10/12/2013 7:59 AM, Edward K. Ream wrote:
When I get there, it often feels like somebody else wrote it: I don't 
remember anything about the actual code.

The old adage of "six months pass and the code is foreign to you" holds.

--
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: LeoPIM - recurring events library?

2013-10-12 Thread gatesphere
Just stumbled upon dateutil yesterday: http://labix.org/python-dateutil 
(see the module dateutil.rrule)


-->Jake

On 10/12/2013 3:56 AM, Matt Wilkie wrote:

might be worth seeing what Taskcoach uses.


On Wed, Oct 2, 2013 at 9:49 AM, Terry Brown > wrote:


Anyone know of a python, preferably, light-weight, preferably, library
for managing recurring events?  I searched a while ago and found
nothing except Chandler's, which was too embedded in Chandler.

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/groups/opt_out.


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


--
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: Check out Leo's new theory of operation

2013-10-12 Thread Edward K. Ream


On Friday, October 11, 2013 4:40:48 PM UTC-5, Edward K. Ream wrote:
>
> It's at: http://leoeditor.com/theory.html
>
> This chapter is intended for people like Terry and Ville.
>

What a difference a day makes.  The chapter is now called "Exploring Leo's 
Code Base". The chapter has a totally different content, purpose and tone.  
It's first sentence is:

This chapter is for anyone who wants to understand Leo's code base, 
including those who want to be one of Leo's implementors.

I plan no further work on this chapter, except to fix typos.  Please report 
any problems immediately.

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: Check out Leo's new theory of operation

2013-10-12 Thread Edward K. Ream
On Friday, October 11, 2013 4:40:48 PM UTC-5, Edward K. Ream wrote:

> Actually, the *intent* of the chapter has no changed...

A confusing typo.  I meant: Actually, the *intent* of the chapter *has* 
changed.

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/groups/opt_out.


Re: Check out Leo's new theory of operation

2013-10-12 Thread Edward K. Ream


On Friday, October 11, 2013 4:40:48 PM UTC-5, Edward K. Ream wrote:

> It's at: http://leoeditor.com/theory.html

> For the first time ever, it concentrates on the highest-level view of the 
code.

Actually, the *intent* of the chapter has no changed: it no longer focuses 
on the knowledge you need to understand or change Leo.  There *isn't* any, 
except for the most basic knowledge that leoCommands.py defines the 
Commands class, etc.

Instead, the chapter is attempting (indirectly) to teach developers to 
focus on the *process* of (say) finding a bug:

1. You find a starting point (maybe one of the usual suspects, maybe 
another piece of code related to (say) a particular command.

2. Insert g.trace there, or maybe g.pdb.

3. Find out what is happening there, including, if useful, where the code 
came from (g.callers()).

That's *it*.  It's an exploration process.  It's how I fix *every* 
non-trivial bug.

Really, all anyone needs is a little bit of confidence.  This lowers the 
bar a lot.

I'll be making this implicit intention explicit in the next draft of this 
document.

> It's *much* simpler than before, and I think it should be more useful.

It was truly shocking how little detail is needed in this chapter.  I 
actually felt disoriented.

I made a list of reasons why short explanations are better than long ones.  
Alas, I deleted it by mistake.  It was never part of the repo, so it seems 
to be gone for good.

To recreate the list, at least in part:

- People can understand short explanations more easily.
- People are more like to read short explanations.
- Short explanations make the major points more obvious.
- Implementers, including myself, rarely remember any but the most general 
facts about a program.
- The top-level structure of @file nodes in leoPy.leo is (really!) all you 
need to know to hack on Leo.
- Details go out of date quickly, general principles can (and have) endured 
for decades.

And so on.  There may have been a few more points on the original list, but 
you get the idea.

The irony is that these points are "deep background" for any writing.  They 
can't be part of the writing itself because they are details to be omitted!

And one more thing.  Potential implementers really must feel comfortable 
reading Leo's code.  It's not rocket science, and all one needs to do is 
get a feel for the shape and weight of the code.  I remember such general 
things much longer than details.  Indeed, it's almost always 
straightforward to find the code I'm looking for.  When I get there, it 
often feels like somebody else wrote it: I don't remember anything about 
the actual code. OTOH, it's usually pretty easy for me to sense when 
somebody else wrote the code because of stylistic differences...

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: 'Strange' problem with the rst3 command

2013-10-12 Thread Edward K. Ream
On Thu, Oct 10, 2013 at 7:59 AM, Viktor Ransmayr
wrote:

> Hello everyone,
>
> I encountered a strange problem, when creating the HTML file from a rST
> file via the rst3 command.
>
> Here is the log:
>

[ snip]


>
> ### VR: First invocation of 'rst3'
>
> stylesheet not found
> ...
> Traceback (most recent call last):
>   File "C:\Repositories\bzr\leo-editor\leo\core\leoRst.py", line 1899, in
> writeToDocutils
> result = docutils.core.publish_string(source=s,
> AttributeError: 'module' object has no attribute 'core'
> done
>
> ### VR: Second invocation of 'rst3'
>
> stylesheet not found
>

...


> 
The only thing that I did between the *first* and *second* invocation of
the 'rst3' command was that I hit the F1 key to show the Leo help system ...

> 
Any ideas what is going on here and how to resolve it?

No, I don't docutils has a few glitches.  Recently, it crashed when I
mistakenly removed the toc file referenced in conf.py.

One idea: remove the stylesheet not found message if you can.

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: Check out Leo's new TOC

2013-10-12 Thread Edward K. Ream
On Fri, Oct 11, 2013 at 6:41 AM, Viktor Ransmayr
wrote:


> The new TOC looks really good.
>
> Based on this new structure I would propose a few more enhancements.
>
> 1) Consolidate the top-level nodes 'Downloading Leo', 'Installing Leo' and
> 'Running Leo' into a single top-level node.
>

That would certainly be cleaner, but the present way might encourage
newbies actually to download, install and run Leo ;-)



> 2) Move the top-level node 'FAQ' to the back. - Possibly move it into the
> 'Reference Guide' or after the 'Cheat Sheet'.
>

I've considered this.  It wouldn't make a huge difference either way.



> 3) Move the node 'Plugins' from the 'Users Guide - Intermediate Topics' to
> the 'Reference Guide'.
>

I will make some kind of change in this area.  I would like to make all
the "intermediate topics visible", and possibly the "Leo and other
programs" as well.

In short, the TOC is still a puzzle, and I'm still working on it.  Thanks
for 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Improving reformat-paragraph

2013-10-12 Thread Edward K. Ream
On Sat, Oct 12, 2013 at 2:50 AM, Matt Wilkie  wrote:

> I would *love* a reformat paragraph command that doesn't break docstings
> or comments!
>

It will happen for b2 at the latest.

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/groups/opt_out.


Re: Programatically editing RTF

2013-10-12 Thread Edward K. Ream
On Sat, Oct 12, 2013 at 3:03 AM, Matt Wilkie  wrote:

> pandoc understands RTF (http://johnmacfarlane.net/pandoc/index.html),
> though maybe not in the way you need (?)
>

Wow.  This a new world to me.  Thanks for the link!

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: Programatically editing RTF

2013-10-12 Thread Matt Wilkie
pandoc understands RTF (http://johnmacfarlane.net/pandoc/index.html),
though maybe not in the way you need (?)

-- 
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: Proposed workaround to refresh-from-disk problems

2013-10-12 Thread Matt Wilkie
On Thu, Sep 26, 2013 at 9:51 AM, Edward K. Ream  wrote:

> BTW, there is always a workaround to problems with refresh-from-disk.
> Simply save the .leo file and reload.  The save will be safe for never-read
> @ nodes, provided that you say "no" when asked whether you want to
> overwrite the existing file!



Unfortunately, I have more than once or twice nuked an external file by
answering "yes" by mistake. It usually happens when I've added a few new
files in one session and have lost track of which is which.

My response has been to take it as a reinforcing lesson to be more rigorous
in using source code control and backups.

The only interface improvement I can think of which would help resolve this
situation (and a number of other scenarios too I think) would be to show a
unified or side by side diff of the file on disk and the leo node in
memory.

Such a feature would be tres cool, but likely involve a fair bit of work
which I'd be suggesting someone else do, which is why I've not mentioned it
yet. ;-)

-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/groups/opt_out.


Re: LeoPIM - recurring events library?

2013-10-12 Thread Matt Wilkie
might be worth seeing what Taskcoach uses.


On Wed, Oct 2, 2013 at 9:49 AM, Terry Brown  wrote:

> Anyone know of a python, preferably, light-weight, preferably, library
> for managing recurring events?  I searched a while ago and found
> nothing except Chandler's, which was too embedded in Chandler.
>
> 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/groups/opt_out.
>

-- 
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: Improving reformat-paragraph

2013-10-12 Thread Matt Wilkie
I would *love* a reformat paragraph command that doesn't break docstings or
comments!


On Sun, Oct 6, 2013 at 11:49 AM, Edward K. Ream  wrote:

> This command was a major advance when one of Leo's users created it.
> Don't remember who it was. However, it's limitations are becoming apparent
> as I use it constantly.
>
> I would like to redefine what constitutes a paragraph, for the purposes of
> this command.
>
> Any line starting with @ or a line consisting only of triple quotes will
> be considered a one-line paragraph.  This will prevent
> the command from ruining already-formatted docstrings.
>
> Lines that denotes lists will always begin a paragraph, regardless of the
> previous line.  Examples:
>
> - Whatever
> 1. Whatever
> a) Whatever
>
> Furthermore, the leading indentation in such lists will be the number of
> characters preceding "Whatever", eliminating the need to laboriously adjust
> the indentation of following lines.
>
> If possible, it would be good to add support for non-breaking space
> (unicode code point U+00A0).
>
> Leo has almost a dozen unit tests covering this command.  Revising those
> tests and getting them to work should guarantee that the new
> reformat-paragraph command is sound.
>
> 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/groups/opt_out.
>

-- 
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: Why Leo isn't more popular

2013-10-12 Thread Matt Wilkie
On Sat, Oct 12, 2013 at 12:38 AM, Matt Wilkie  wrote:

> Consequently I spend a lot of in-Leo time in a state of confusion, often
> unsure whether I'm trying to learn programming or python or Leo or more
> about the actual problem I'm started out trying to solve this morning. :)


an alternate way of stating this:

When I feel too dumb to use Leo (well), I flee to tools offering more
comfort.

-- 
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: Why Leo isn't more popular

2013-10-12 Thread Matt Wilkie
What an enormously long and interesting thread!

Thanks for the sub-thread on using Leo for plain ol' writing. It rings true
for me. Leo doesn't leverage much of my prior muscle memory, and that leads
me away from it, and once away it takes awhile to return. This is still
true even though I've been using Leo for half a decade now, and have even
contributed a small thing or two to the bzr repository.

I generally use notepad2, notepad++ for quick and dirty scripts (usually
Windows batch files), editing .ini,.conf, xml etc., etc. files. Way fast
startup time and their syntax highlighting know more file types and is more
reliable (complete). They also grok (some) regular expressions.

I use vim (+cream) when I want to do search and replace, which happens a
lot. I just never figured out how to use this properly in Leo;
`[esc]:%s/old-thing/new-thing/g` is just so much faster (modulo the
significant time it takes to construct regular expressions that actually
work!). Saved mini-buffer commands across sessions is also very handy. If
vim+cream was faster to start I'd never use the notepad replacements.

Weirdly, even for python I often use PyScripter instead of Leo. Sometimes
it's because I need to write for a different version of python than I'm
running Leo from. Others it's because the output I get from running a Leo
node as a script differs from the same thing from a cmd
shell/IDLE/PyScripter console. I also find PyScripter's code completion a
bit more intuitive for the way I type (though, I didn't discover that until
I'd already wandered away from Leo for a time).

None of this is meant as a slam against or complaint about Leo! It's just
sharing observations of my personal use/not-use patterns.

Part of my difficulty in becoming comfortable with Leo is that I'm also not
that comfortable with python, or even general programming. I'm not a
software developer; this is changing, but very slowly. Consequently I spend
a lot of in-Leo time in a state of confusion, often unsure whether I'm
trying to learn programming or python or Leo or more about the actual
problem I'm started out trying to solve this morning. :)

Anyway, the point touched on earlier about leveraging the skills and
experience people already have before they encounter Leo is pretty key to
the overall adoption rate, I think.

cheers,

-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/groups/opt_out.