Re: ENB: Aha: use @c.command to split leoCommands.py

2017-11-22 Thread Edward K. Ream
On Thursday, November 23, 2017 at 1:40:25 AM UTC-6, Edward K. Ream wrote:

So we have a dilemma.  One the one hand, it's *always* better to use 
> classes to encapsulate related functions.  Otoh, it would be intolerable 
> for text transformations to introduce subtle bugs in commander commands.  
> Existing unit tests don't cover all the cases. I'll have to think about 
> this...
>

Emacs never suffered from this dilemma because elisp had (then) no classes 
:-) All Emacs "macros" exist in a global namespace.

Rather than risk having to change the sources for commander commands, we 
could just use functions that "masquerade" as methods.  Like this, at the 
top-level of commanderFileCommands.py:

@g.commander_command('save')

def save(self, event=None, fileName=None):
# Exactly the same code as before.

Notes:

1. @c.command won't work, because c doesn't exist at the top level.  And it 
probably wouldn't work within a class either.  So we will probably want to 
define the @g.commander_command decorator. It should be no big deal.

2. Pylint might complain about functions having a "self" arg.  All such 
complaints can be disabled at the start of the file.

3. I'm not sure what pyflakes will do.  *This could be a show stopper* for 
using functions. I'll check this immediately.

*Summary*

The dilemma isn't resolved.  It may, after all, be preferable to use new 
subcommander Classes, even if some text munging is required.

In any case, @c.command will likely morph into @g.commander_command.

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: ENB: Aha: use @c.command to split leoCommands.py

2017-11-22 Thread Edward K. Ream
On Thursday, November 23, 2017 at 1:27:38 AM UTC-6, Edward K. Ream wrote:


> *The Aha*
> The @c.command decorator, defined in leoCommands.py, will define a 
> command, just like g.command. And (Aha!) the decorator will *also *inject 
> the function (as a method) into the Commands class.
>

It *might *be better to define new subcommanders to "hold" commander 
commands.  For example, the CommanderFileCommands class would define a save 
method which the the @c.command decorator would inject into the Commands 
class.

But what to do about existing assignments c = self in commander commands?

Could they be translated *safely* to c = self.c? It's worrisome...

So we have a dilemma.  One the one hand, it's *always* better to use 
classes to encapsulate related functions.  Otoh, it would be intolerable 
for text transformations to introduce subtle bugs in commander commands.  
Existing unit tests don't cover all the cases. I'll have to think about 
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: List of all *python* dependencies and why

2017-11-22 Thread Matt Wilkie
> You probably take this in to account already, but a lot of these things
>> are "recommends" rather than "requires" kind of dependencies.
>>
>
> ​Indeed.  The way to cut through all this morass is to use the Anaconda
> distribution.  This gives you almost everything you ever need, except
> pylint.
>

That probably explains why I didn't get any errors for not specifying
docutils etc. earlier. I'm quite liking Anaconda and the conda package
manager, though I'm using Miniconda and not the full distribution (only a
60mb initial download).

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


Re: List of all *python* dependencies and why

2017-11-22 Thread Edward K. Ream
On Wed, Nov 22, 2017 at 6:20 PM, Terry Brown  wrote:

> markdown.py would be a much lighter dependency than pandoc, although a
> bit less featurefull. My goal is to have leo_edit_pane replace
> viewrendered. LEP will use either.
>
> You probably take this in to account already, but a lot of these things
> are "recommends" rather than "requires" kind of dependencies.
>

​Indeed.  The way to cut through all this morass is to use the Anaconda
distribution.  This gives you almost everything you ever need, except
pylint.

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: List of all *python* dependencies and why

2017-11-22 Thread Matt Wilkie
thanks!

pypandoc is a wrapper around the pandoc commandline utility, allowing a
person to use pandoc from within python using python style syntax. It's a
sledgehammer solution to the small hammer problem I faced converting Leo's
markdown readme to restructured text for Pypi.org. However pandoc is
indisputed king of text format conversion so I used it, thinking it would
provide other utility too, That said, I'd be happy to switch to something
more lightweight.

As for 'recommends' vs 'dependencies', that's part of why I asked what the
packages are used for, to help me get a feel for what should be included
out of the box. Actually that should have been part of the opening Q: What
should be included out of the box?

matt

On Wed, Nov 22, 2017 at 4:20 PM, Terry Brown  wrote:

> markdown.py would be a much lighter dependency than pandoc, although a
> bit less featurefull. My goal is to have leo_edit_pane replace
> viewrendered. LEP will use either.
>
> You probably take this in to account already, but a lot of these things
> are "recommends" rather than "requires" kind of dependencies.
>
> Cheers -Terry
>
> On November 22, 2017 3:39:16 PM CST, Chris George 
> wrote:
>>
>> pyxml is required if you want to import xml files.
>>
>> pandoc is required for users if they wish to view markdown files using
>> viewrendered. I am not sure of the difference between pandoc and pypandoc.
>>
>> Chris
>>
>>
>>
>> On Wed, Nov 22, 2017 at 12:34 PM, Matt Wilkie  wrote:
>>
>>> I'm in the closing stretch for Issue #586, separating end user
>>> dependencies from developer requirements. This is what I have now, is
>>> anything missing?
>>>
>>> ~~~
>>> user_requires = [
>>> 'docutils', # Sphinx, rST plugin
>>> 'pyxml', # ?
>>> 'pyenchant', # spell check support
>>> 'PyQt5; python_version >= "3.0"',
>>> 'python-qt5; python_version < "3.0" and platform_system=="Windows"',
>>> # missing: pip installable pyqt for Linux python 2.x
>>> ]
>>>
>>> developer_requires = {'develop':[
>>> 'pylint','pyflakes', # coding syntax standards
>>> 'pypandoc', # doc format conversion
>>> 'twine','wheel','keyring' # Pip packaging, uploading to PyPi
>>> ]}
>>> ~~~
>>>
>>> Note: this is specific to Python module and library dependencies, which
>>> is why Git isn't in the list for developers. It can't be installed with Pip.
>>>
>>> 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 https://groups.google.com/group/leo-editor.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> --
> 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.


Re: List of all *python* dependencies and why

2017-11-22 Thread Terry Brown
markdown.py would be a much lighter dependency than pandoc, although a bit less 
featurefull. My goal is to have leo_edit_pane replace viewrendered. LEP will 
use either. 

You probably take this in to account already, but a lot of these things are 
"recommends" rather than "requires" kind of dependencies.

Cheers -Terry 

On November 22, 2017 3:39:16 PM CST, Chris George  wrote:
>pyxml is required if you want to import xml files.
>
>pandoc is required for users if they wish to view markdown files using
>viewrendered. I am not sure of the difference between pandoc and
>pypandoc.
>
>Chris
>
>
>
>On Wed, Nov 22, 2017 at 12:34 PM, Matt Wilkie  wrote:
>
>> I'm in the closing stretch for Issue #586, separating end user
>> dependencies from developer requirements. This is what I have now, is
>> anything missing?
>>
>> ~~~
>> user_requires = [
>> 'docutils', # Sphinx, rST plugin
>> 'pyxml', # ?
>> 'pyenchant', # spell check support
>> 'PyQt5; python_version >= "3.0"',
>> 'python-qt5; python_version < "3.0" and
>platform_system=="Windows"',
>> # missing: pip installable pyqt for Linux python 2.x
>> ]
>>
>> developer_requires = {'develop':[
>> 'pylint','pyflakes', # coding syntax standards
>> 'pypandoc', # doc format conversion
>> 'twine','wheel','keyring' # Pip packaging, uploading to PyPi
>> ]}
>> ~~~
>>
>> Note: this is specific to Python module and library dependencies,
>which is
>> why Git isn't in the list for developers. It can't be installed with
>Pip.
>>
>> 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 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.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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: List of all *python* dependencies and why

2017-11-22 Thread Chris George
pyxml is required if you want to import xml files.

pandoc is required for users if they wish to view markdown files using
viewrendered. I am not sure of the difference between pandoc and pypandoc.

Chris



On Wed, Nov 22, 2017 at 12:34 PM, Matt Wilkie  wrote:

> I'm in the closing stretch for Issue #586, separating end user
> dependencies from developer requirements. This is what I have now, is
> anything missing?
>
> ~~~
> user_requires = [
> 'docutils', # Sphinx, rST plugin
> 'pyxml', # ?
> 'pyenchant', # spell check support
> 'PyQt5; python_version >= "3.0"',
> 'python-qt5; python_version < "3.0" and platform_system=="Windows"',
> # missing: pip installable pyqt for Linux python 2.x
> ]
>
> developer_requires = {'develop':[
> 'pylint','pyflakes', # coding syntax standards
> 'pypandoc', # doc format conversion
> 'twine','wheel','keyring' # Pip packaging, uploading to PyPi
> ]}
> ~~~
>
> Note: this is specific to Python module and library dependencies, which is
> why Git isn't in the list for developers. It can't be installed with Pip.
>
> 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 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.


Re: leo-editor.com in "suspended page" mode

2017-11-22 Thread Edward K. Ream
On Wed, Nov 22, 2017 at 2:14 PM, Matt Wilkie  wrote:

> http://leoeditor.com/ is redirecting to
> http://leoeditor.com/cgi-sys/suspendedpage.cgi with the text "Contact
> Support" as the page title.
>

​Thanks for this.  I'll contact my brother when I 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


List of all *python* dependencies and why

2017-11-22 Thread Matt Wilkie
I'm in the closing stretch for Issue #586, separating end user dependencies
from developer requirements. This is what I have now, is anything missing?

~~~
user_requires = [
'docutils', # Sphinx, rST plugin
'pyxml', # ?
'pyenchant', # spell check support
'PyQt5; python_version >= "3.0"',
'python-qt5; python_version < "3.0" and platform_system=="Windows"',
# missing: pip installable pyqt for Linux python 2.x
]

developer_requires = {'develop':[
'pylint','pyflakes', # coding syntax standards
'pypandoc', # doc format conversion
'twine','wheel','keyring' # Pip packaging, uploading to PyPi
]}
~~~

Note: this is specific to Python module and library dependencies, which is
why Git isn't in the list for developers. It can't be installed with Pip.

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


Re: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Matt Wilkie
> With regard to dependencies, do you recall what docutils, pyxml, and
> pyenchant required for? I don't have them in my list, but haven't
>
seen any errors about them either.
>

Nevermind, answered a couple myself, and am starting new thread to collect
all dependencies

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


Re: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Matt Wilkie
Thanks for the recipe Chris. Steps 2 & 3 are about to get a whole lot
easier, pending resolution of issue # 586 which I'm nearing the end of.

With regard to dependencies, do you recall what docutils, pyxml, and
pyenchant required for? I don't have them in my list, but haven't seen any
errors about them either.

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


leo-editor.com in "suspended page" mode

2017-11-22 Thread Matt Wilkie
http://leoeditor.com/ is redirecting to
http://leoeditor.com/cgi-sys/suspendedpage.cgi with the text "Contact
Support" as the page title.

-- 
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: Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
On Wednesday, November 22, 2017 at 7:01:39 AM UTC-6, Edward K. Ream wrote:
>
> Rev fee9130 simplifies the declutter code significantly, but this remains 
> experimental code.
>

Recent revs update the declutter docs in LeoDocs.leo and leoSettings.leo.  
Both have been pushed to master.

At present I am not able to connect to my brother Speed's server, so I the 
revised docs are not on the web.  However, the docs in LeoDocs.leo are 
readable enough.  See:

LeoDocs.leo#Leo's Documentation-->Users Guide-->Customizing Leo-->
@rst html\customizing.html-->Decluttering headlines

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: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Chris George
I never use viewrendered except to read about plugins. :-)

Chris

On Wed, Nov 22, 2017 at 9:02 AM, Josef  wrote:

>
>
>> 2. Install the prerequisites for Leo. These I usually install using pip
>> or the package manager in the distribution. Try pip first.
>>
>> docutils, pandoc, pyxml, pyenchant, git
>>
>> thank you for the tip. Installing docutils seems to have fixed my problem
> with the viewrendered plugin.
>
> - 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.
>

-- 
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: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Josef


>
> 2. Install the prerequisites for Leo. These I usually install using pip or 
> the package manager in the distribution. Try pip first.
>
> docutils, pandoc, pyxml, pyenchant, git
>
> thank you for the tip. Installing docutils seems to have fixed my problem 
with the viewrendered plugin. 

- 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: viewrendered fails to load

2017-11-22 Thread Josef
I followed a suggestion of Chris George to install several dependencies of 
Leo and it seems since I installed docutils, viewrendered works again.

Thanks Chris

-- 
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: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Josef
Hi Chris,

thanks for the tips. In fact, I have installed Leo in a pretty similar way 
as you (and I also use Leo already for several years). My problem was the 
file association, which you avoided.

Also, for a while I was not able to use the viewrendered plugin any more, 
and I am surprised you recommend Anaconda for the PyQt installation. I use 
miniconda3 which is essentially the same as anaconda, only the files are 
not downloaded right away. Installing PyQt5 does not deliver all PyQt 
packages needed for the viewrendered plugin, e.g. the WebKitWidgets seem to 
be missing. Is the viewrendered plugin working for you?

- 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: Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
Rev fee9130 simplifies the declutter code significantly, but this remains 
experimental code.

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: how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Chris George
Hello Josef,

I am a writer and a longtime Linux Mint user. I recently switched to Chakra
as Mint dropped KDE. I am not a programmer.

I have been using Leo for ten years as my primary editor. (Wow, time flies).

Here is how I install Leo.

1. Install the latest Anaconda from here:
https://www.anaconda.com/download/#linux

I use the python 3 version. I am not a programmer so it doesn't matter to
me. The latest version of anaconda comes with anaconda-navigator, an
excellent utlity that helps manage what is installed and what is not and
simplifies setting up a python environment including different versions of
python and pyQT. I have had so many bad experiences with the python
installed by distributions that anaconda has sorted out that I have learned
to start with anaconda instead of monkeying with .deb packages and python.

2. Install the prerequisites for Leo. These I usually install using pip or
the package manager in the distribution. Try pip first.

docutils, pandoc, pyxml, pyenchant, git

3. Install Leo.

Open a terminal in your home directory. git clone
https://github.com/leo-editor/leo-editor.git

4. Configure environment.

I use a shell script to run Leo from my home directory to run Leo. I always
open Leo from a terminal as often valuable information is displayed in the
terminal that doesn't show anywhere else.

#!/bin/bash
cd leo-editor
git pull
./launchLeo.py --session-restore --session-save

I have never tried to associate .leo files or .db files with Leo. In a
decade I have actually only ever used three actual files: myLife.leo (my
organizer), writing.leo (small projects, like articles, websites etc.), and
novel.db, the book I am working on. I have generated over a thousand text
files using @file and @clean from these .leo files.

In general, try to stay away from the package manager in your distribution
when it comes to python and QT. Anaconda is your friend. :-)

Hope this helps,

Chris

On Wed, Nov 22, 2017 at 4:03 AM, Josef  wrote:

> Although I used python occasionally since version 1.3, programming is not
> my main occupation.
> So far I have installed leo from git, but I am missing a straightforward
> way to configure it on my Xubuntu 16.04 machine.
>
> I do not know how to create a new mime type for it and associate it with
> leo (it's easy to associate it with an existing mime type, but I do not
> want to open all XML files with Leo).
> The mime type editor, that comes with xubuntu does not seem to allow
> adding a new type!
>
> I do not know what all the dependencies are, therefore I have currently
> viewrendered not working.
>
> The Leo Debian package sources from Ville Vaino are for the jaunty version
> of Debian and do not seem to load in Xubuntu 16.04.
>
> I think it would be nice to be able install and configure Leo without too
> much hassle at least on the Ubuntu LTS versions and derivates, e.g.
> Xubuntu, Kubuntu, ...
> Ideally that would mean a matching .deb package, but I would be happy with
> a good set of instructions.
>
> --
> 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.


Re: Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
On Wednesday, November 22, 2017 at 5:09:21 AM UTC-6, Edward K. Ream wrote

Instead of contortions trying to specify \1, the declutter mechanism should 
> support this:
>
> RULE :([\w_@]+:)+\s*$
> REPLACE-HEAD
>
> This tells the declutter code to replace the headline by the text *preceding 
> *the matched text.  Similarly:
>
> - REPLACE-TAIL replaces the headline by the text that *follows* the 
> matched text.
>
> - REPLACE-REST replaces the headline by everything *except* the matched 
> text.
>

Done at f5bca85.  *This is highly experimental code*, despite looking 
straightforward.

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


how should an (ordinary) user install Leo on Linux?

2017-11-22 Thread Josef
Although I used python occasionally since version 1.3, programming is not 
my main occupation.
So far I have installed leo from git, but I am missing a straightforward 
way to configure it on my Xubuntu 16.04 machine.

I do not know how to create a new mime type for it and associate it with 
leo (it's easy to associate it with an existing mime type, but I do not 
want to open all XML files with Leo).
The mime type editor, that comes with xubuntu does not seem to allow adding 
a new type!

I do not know what all the dependencies are, therefore I have currently 
viewrendered not working.

The Leo Debian package sources from Ville Vaino are for the jaunty version 
of Debian and do not seem to load in Xubuntu 16.04.

I think it would be nice to be able install and configure Leo without too 
much hassle at least on the Ubuntu LTS versions and derivates, e.g. 
Xubuntu, Kubuntu, ...
Ideally that would mean a matching .deb package, but I would be happy with 
a good set of instructions.

-- 
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: viewrendered fails to load

2017-11-22 Thread Josef
 I noticed that in the conda/pip installed versions of python3 and PyQt5 
there is the QtWebKitWidgets module missing, which I believe is a 
prerequisite for viewrendered.

In the xubuntu 16.04 provided packages the modules QtWebKitWidgets and 
PySvg are both present, but it still does not load. The version of PyQt 
installed by xubuntu is 5.5.1, though and I saw a post suggesting this 
version is not compatible with viewrendered.

I also don't see any python(3)-pyqt4.qtwebkit package on xubuntu 16.04 - 
qtwebkit seems to be only in Qt5 versions available for xubuntu.

Anther post suggested that also the qsci module, is needed.

I would like to know what are the prerequisites for viewrendered actually?

- 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: Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
On Wednesday, November 22, 2017 at 4:11:10 AM UTC-6, Edward K. Ream wrote:
 

> the org-mode importer regex is much simpler, because the code only needs 
> to recognize the trailing tags themselves, not the head.
>

This suggests a much easier way to specify org-mode regex patterns.  I knew 
about this possibility several days ago, but I wanted to give regex's a 
chance to show what they can do.  They failed ;-)

Instead of contortions trying to specify \1, the declutter mechanism should 
support this:

RULE :([\w_@]+:)+\s*$
REPLACE-HEAD

This tells the declutter code to replace the headline by the text *preceding 
*the matched text.  Similarly:

- REPLACE-TAIL replaces the headline by the text that *follows* the matched 
text.

- REPLACE-REST replaces the headline by everything *except* the matched 
text.

These should be easy to do.

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.


b94fe31 organizes @data tree-declutter-patterns in leoSettings.leo

2017-11-22 Thread Edward K. Ream
The ability to organize @data nodes has been around for some time.  It's a 
great feature.

The new nodes are here: leoSettings.leo#Declutter-->@data 
tree-declutter-patterns

Please report any problems.

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: Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
On Wednesday, November 22, 2017 at 4:05:25 AM UTC-6, Edward K. Ream wrote:

> This thread...[focuses] exclusively on the declutter regex.

I should add that the org-mode importer regex is much simpler, because the 
code only needs to recognize the trailing tags themselves, not the head. 
Indeed, the code finds tags using:

tag_pattern = re.compile(r':([\w_@]+:)+\s*$')

This completely avoids the problem of specifying what *doesn't* match. For 
details, see the org_i.clean_headline method. But for decluttering, we have 
to know what *precedes* the tags.

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.


Declutter patterns for org-mode tags

2017-11-22 Thread Edward K. Ream
This thread is a continuation of 
"ENB: Completing #578: support for org-mode tags", focused exclusively on 
the declutter regex.

*tl;dr:* Read the summary.  

My original attempt was:

RULE ^([^:]*):([\w_@]+:)+\s*$
REPLACE \1

This is *almost* what we want.  It will compute \1 properly for these 
strings:

abc :tag1:tag2:
abc:tag1:tag2:

but not if the *head* (everything before the tags) contains a colon.  This 
fails:

abc:xyz :tag1:tag2:

Imo, if any regex is going to work, it is likely to involve a lookahead 
assertion.  Indeed, after considerable experimentation, the following 
*almost* works:

RULE ^((.(?!:[\w_@]+:))+)\s*:([\w_@]+:)+\s*$
REPLACE \1

Now the following all match, setting \1 correctly.

abc :tag1:tag2:
abc:xyz :tag1:tag2:

However, the space before the first tag is required.  These do *not* match:

abc:tag1:tag2:
abc:xyz:tag1:tag2:

I'm not sure whether whitespace will *always* precede the first org-mode 
tag.  Leo's org-mode writer does write a single space before the list of 
tags.

*Summary*

Rev 59bd6b1 adds two *disabled *declutter rules for org-mode tags.

*Rule 1*: This rule does not allow ":" before the trailing list of tags:

RULE ^([^:]*):([\w_@]+:)+\s*$
REPLACE \1

*Rule 2*: This rule *does *allow ":" before the trailing list of tags, but 
*only* if the list of tags is preceded by at least one blank.  

RULE ^((.(?!:[\w_@]+:))+)\s*:([\w_@]+:)+\s*$
REPLACE \1

Leo's org-mode writer supplies that blank, but I'm not sure about headlines 
produced by org-mode itself.

Imo, rule 2 is preferable.  If the rule fails when tags are actually 
present, it is easy enough to add the required blank. As soon as the user 
does so, the tags will disappear.

What do you think, Amigos?

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: ENB: Completing #578: support for org-mode tags

2017-11-22 Thread Edward K. Ream
On Tuesday, November 21, 2017 at 10:55:15 AM UTC-6, Edward K. Ream wrote:
>
> On Tue, Nov 21, 2017 at 10:34 AM, Edward K. Ream  
> wrote:
>
> Unless I hear objections, I am going to comment out the code in the org 
>> mode reader and writer that inserts or delete tags.
>>
>
> ​Done at fde1e6. ### marks all changes. I'll be happy to reinstate the 
> code if that's what we decide. But I think decluttering is the elegant way.
>

Rev f4bb1d removes all the code marked by ### comments.

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