Re: Interesting article about WebAssembly

2019-02-28 Thread Edward K. Ream
On Wed, Feb 27, 2019 at 8:16 AM Matt Wilkie  wrote:

> John posted this article in a Pharo thread, but I'm moving response here
> because of the topic:
> https://almarklein.org/python_and_webassembly.html
>

Great link.  Thanks for sharing it.

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: Windows: register .leo files with OS

2019-02-28 Thread Edward K. Ream
On Thu, Feb 28, 2019 at 2:06 AM Matt Wilkie  wrote:

> Good news! The Register and Unregister scripts to enable/disable Windows
> to start Leo from double-clicking on a .leo file now work.  --- For me.
> testing appreciated.
>

Many thanks for this work.

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: latex syntax coloring

2019-02-28 Thread Edward K. Ream
On Wed, Feb 27, 2019 at 8:12 AM Rob  wrote:

> Duh! Just figured it out. `@language latex` and `@language tex` give
> different results.
>

I have just created #1088
 for 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: Snippet for finding Leo's library

2019-02-28 Thread Edward K. Ream
On Thu, Feb 28, 2019 at 12:41 AM Matt Wilkie  wrote:


>  Nope, see https://gist.github.com/maphew/c4670b3cb6e045e7583769de6a185ee6.
>
>
> I'm happy to create an issue if this is supposed to work.
>

It's only guaranteed to work in its specific context.  Feel free to create
an issue, so it will remain on my radar.

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: latex syntax coloring

2019-02-28 Thread Josef


>
>- However, words after the closing `\` are improperly colorized.
>
>
This needs fixing, because the "closing" "\ "  designates really macro, 
which ends with the blank (and expands to a blank), since latex macros 
gobble up any trailing blank. I have such "\ " (backslash followed by a 
blank) macros all over the text.

- 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: latex syntax coloring

2019-02-28 Thread Josef
Hi Rob,

Thanks for figuring this out. I have always @language latex in my files, 
because that is what gets automatically added by Leo when opening a file 
with a .tex filename extension.

Since latex and tex have the same syntax, I don't see why there should be 
two different syntax coloring rules. There are some tex commands which are 
deemed obsolete in latex, like \em and \bf. It may make sense to color 
these differently in latex, but I fear it would need a latex expert to 
identify these and even then it my be a matter of taste.

In my mind, the most sensible solution would be to use always the tex 
syntax rules and to make @language tex the default when loading .tex (or 
.latex) files.  I am unsure about .bib files. In case one uses biblatex, 
they may contain tex commands, but they would really need a bit a different 
treatment.

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


Windows: register .leo files with OS

2019-02-28 Thread Matt Wilkie
Good news! The Register and Unregister scripts to enable/disable Windows to 
start Leo from double-clicking on a .leo file now work.  --- For me. 
testing appreciated. The enhancement issue is 
https://github.com/leo-editor/leo-editor/issues/1012, but it's probably a 
good idea to open new issues for bugs so details don't get lost in 
cross-threads.


They work a) from Leo GUI, b) from Leo command line, and c) from straight 
python :-) 

*Python:*
python .\leo-editor\leo\scripts\win-register-leo.leox

*Leo script:*
leo-messages.exe --script=..\scripts\win-register-leo.leox

*--Script* path must be relative to `leo-editor\leo\core` NOT the 
filesystem (a bug in Leo core I think).

*Leo GUI:*

* Run Leo >> Open specific Leo file >> `scripts.leo` >>  Find "Windows 
only scripts" node* >> select **`*@file win-register-leo.leox*`** >> 
Execute script (Ctrl-B)


* Current node location, subject to change: 
`.../leo-editor/leo/scripts/scripts.leo#Scripts-->@file 
leoScripts.txt-->Command-line scripts-->Windows-only scripts`

*Expected results*

```
(leo-dev) matt@ENV-SURFACE-MHW C:\Users\mattw\code\leo-editor
> python leo\scripts\win-register-leo.leox
--- Running register-leo Leo script
No admin privileges. Start Leo as administrator first and then run this 
script 
--- end of script

```

Open command prompt as Administrator and then retry:

```
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-register
-leo.leox
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
  Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
  Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
  Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
  Registered!
  .leo, .leox files associated as 'Leo.File'
--- end of script

matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-
unregister-leo.leox
--- Running unregister-leo Leo script
  Attempting to un-register leo filetype with Windows...
  Leo file type has been removed from registry
  .leo, .leox file associations removed from registry
--- end of script

matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\Scripts\leo-m.exe --script=..\scripts\win-
register-leo.leox

Leo 5.8.1-b2 devel, build 20190222005157, Fri Feb 22 00:51:57 PST 2019
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
  Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
  Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
  Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
  Registered!
  .leo, .leox files associated as 'Leo.File'


```

Remaining to-do before complete: Request elevation prompt when running from 
Leo gui.

Pushed to devel branch in 
[b5017f6](https://github.com/leo-editor/leo-editor/commit/b5017f610b6eb7b7839ac83fb7c9908a85f60c88)


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