Re: About unit testing Leo

2018-08-07 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 9:34 PM, Terry Brown  wrote:

I don't think we should say plugin loading time shouldn't be changed to
> reduce complexity, although that doesn't mean making such a change is
> any kind or priority or that it even needs to happen.
>

A good summary.  Let's see the proposal/code in more detail.

Perhaps we can all agree on another principle.  Proposals for big changes
can only be fully evaluated in the context of working code.  This places
the risk on the shoulders of whoever is advocating for the proposal, as it
should be, imo.

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: On topic? Guidelines for math writing

2018-08-07 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 6:32 PM, Rob  wrote:

That's a great article and highlights something I preach/teach all the
> time; know your audience. I also think there's a third, and significantly
> larger audience of 'users'.
>

I agree.  I omitted this third audience because presumably they won't be
affected by wonky scripting details.

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: Installation on MacOS (10.10)

2018-08-07 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 10:50 PM, matelot  wrote:

> thanks for the replies folks. Leo is running now:
>

Excellent.  And thanks to you for not giving up.

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: Update re: new model

2018-08-07 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 9:29 PM, Terry Brown  wrote:

Another way to avoid the surprise of finding GUI involvement in a write
> string to file operation would be to make changes to p.h immediate,
> like changes to p.b.  So p.h changes as you type in the headline
> line-edit, then endEditing() wouldn't be needed.
>

Alas, that does not seem possible.  Iirc, no events are generated in the
QLineEdit until the user hits return.  This is what makes the entire
onHeadChanged logic so difficult.

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: edit-pane-csv separator

2018-08-07 Thread Josef
Hi Terry,

Am Dienstag, 7. August 2018 05:51:43 UTC+2 schrieb Terry Brown:
>
> On Mon, 6 Aug 2018 05:46:55 -0700 (PDT) 
> Josef > wrote: 
>
> > Is there a way to set the CSV separator? 
>
> I've made a start on this in the csv_delim branch. 
>
> It's not finished, because I'm trying to cover the LaTeX table case: 
>
> 1 & 2 & 3 \\ 
> a & b & c \\ 
>
> My initial thought was to let the delimiter be a regex, &| in the 
> above case, but then what do you use to put the delimiters back in, & 
> or \\?  We know it's & except at the end of the line, but that's LaTeX 
> specific. 
>
> Also allows delimiters like [,;], i.e. , or ; - but again, which do you 
> use to reconstruct the text? 
>
> I think perhaps regex is a bad idea, and I should just extend 
> edit-pane-csv to allow any set string as a delimiter, and right 
> edit-pane-latex-table as a special case. 
>

I see the problem. Yes, LaTeX is always a special case - I don't recall any 
other textual table representation with an "end of record" separator,
so if you are going to implement the LaTeX case, I think it is best to make 
it a special case also in the code.  If you want to cover everything you 
need to look at org-mode tables too - but that could be quite complicated.

That said, when writing text back there is always the question of makeing 
it pretty or not. If the file is to be used with LibreOffice or Excel, then 
you might want to write it back without any further adjustments. In some 
cases I even had problems with leading spaces in cells.

When the text file is being edited by others too, things become a bit more 
complicated. This is of course quite often the case with LaTeX. In such a 
case it may be good to insert spaces after the cell content, so the 
separators line up in any normal text editor.

And now it gets even more complicated: In some textual table 
representations leading and trailing spaces are meaningful, because the 
indicate the alignment (left, right or centered). I think that is the case 
for org-mode as well as for ReST, but I am not sure any more. In that case 
the default would be to re-create the existing alignment, and have the 
option to change it.

Perhaps it is best/easiest not to touch the cell content at all, and leave 
such alignment things to a separate command? Otherwise you may end up 
having to remember the alignment strategy for each file.

- Josef


-- 
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: language latex

2018-08-07 Thread Josef


On Monday, August 6, 2018 at 3:53:20 PM UTC+2, Edward K. Ream wrote:
>
> On Mon, Aug 6, 2018 at 8:12 AM, Josef > 
> wrote:
>
> I would appreciate, if at least *.latex and *.sty files, would 
>> automatically be recognized as LaTeX. 
>>
>
> Does 6d17bb in "devel" do what you want?
>
> Edward
>

I have only used the main branch in git so far, so I first need to figure 
out how to check out a branch and have no time for a while. 
I will com back to this, thanks - Josef

-- 
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: language latex

2018-08-07 Thread Edward K. Ream
On Tue, Aug 7, 2018 at 6:31 AM, Josef  wrote:

>>
Does 6d17bb in "devel" do what you want?

>>
I have only used the main branch in git so far, so I first need to figure
out how to check out a branch and have no time for a while.

To switch to the "devel" branch, just do "git checkout devel".

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: About unit testing Leo

2018-08-07 Thread Terry Brown
On Tue, 7 Aug 2018 04:58:43 -0500
"Edward K. Ream"  wrote:

> On Mon, Aug 6, 2018 at 9:34 PM, Terry Brown 
> wrote:
> 
> I don't think we should say plugin loading time shouldn't be changed
> to
> > reduce complexity, although that doesn't mean making such a change
> > is any kind or priority or that it even needs to happen.
> >
> 
> A good summary.  Let's see the proposal/code in more detail.
> 
> Perhaps we can all agree on another principle.  Proposals for big
> changes can only be fully evaluated in the context of working code.
> This places the risk on the shoulders of whoever is advocating for
> the proposal, as it should be, imo.
> 
> Edward

I'm not sure if proposal is the right word for a completed solution.
I think the purpose of proposal and discussion is to gauge the
possibility of acceptance and also to throw up pitfalls the proposer
may not have considered.  But after that, sure, a project's advocate
should be responsible for the work and demonstrating the solution.

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


Re: edit-pane-csv separator

2018-08-07 Thread Terry Brown
On Tue, 7 Aug 2018 04:27:10 -0700 (PDT)
Josef  wrote:

> Perhaps it is best/easiest not to touch the cell content at all, and
> leave such alignment things to a separate command? Otherwise you may
> end up having to remember the alignment strategy for each file.

Right, the alignment stuff I'm not going to deal with.  But I'm pleased
with the enhancements I've just pushed to devel.  Whereas before you
could just edit comma separated data, now you can use any separator,
*and* you can add a line start / line end string.  So for a LaTeX table
you can use ' & ' () as the separator, and
' \\' () as the line ending.

Use \t to represent tabs.

A behind the scenes complication is that I want to keep using Python's
csv lib. to parse the data, and that only allows single character
separators.  I get around that by replacing the user visible separator,
which may be multi-character, with a single character that doesn't
occur in the text - have to search for that.

I want to keep using the lib. to support CSV like

count, description
7, otters
12, "rats, mice"

although I'm not sure that part's working at the moment.

Anyway, Leo is even better at editing tables now, thanks Josef :)

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