Re: Thinking out loud for toggle name addition

2017-03-28 Thread Eric S. Johansson


On Monday, March 27, 2017 at 3:50:39 AM UTC-4, Edward K. Ream wrote:
>
> On Sun, Mar 26, 2017 at 11:00 AM, Eric S. Johansson  > wrote:
>
> Here is how I would speak it:
>>
>> def write (self, root,
>> kind = '@unknown',
>> no sentinels = False,
>> perfect import flag = False,
>> script write = False,
>> thin file = False,
>> two string = False,
>> ):
>>
>> After going through the whole toggle name transformation process, I would 
>> end up with your example:
>>
>> def write(self, root,
>> kind='@unknown', # Should not happen.
>> nosentinels=False,
>> perfectImportFlag=False,
>> scriptWrite=False,
>> thinFile=False,
>> toString=False,
>> ):
>>  
>>
>
> ​Thanks for this example.​
>  
>
>  normally, this transformation is bidirectional in that I can transform 
>> from string name codename and then back again. I should emphasize that the 
>> transformation between string naming codename is a database lookup, not a 
>> calculation. 
>>
>
> ​I'm not sure I understand the details of what you are doing, but any time 
> there is a database involved you should think of using uA's 
> ,
>  
> accessed via p.u.
>

Some days I'm not either... :-) hopefully a few more explanations may help. 
wrt the database, I think your is a good one. But for now I'm going to stay 
with SQLite just because I need to make functionality work in the short 
term. 

Here's how toggle name looks at the input. The code doesn't really do 
anything. Just there to show you how the transformation works. Toggle name 
looks at the text as code and not code (aka string names). The analysis is 
not sophisticated. Anything that's punctuation in language or reserve 
keywords is considered code. Everything else is not code. Orange is code, 
everything green is not code.
.

def write turnips (self, root vegetable):
local vegetables = root vegetable
no sentinels = False,
perfect garden flag = False,


turns out the definition of code is a slightly more complicated. It also 
includes any string of characters that make up a legal symbol name. So for 
example "no sentinels" is considered a string name but "no_sentinels" is 
considered a codename and therefore part of code. Being able to separately 
identify codenames is important because it allows you to convert from a 
codename back to a string name if the data is in the database.

The toggle name process runs to the text, and with every string name tries 
to figure out if it's already known. If it's not, it marks it so an 
association between codename and string name can be formed as a separate 
user interaction. Waving my hands, here's a partial transformation using 
the same notation as I did when running toggle name as part of Emacs.

def wrTrnps (self, root vegetable!!unknown):
local_vegetables = root vegetable!!unknown
noSentinels = False,
perfectGardenFlag = False,

the string name "root vegetables" has not been associated with any codename 
and is marked as unknown. The "!!unknown" notation was an artifact of 
convenience working within Emacs. However, it is useful to note when an 
association is undefined. The verbal command "fix unknown" would go through 
the body of text, after the !!. After you put in something to complete the 
association like "root_veg", the verbal command "fix next" would make the 
association, go through and substitute every root_vegetable" for its 
codename and then move onto the next unknown instance. In this example 
here, once I defined "root vegetable", the second use would be transformed 
as well.

Yes, it does sound weird but it is surprisingly useful and flows very well 
when using speech recognition. As an aside, this is why people who are not 
disabled should never ever try to write user interfaces for disabled 
people. They just don't have the experience.

Now this is where the hairballs come in and I want to see if your 
recommendations still hold. I believe that it's important to walk the tree 
created by section references to catch all of the unknown string names. For 
me the question is when? We have two options depending on how the mapping 
is handled. First is on command ("fix unknown", "fix next") or when the 
@file node is saved. The command driven option is really to me and would 
require changing the contents of a node to reflect the mapping of string 
name codename. The second is intriguing because it allows us to store the 
code text in its meta-form and only perform the transformation during the 
tangling process. I like the second option because it opens up more 
possibilities for programming by speech but it will increase the 
friction/distance between the pre-disability programmer and the 
post-disability programmer. Is there a way to "import" changes made to code 
text reliably?

Part of the reason for my thinking is that when I'm writing code, I am 
using 

Re: Is this a bug of auto-rst node when refresh from disk

2017-03-28 Thread huliuhe


在 2017年3月29日星期三 UTC+8上午4:58:14,Edward K. Ream写道:
>
> On Tuesday, March 28, 2017 at 3:29:29 AM UTC-5, Edward K. Ream wrote:
>>
>> On Mon, Mar 27, 2017 at 8:58 PM, huliuhe  
>> wrote:
>>
>>>
>>> I upload a leo_bug.zip which have .leo and external rst file.  and a jpg 
>>> file 
>>>
>>
>> ​Thanks.  This is helpful.
>>
>
> The example files you sent me work for me.
>
> New traces in c.refreshFromDisk confirm that everything appears to work as 
> expected.
>
> Please test the latest code to see how it works for you.
>
> Edward
>

yes, use  the latest code  . all is ok. 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Installing PyQt on Windows

2017-03-28 Thread Jacob MacDonald
Run by cloning the Leo repository, activating the environment created using 
that file, and 

python launchLeo.py

should send you on your way!

On Tuesday, March 28, 2017 at 5:39:42 PM UTC-5, Jacob MacDonald wrote:
>
> name: leochannels:- defaultsdependencies:- alabaster=0.7.10=py36_0- 
> babel=2.3.4=py36_0- dbus=1.10.10=0- docutils=0.13.1=py36_0- expat=2.1.0=0- 
> fontconfig=2.12.1=3- freetype=2.5.5=2- glib=2.50.2=1- 
> gst-plugins-base=1.8.0=0- gstreamer=1.8.0=0- icu=54.1=0- 
> imagesize=0.7.1=py36_0- jinja2=2.9.5=py36_0- jpeg=9b=0- libffi=3.2.1=1- 
> libgcc=5.2.0=0- libiconv=1.14=0- libpng=1.6.27=0- libxcb=1.12=1- 
> libxml2=2.9.4=0- markupsafe=0.23=py36_2- openssl=1.0.2k=1- pcre=8.39=1- 
> pip=9.0.1=py36_1- pygments=2.2.0=py36_0- pyqt=5.6.0=py36_2- python=3.6.1=0- 
> pytz=2016.10=py36_0- qt=5.6.2=3- readline=6.2=2- requests=2.13.0=py36_0- 
> setuptools=27.2.0=py36_0- sip=4.18=py36_0- six=1.10.0=py36_0- 
> snowballstemmer=1.2.1=py36_0- sphinx=1.5.1=py36_0- sqlite=3.13.0=0- 
> tk=8.5.18=0- wheel=0.29.0=py36_0- xz=5.2.2=1- zlib=1.2.8=3
>
>
> On Tue, Mar 28, 2017 at 10:59 AM Offray Vladimir Luna Cárdenas <
> off...@riseup.net> wrote:
>
>> Yes Jacob, please provide us your environment configuration. I'm entering 
>> to a couple of really busy moths (last part of writing my thesis), but I 
>> can try to test your setup in miniconda and give feedback.
>>
>> Cheers,
>>
>> Offray
>>
>> On 27/03/17 23:11, Jacob MacDonald wrote:
>>
>> I have Leo running in a Miniconda environment. It's not on Windows, but I 
>> could provide my environment configuration if it would be helpful. From 
>> that, it is one command to create a working environment with the conda 
>> command line tool. 
>>
>> Regards,
>>
>> Jacob.
>>
>> On Mon, Mar 27, 2017 at 10:58 PM Offray Vladimir Luna Cárdenas <
>> off...@riseup.net> wrote:
>>
>>> Hi,
>>>
>>> I think that Anaconda is maybe too much, but I would advice to checkout 
>>> miniconda, which is basically just the installer and the python interpreter 
>>> and serves the same purpose, without including a scientific python 
>>> distribution with jupyter, to install Leo. My advice is to create a Leo 
>>> installer/updater using miniconda as a base. Same installation recipes 
>>> should work on miniconda and anaconda.
>>>
>>> Cheers,
>>>
>>> Offray
>>>
>>> On 27/03/17 18:49, Largo84 wrote:
>>>
>>> Thanks for that, Edward. I looked at Anaconda a few days ago, but found 
>>> it a little overwhelming. Maybe it will be easier than I think once I get 
>>> started. I'd like to revert one of my Win10 machines to 32 bit version so I 
>>> can install pyenchant. Would it be best to uninstall everything and start 
>>> over from scratch with Anaconda? Leo works fine on that machine now (except 
>>> for no spell check). 
>>>
>>> Rob
>>>
>>> On Monday, March 27, 2017 at 6:05:41 PM UTC-4, Edward K. Ream wrote: 



 On Mon, Mar 27, 2017 at 10:06 AM, Largo84  wrote:

> I am trying to set up Leo for a colleague on his Windows PC and see 
> that it's much more difficult than I recall, especially for 
> non-programmers. Apparently, PyQt no longer provides Windows binary 
> installation executables. Not really knowing what else to try, I opened 
> the 
> Python command shell and typed `pip3 install PyQt5` and got a syntax 
> error.
>

 ​PyQt5 seems to be a moving target.  It's possible to screw up a 
 previously working Qt5 installation, as I demonstrated several times today.

 My suggestion is to start with a Python 3 version of Anaconda.  I also 
 recommend installing 32-bit versions, even on 64-bit systems.  That way 
 you 
 can install ​
   
 ​pyenchant.

 I have been successful in installing 4.1.1 on both Python 2 and 3. The 
 installers are:

 - Anaconda2-4.1.1-Windows-x86.exe and​
 - Anaconda3-4.1.1-Windows-x86.exe

 According to my notes, Anaconda 4.2 was buggy: it does not handle 
 QTreeWidget properly.  This was several months ago.  Perhaps things are 
 better now.

 Once you get Anaconda installed and working, you should be able to use 
 conda install. If you have multiple Anaconda installations, you will need 
 to use the proper conda script, in either Anaconda2/scripts or 
 Anaconda3/scripts.

>
> Sorry if the answer is obvious or easy, but for me it's neither. Any 
> help or suggestions appreciated.
>

 ​Clearly, installing both python and pyqt (and especially pyqt5) is 
 made more difficult by qt bugs. But in the long run, I think using 
 Anaconda 
 is the best bet.

 Having said that, Lewis's suggestions might be enough.  

 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 

Re: Is this a bug of auto-rst node when refresh from disk

2017-03-28 Thread Edward K. Ream
On Tuesday, March 28, 2017 at 3:29:29 AM UTC-5, Edward K. Ream wrote:
>
> On Mon, Mar 27, 2017 at 8:58 PM, huliuhe  wrote:
>
>>
>> I upload a leo_bug.zip which have .leo and external rst file.  and a jpg 
>> file 
>>
>
> ​Thanks.  This is helpful.
>

The example files you sent me work for me.

New traces in c.refreshFromDisk confirm that everything appears to work as 
expected.

Please test the latest code to see how it works for you.

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: I've declared war on fit and finish problems :-)

2017-03-28 Thread Edward K. Ream
On Tuesday, March 28, 2017 at 2:48:43 PM UTC-5, Edward K. Ream wrote:

> I just created #451  
for this.

Fixed at 3c54f4c 

.

Afaik, @auto-rst is working well. Traces confirm this.

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: I've declared war on fit and finish problems :-)

2017-03-28 Thread Edward K. Ream


On Tuesday, March 28, 2017 at 2:29:28 PM UTC-5, Edward K. Ream wrote:
>
>
>
>
> My biggest peeve is refresh from disk selecting the top node in the
>> outline after reload.  Sometimes.  Do others see that?
>>
>
> ​I'll look into this as part of the work concerning @auto-rst and 
> refresh-from-disk.  Feel free to create a bug issue.
>

I just created #451  
for this.

Edward 

>
> 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: I've declared war on fit and finish problems :-)

2017-03-28 Thread Edward K. Ream
On Tue, Mar 28, 2017 at 12:30 PM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

Should we have a fit_and_finish label on github?
>

​I regard all such issues as real bugs.
​


> My biggest peeve is refresh from disk selecting the top node in the
> outline after reload.  Sometimes.  Do others see that?
>

​I'll look into this as part of the work concerning @auto-rst and
refresh-from-disk.  Feel free to create a bug issue.

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: I've declared war on fit and finish problems :-)

2017-03-28 Thread 'Terry Brown' via leo-editor
On Tue, 28 Mar 2017 10:05:14 -0700 (PDT)
"Edward K. Ream"  wrote:

> The new focus code is the opening shots in this war. I want Leo to be
> work *perfectly*.
> 
> The challenge is to have fit and finish problems rise to full
> consciousness while I am working on other things.

Been there.

Should we have a fit_and_finish label on github?

My biggest peeve is refresh from disk selecting the top node in the
outline after reload.  Sometimes.  Do others see that?

I think there are some challenges with focus and plugins.  Maybe even a
few rough edges with find.

Cheers -Terry

> For example, I recently ignored an apparent problem with Alt-G, 
> goto-global-line.  It would have been best to *stop everything* and
> make careful notes about how to recreate the problem, but I didn't do
> that. Now I can't find anything wrong with Alt-G. Live and learn.
> 
> 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.


I've declared war on fit and finish problems :-)

2017-03-28 Thread Edward K. Ream
The new focus code is the opening shots in this war. I want Leo to be work 
*perfectly*.

The challenge is to have fit and finish problems rise to full consciousness 
while I am working on other things.

For example, I recently ignored an apparent problem with Alt-G, 
goto-global-line.  It would have been best to *stop everything* and make 
careful notes about how to recreate the problem, but I didn't do that. Now 
I can't find anything wrong with Alt-G. Live and learn.

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.


a6da96f: --trace-focus and focus improvements

2017-03-28 Thread Edward K. Ream
The new code pretty much guarantees that focus will return to a reasonable 
and visible place after two consecutive Alt-Tabs.  In particular, it 
handles this confusing key sequence:

Alt, Alt-Tab, Alt-Tab

The first Alt puts focus in the menu bar.  The next two Alt-Tabs now put 
focus in the default spot, namely Leo's body pane.  Restoring focus to the 
menu bar does not seem to work.

The new code does not seem to interfere with plugins or other features, but 
there are no guarantees. Please report any problems immediately. 

It is not possible to restore focus when editing a headline. Trying to do 
so will hard-crash Leo.  Instead, Leo restores focus to the outline pane. 
Yes, it would be possible to re-edit the present node, but it's not worth 
the trouble. Arguably, de-activating Leo *should* end editing in headlines.

To see what is going on, you can use the new --trace-focus command-line 
argument.

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: Installing PyQt on Windows

2017-03-28 Thread Offray Vladimir Luna Cárdenas
Yes Jacob, please provide us your environment configuration. I'm 
entering to a couple of really busy moths (last part of writing my 
thesis), but I can try to test your setup in miniconda and give feedback.


Cheers,

Offray


On 27/03/17 23:11, Jacob MacDonald wrote:
I have Leo running in a Miniconda environment. It's not on Windows, 
but I could provide my environment configuration if it would be 
helpful. From that, it is one command to create a working environment 
with the conda command line tool.


Regards,

Jacob.

On Mon, Mar 27, 2017 at 10:58 PM Offray Vladimir Luna Cárdenas 
> wrote:


Hi,

I think that Anaconda is maybe too much, but I would advice to
checkout miniconda, which is basically just the installer and the
python interpreter and serves the same purpose, without including
a scientific python distribution with jupyter, to install Leo. My
advice is to create a Leo installer/updater using miniconda as a
base. Same installation recipes should work on miniconda and anaconda.

Cheers,

Offray


On 27/03/17 18:49, Largo84 wrote:

Thanks for that, Edward. I looked at Anaconda a few days ago, but
found it a little overwhelming. Maybe it will be easier than I
think once I get started. I'd like to revert one of my Win10
machines to 32 bit version so I can install pyenchant. Would it
be best to uninstall everything and start over from scratch with
Anaconda? Leo works fine on that machine now (except for no spell
check).

Rob

On Monday, March 27, 2017 at 6:05:41 PM UTC-4, Edward K. Ream wrote:



On Mon, Mar 27, 2017 at 10:06 AM, Largo84 
wrote:

I am trying to set up Leo for a colleague on his Windows
PC and see that it's much more difficult than I recall,
especially for non-programmers. Apparently, PyQt no
longer provides Windows binary installation executables.
Not really knowing what else to try, I opened the Python
command shell and typed `pip3 install PyQt5` and got a
syntax error.


​PyQt5 seems to be a moving target.  It's possible to screw
up a previously working Qt5 installation, as I demonstrated
several times today.

My suggestion is to start with a Python 3 version of
Anaconda.  I also recommend installing 32-bit versions, even
on 64-bit systems.  That way you can install ​
​pyenchant.

I have been successful in installing 4.1.1 on both Python 2
and 3. The installers are:

- Anaconda2-4.1.1-Windows-x86.exe and​
- Anaconda3-4.1.1-Windows-x86.exe

According to my notes, Anaconda 4.2 was buggy: it does not
handle QTreeWidget properly.  This was several months ago. 
Perhaps things are better now.


Once you get Anaconda installed and working, you should be
able to use conda install. If you have multiple Anaconda
installations, you will need to use the proper conda script,
in either Anaconda2/scripts or Anaconda3/scripts.


Sorry if the answer is obvious or easy, but for me it's
neither. Any help or suggestions appreciated.


​Clearly, installing both python and pyqt (and especially
pyqt5) is made more difficult by qt bugs. But in the long
run, I think using Anaconda is the best bet.

Having said that, Lewis's suggestions might be enough.

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.


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

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

Terry, Kent: Are we on for Ashland on Sunday, April 23?

2017-03-28 Thread Edward K. Ream
Are you both planning to attend?

I am about to book a room for Saturday and Sunday nights, April 22 and 23, 
at the Hotel Chequamegon.

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: Is this a bug of auto-rst node when refresh from disk

2017-03-28 Thread Edward K. Ream
On Mon, Mar 27, 2017 at 8:58 PM, huliuhe  wrote:

>
> I upload a leo_bug.zip which have .leo and external rst file.  and a jpg
> file
>

​Thanks.  This is helpful.

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: Installing PyQt on Windows

2017-03-28 Thread Edward K. Ream
On Mon, Mar 27, 2017 at 6:49 PM, Largo84  wrote:

Would it be best to uninstall everything and start over from scratch with
> Anaconda?
>

​You shouldn't have to do that.  I have both Anaconda 2 and 3 installed, in
c:\Anaconda2 and c:\Anaconda3.  I have scripts that choose between them:
python2, python3, pip2, pip3, leo2, leo3 etc.

In this way you could even have other python distros, including IPython.y

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.