Re: leojs alpha

2023-06-25 Thread Arjan
> After coding for a few years

Awesome perseverance. I've just continued using regular Leo because I'm 
used to the workflow, but I hope to find some time to play with the newer 
developments. Good luck!

On Thursday, June 22, 2023 at 1:08:48 PM UTC+2 Edward K. Ream wrote:

> > ...So anywhere from a week or two, or a month or two, hard to say, but 
> it's going to be this summer! :D
>
> Assuming vs-code allows it, I encourage you to release an alpha version 
> asap. There is nothing wrong with a list of known bugs.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9ffd5361-d20f-4362-b249-023f50f21075n%40googlegroups.com.


Re: Non-ASCII characters in a node body make edit operations produce unintended results

2022-05-05 Thread Arjan
It's not a new problem: https://github.com/leo-editor/leo-editor/issues/1368

On Thursday, April 14, 2022 at 2:55:33 AM UTC+2 tbp1...@gmail.com wrote:

>
> There could also be a problem with a specific version of Qt, so if you can 
> try later version (or possibly earlier) it might behave differently. 
> Supposedly, all Qt widgets and strings work correctly with unicode and/or 
> utf-8 encoding.
> On Wednesday, April 13, 2022 at 4:14:07 PM UTC-4 tbp1...@gmail.com wrote:
>
>> It looks like that on particular page, the non-ascii characters are 
>> emojis.  I copied part of that page with two of the emojis into a Leo node 
>> and didn't see any unusual behavior.  ,  and copying with 
>>  worked as expected.  Do you have an example that didn't work right 
>> for you?
>>
>> Here's an online checker for non-ascii characters:  Non-Ascii Checker 
>> . You can paste suspect 
>> text in or point it to a file.
>>
>> Since Python by default uses utf-8 and unicode, text that isn't encoded 
>> in utf-8 could cause problems.  Or if it is wrongly encoded, or encoded 
>> with some other encoding.  Some text editors can figure it out and you can 
>> tell them to save a file in a different encoding.  EditPlus is the one I 
>> use for this.  Not free but worth the $35.  Notepad++ also can do it, 
>> though I haven't used it.
>>
>> Characters that your font does not have a glyph for might be troublesome 
>> too, but I'm not sure.  Again, emojis probably would be the most likely if 
>> we're not getting into cjk characters, since so many new emojis are getting 
>> introduced..
>>
>> If we see the kind of behavior you experienced in properly encoded 
>> strings, then for sure we'd have a problem.  Unfortunately there is a lot 
>> of incorrectly encoded material out there.  Hmm, I wonder if Leo should 
>> have an encoding checker built in?
>>
>> On Wednesday, April 13, 2022 at 2:48:06 PM UTC-4 SegundoBob wrote:
>>
>>> I don't know if this is a bug or just the way PyQt works, but this is a 
>>> very annoying problem.  Sometimes HOME takes you to the end of line instead 
>>> of the start.  Sometimes select and Ctrl+C copies unselected characters.  
>>> The "mistakes" are endless because the displayed cursor position is not 
>>> "correct".
>>>
>>> I first noticed this problem in 2022-02 because more and more articles 
>>> posted on the Internet contain non-ASCII and everyday I copy many articles 
>>> to node bodies and then edit them slightly.
>>>
>>> 2022-04-13 Wed I definitely identified the problem with the help of this 
>>> command:
>>>
>>> grep --color='auto' -P -n "[^\x00-\x7F]" x.txt
>>>
>>> which I obtained from
>>>
>>>
>>> https://stackoverflow.com/questions/3001177/how-do-i-grep-for-all-non-ascii-characters
>>>
>>> Here is an example article containing many non-ASCII characters:
>>>
>>> https://newsletter.pragmaticengineer.com/p/scoop-atlassian
>>>
>>> There are many suggestions on the Internet for removing non-ASCII 
>>> characters using Python.  So far this is the best workaround that I've come 
>>> up with.  If we don't come with a fix or a better workaround, I'll 
>>> eventually figure out how to replace non-ASCII charcters that have similar 
>>> ASCII characters with the appropriate ASCII characters.  Someone has 
>>> probably implemented this, but so far I have not found it.
>>>
>>> Unfortunately, I have higher priority problems right now that prevent me 
>>> from devoting much time to this problem.
>>>
>>> Versions tested:
>>>
>>> Leo 6.6b2-devel, devel branch, build 0ce2fa9ad5
>>> 2022-02-24 09:55:29 -0600
>>> Python 3.8.10, PyQt version 5.12.8
>>> linux
>>> ---
>>> Leo 6.6.1-devel, devel branch, build 90bad4f475
>>> 2022-04-13 09:33:47 -0500
>>> Python 3.8.10, PyQt version 5.12.8
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0a388816-9669-42a9-8104-84bcb66da992n%40googlegroups.com.


Re: If possible, give a thumbs up to this vscode related github issue :)

2021-06-26 Thread Arjan
> How do I give it a thumbs up?

Emoji reactions are on the top right menu of a post. I've now added the 
first thumbs-up so you can just click that.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/079b026b-e49f-4854-b9b0-6ea7e400402en%40googlegroups.com.


Re: Focus switches from body pane to outline when saving

2021-01-25 Thread Arjan
Well, it appears I'm running into all kinds of oddities with my new setup: 
without changing anything except rebooting, I now no longer see this 
behavior.

On Saturday, January 23, 2021 at 4:52:24 AM UTC+1 tbp1...@gmail.com wrote:

> This does not happen on my Windows machine using the current devel branch:
>
> Leo 6.4-devel, devel branch, build 1b431f4b7b
> 2020-12-31 09:26:52 -0500
> Python 3.8.6, PyQt version 5.15.1
> Windows 10 AMD64 (build 10.0.19041) SP0
>
>
> On Friday, January 22, 2021 at 10:50:52 AM UTC-5 Arjan wrote:
>
>> I'm running Leo editor on a new Linux install, and am running into a 
>> behavior I haven't seen before: when I'm working in the body pane and save 
>> contents with Ctrl-S, focus switches to the outline (which I don't want).
>>
>> Is there any Leo configuration related to this? (I didn' t find any).
>>
>> I'm running Leo on Void Linux with XFCE, like so:
>>
>> ~/.virtualenvs/leo/bin/python ~/path/to/leo-editor/launchLeo.py
>>
>> Leo 6.3, master branch, build e46e9315f6
>> 2020-11-10 00:33:16 -0600
>> Python 3.9.1, PyQt version 5.15.2
>> linux
>>
>> Any ideas?
>>
>> Cheers,
>> Arjan
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/215d8825-45b0-47eb-bbda-defd37105ce7n%40googlegroups.com.


Focus switches from body pane to outline when saving

2021-01-22 Thread Arjan
I'm running Leo editor on a new Linux install, and am running into a 
behavior I haven't seen before: when I'm working in the body pane and save 
contents with Ctrl-S, focus switches to the outline (which I don't want).

Is there any Leo configuration related to this? (I didn' t find any).

I'm running Leo on Void Linux with XFCE, like so:

~/.virtualenvs/leo/bin/python ~/path/to/leo-editor/launchLeo.py

Leo 6.3, master branch, build e46e9315f6
2020-11-10 00:33:16 -0600
Python 3.9.1, PyQt version 5.15.2
linux

Any ideas?

Cheers,
Arjan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/45485229-5e98-40ce-8aa0-6d9a069d4c5en%40googlegroups.com.


Re: SB: What I'll be studying

2020-11-07 Thread Arjan
I'd like to suggest looking into Svelte, a modern JavaScript framework 
that's compiled at build time, so it has great performance.

I enjoyed this presentation: Rich Harris - Rethinking reactivity 
 (Youtube)

And the learning materials and REPL on https://svelte.dev/ are excellent.
On Saturday, November 7, 2020 at 1:18:49 PM UTC+1 Edward K. Ream wrote:

> It's becoming clearer what I'll be studying and exploring during the 
> sabbatical.
>
> For the last 25+ years I've pretty much ignored web development. That 
> surely was a mistake. There is a ton of interesting technology out there.
>
> My initial focus will be on node.js packages, and the frameworks and 
> technologies connect to them. I first went down this rabbit hole by looking 
> at the yarn.lock file for the jupyterlab project. This file contains all 
> the node.js package dependencies. I then googled some dependencies and took 
> a look at the packages.
>
> The package-lock.json file shows package dependencies for the leovue and 
> leointeg projects.
>
> I then thought to google something like "most popular node.js packages", 
> which unlocked 25+ years of programming effort. "Attached" to popular 
> node.js packages are major projects/frameworks such as jupyterlab, react, 
> angular, ruby on rails, vue.js, etc. etc.
>
> Many of these technologies can be used to build web sites. I'll build a 
> vanilla site for Rebecca using WordPress and woocommerce. Ditto for my son 
> James. After that, I may play around with various frameworks and website 
> builders.
>
> My plan will be to get an overview of the web world first, and then see 
> where this overview takes me.
>
> All comments and suggestions welcome.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dd3626f5-de2c-4a8e-92a4-3b739b9701d5n%40googlegroups.com.


Re: LaTex to PDF workflow using Leo

2020-09-29 Thread Arjan
The above script used to work, but recently (after not having used it for a 
long time), I noticed it errors:

exception executing script
TypeError: afterChangeNodeContents() got an unexpected keyword argument 
'dirtyVnodeList'
only 6 lines

  line 49: p.b = s
* line 50: u.afterChangeNodeContents(p, undoType, bunch2, 
dirtyVnodeList=dirtyVnodeList)
  line 51: p.v.setDirty()
  line 52: changed += 1

Has this method changed? What should it look like now to have undo?

Best, Arjan

On Monday, March 12, 2018 at 11:49:07 PM UTC+1 Edward K. Ream wrote:

>
>
> On Mon, Mar 12, 2018 at 5:44 PM, Arjan  wrote:
>
>> Thanks, Edward!
>>
>
> You're welcome.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1da5f225-75f5-4d0d-9cc2-019e9ca0n%40googlegroups.com.


Re: Leo Integration Status Update

2020-09-22 Thread Arjan
Very nice video. Also, looking forward to a stable LeoInteg!

Now, if there's a light theme called "Winter is coming", there should also 
be a dark theme called "The night is dark and full of terrors"? ;)

On Monday, September 21, 2020 at 7:45:33 AM UTC+2 Félix wrote:

> Hello all of you Leonistas!
>
> Here's what I've been up to lately, in this continuing pandemic quarantine 
> reality:
>
> I've celebrated the one-year anniversary of LeoInteg's development by 
> taking a little more than a month off of programming... And for fun, made a 
> remake of the 'intro to Leo" video. 
>
> So check it out: https://youtu.be/SYwlfdEukD4 (and the other how-to 
> install video if you haven't tried it yet: https://youtu.be/rutt11xL54I)
>
> It was a great opportunity to learn to use Blender and openShot, which 
> I've wanted to learn from a long time now...
>
> I guess i'll include it in LeoInteg's documentation until I update it 
> somewhat later to a more serious version ;)
>
> But most importantly, It was a period where I wanted to wait and see if 
> the changes in the vscode API by vscode's team, which rendered leoInteg 
> less stable, were permanent. 
>
> Seem that they are permanent indeed, and that the body-pane instantiation 
> and logic will have to be changed substantially. 
>
> So that's what I'll focus on - as I get back to work on LeoInteg and 
> polish the somewhat ad-hoc integration of the last features that were last 
> included (multiple documents support and switching documents, among others) 
> in the days to come.
>
> Looking forward to a useable '1.0' version in a couple of months :) 
>
> Cheers! and please let me know what you think about the video!
> --
> Félix
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1f9861cd-5a85-4314-bafa-e5fab6101741n%40googlegroups.com.


Re: (yet again) New features on the dev branch!

2020-07-14 Thread Arjan

>
> frankly just gonna have to name the 0.1.13 release the 'ArJan' release !
>
Hehe, thanks! ;)

I don't have much time for experimenting with everything currently, but 
it's great to see so much progress and discussion!

Cheers,
Arjan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b0072ab0-5600-49e5-b77f-ab001b1f00e7o%40googlegroups.com.


Re: LeoInteg: Multi-file support on the dev branch

2020-07-06 Thread Arjan
Right, I'm at Leo 6.2.1 final, didn't know it depends on new Leo 
functionality! Thanks, will try later.

On Monday, July 6, 2020 at 1:23:23 PM UTC+2, Félix wrote:
>
> Please copy your leo log pane content to see what version of Leo you're 
> using. My guess is you're not on the development branch. (This won't be 
> necessary at the next leo release for 6.3 or something close to that)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1658be69-aacc-48fb-959f-ec82f8882236o%40googlegroups.com.


Re: LeoInteg: Multi-file support on the dev branch

2020-07-06 Thread Arjan
I'm on the latest version on the master branch (2020-07-04 692173d), and I 
see the "Open Leo File" (both under the outline and under "LEO DOCUMENTS"), 
but using this opens the new Leo outline instead, it doesn't keep the 
previously opened file in the list. Actually the documents view doesn't 
show any opened document for me. Thoughts?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b70e2f48-4013-4b38-ae10-de2f239c857eo%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-12 Thread Arjan
I downgraded to Node.JS 10.16.3, but the error remains the same (`from 
python Error importing leoApp.py`)

I also tried creating a python3.bat file on my PATH, which says 
`%windir%\system32\cmd.exe /K ""C:\Programs\Anaconda3\Scripts\activate.bat" 
&& %*"`.
Now there's no more errors, but still no "Load File" button. I always 
forget the correct options for batch files though, maybe this isn't quite 
right.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f8d71fdc-8f02-458d-bf9a-26a17297f24e%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-12 Thread Arjan
Hmm, I'm sure I saw Python 2.7 getting installed, as well as Chocolatey and 
one or more MS dependencies, perhaps one of those triggered it. But I was 
just mentioning that message for completeness.

As for versions:
- VSCode 1.39.1
- Node.JS 12.11.1 -- that seems like the only significant difference, but 
seems an unlikely cause for the problem?
- Leo 6.0-final (master branch from Git)
- Python 3.7.3 (via Anaconda)
- PyQt version 5.9.6 (installed via `conda install pyqt` -- as far as I 
remember, and put in my notes, I didn't specify anything further for Qt5 
itself).

Cheers,
Arjan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3c17b032-1f8c-4063-b651-00d5b54a6824%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-12 Thread Arjan
Here's what I got. I did:

1. `cd leointeg`; `git checkout .`; `git pull`
2. npm install
added 2 packages from 4 contributors and audited 313 packages in 1.678s

Then F5 gives me the extension, but still without a Load File option in the 
Leo tab. I get this error in the original VSCode window:

stderr:   File "c:\Programs\leointeg/scripts/leobridge.py", line 26

print(p_string, flush=True)
 ^
SyntaxError: invalid syntax
leoBridge.js:106

child process exited with code 1
leoBridge.js:109

Looks like it's using Python 2 (which was installed along with Node.js, I 
didn't have it installed previously).

After adding `C:\Programs\Anaconda3` to my (system) PATH variable before 
C:\Python27, I get this:

from python Error importing leoApp.py
leoBridge.js:73
stderr: Traceback (most recent call last):
  File "c:\Programs\leointeg/scripts/leobridge.py", line 13, in 
verbose=False) # True: print informational messages.
  File "C:\Programs\Leo\leo\core\leoBridge.py", line 71, in controller
verbose)
  File "C:\Programs\Leo\leo\core\leoBridge.py", line 89, in __init__
self.initLeo()
  File "C:\Programs\Leo\leo\core\leoBridge.py", line 120, in initLeo
assert(g.app)
AssertionError

leoBridge.js:106
child process exited with code 1

(And still no Load File in Leo's tab).
Maybe with Anaconda we need to use a different way to properly invoke the 
environment?
I forgot the details of why, but for my cmd shell I use this:

%windir%\System32\cmd.exe "/K" C:\Programs\Anaconda3\Scripts\activate.bat

Arjan

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/da52958d-b446-4385-84ed-840132c16d6d%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-11 Thread Arjan
Just one warning:
>
>
(node:6096) [DEP0005] DeprecationWarning: Buffer() is deprecated due to 
security and usability issues. Please use the Buffer.alloc(), Buffer.
allocUnsafe(), or Buffer.from() methods instead.
warning.js:18

It looks like an awesome way of using Leo, so thank you for making it and 
for looking into our issues!

Cheers

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7561427c-a5c0-432f-b5ff-cbc574fdb652%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-11 Thread Arjan
Yeah, problem is I don't have the Open Leo File button: 

[image: Leo-VSCode.png] 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/bb79be5f-9d28-4cd6-977c-e08047bbf68f%40googlegroups.com.


Re: How do you install leointeg into VS Code?

2019-10-11 Thread Arjan
I'm not yet able to get a Leo outline working with these instructions. I do 
get the new window with a Leo icon in the sidebar, but opening a folder 
with .leo files doesn't provide an outline view, and I don't see an "Open 
Leo File" on the Leo view.

Is there a way to check if the Python/Leo setup itself is configured 
correctly? I'm normally using Anaconda with Python3, with a Leo git repo 
located in C:\Programs\Leo, on Windows 10. And I normally start Leo by 
running a .bat file I've placed on my PATH:

@ECHO OFF
START "" C:\Programs\Anaconda3\pythonw.exe C:\Programs\Leo\launchLeo.py --no
-dock

I've added `C:\Programs\Leo` to a newly created env var "PYTHONPATH" (it 
didn't exist yet). Seems like picking up the Python install could be my 
problem?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/16220082-b816-46ba-9172-734b79bf09e7%40googlegroups.com.


Re: Jeff R: What emacs features do you want?

2019-06-25 Thread Arjan

>
> Whilst there is a benefit to the "focus" of seeing only one node at a 
> time, in the cases where I use Org-mode I explicitly want/need to see 
> multiple nodes at a time.


This is something I would really like to be able to use in Leo. Both for 
writing text as well as code, being able to see the preceding and following 
node contents would be very beneficial. In my opinion there are a few 
important drawbacks to the current situation:

1. There's a need to hold a lot of the context in your head (e.g. how did I 
start the previous paragraph? What function name did I use in the parent 
node? Etc.). This takes up space in working memory.
2. When it's urgent enough that you need to look up this context, it takes 
several key strokes, plus you lose focus on the position where you were 
working. If you can just scroll up or down to see this context, without 
having to navigate and maybe fold nodes, then scroll back, you do not lose 
the visuo-spatial sense of where you were, even if you'd scroll the 
selected node out of view. I.e. you remember how much scrolling you'd have 
to do to get back. At least that's how it works for me.
3. Because of 1 and 2, I tend to avoid creation of more fine-grained nodes 
to structure my work, even though it would otherwise be beneficial.

I found a few places where this idea was discussed before:

Feb 2017 https://groups.google.com/d/msg/leo-editor/qkcmQGL7fdw/l3DvLAoVCgAJ
Sep 
2017 https://groups.google.com/d/msg/leo-editor/7OANSWcoOzg/b_tXlLTzAgAJ 
"multi-pane editing"

Cheers,
Arjan

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a6b8ec16-1cb7-425d-95bc-df18c0d21beb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Good news: the end of a nonsensical dream

2019-05-04 Thread Arjan
I'd also be very interested in this.

Also related, this earlier thread on Using Leo as a database 
 - 
I'd love to hear followup on that.

I'd prefer having the result set of a query (multiple rows) inside a single 
node body, but I think improved handling of CSV-like data would be needed 
to make this more useful.

-- 
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: Use LaTeX comment marker % for Leo sentinels in .tex files?

2019-03-31 Thread Arjan
Huh, no you're right -- I'd just only seen # as sentinel marker and didn't 
know comment markers are already language-dependent. Even better!

-- 
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: Use LaTeX comment marker % for Leo sentinels in .tex files?

2019-03-31 Thread Arjan
Perfect! Does exactly what I want. Frequent Git commits should help in case 
I get in trouble, but using

@language latex
@comment %
@others

in an `@file myfile.tex` just works.

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.


Use LaTeX comment marker % for Leo sentinels in .tex files?

2019-03-31 Thread Arjan
Would it be feasible to make Leo use the LaTeX comment marker % instead of 
# for Leo sentinels in .tex files? This would allow to use @file nodes 
instead of @clean.

(A quick search makes me think that adding/redefining the LaTeX comment 
symbol would not be easy).

-- 
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: Challenges with clones and multiple files

2019-03-29 Thread Arjan
Thanks for these extensive notes. I believe they don't fully translate to 
my use case, but I'll need to study and try it out further to see if I can 
apply some of this.

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


Challenges with clones and multiple files

2019-03-27 Thread Arjan
I've been using Leo for quite a while now, and there's several things I 
like about it. But I've come to realize the main reason I initially wanted 
to use Leo, clones, is not really working for my use case. I mainly use Leo 
as a Personal Information Manager. My notes are organized in various 
sections -- but often I have items that belong to multiple sections, so I'd 
place them in both using clones. For example: a section with notes on 
Desktop software I use might have a subsection with Linux examples, but 
many of those are also relevant for under Webdevelopment - LAMP stack, so 
I'd put them there as well.

Now with over a dozen top-level sections and many more subsections and 
subsubsections for each, switching between different sections becomes 
unwieldy. The nav or search functionality works fine when you initially 
need to find the (sub)section you want to work in, but when you're 
switching between different sections/contexts a lot, the overhead is way 
too large (number of operations/keystrokes as well as mentally). Switching 
between open tabs works much better in this regard.

So perhaps I should just make each top-level section a separate Leo file 
and switch between those? But as far as I can tell, there is no good way to 
share nodes between files (and keep them in sync, including their subtrees 
if applicable).

Anyone organizing data like this, or have suggestions?

-- 
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 to launch Leo via pythonw.exe with an Anaconda environment but without an extra console window?

2018-11-06 Thread Arjan
That's basically what I use in my .bat which I launch from CLI with 
Anaconda env active. But it doesn't work as a shortcut because it's lacking 
the right environment.

On Tuesday, November 6, 2018 at 5:26:58 AM UTC+1, huliuhe wrote:
>
> write a bat file , the content is :
>
> start C:\Programs\Anaconda3\pythonw.exe 
> "C:\Programs\Leo-editor\launchLeo.py"
>
> 在 2018年11月4日星期日 UTC+8下午7:24:05,Arjan写道:
>

-- 
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 to launch Leo via pythonw.exe with an Anaconda environment but without an extra console window?

2018-11-05 Thread Arjan
Thanks all for the ideas.

Looks like cmdow comes closest, but I was trying to avoid using extra 
programs.
Scheduler or auto-run don't fit how what I'd like, I just want a shortcut 
to launch Leo :)
The pip-packaged version might be an option, but I'm running Leo from Git 
and also prefer to have Anaconda for installing packages.

I think I'll just have to get used to launching Leo from CLI for now, I 
created a leo.bat on my PATH for that so at least I only have to type `leo`.

-- 
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 to launch Leo via pythonw.exe with an Anaconda environment but without an extra console window?

2018-11-04 Thread Arjan
Hello all,

I asked this question in the Anaconda forums but didn't get any response 
there. I'm hoping some of you have an answer to this question.

With a previous installation, with Anaconda's Python on my PATH in Windows, 
I used to just create a shortcut for Leo with a target like this:

C:\Programs\Anaconda3\pythonw.exe "C:\Programs\Leo-editor\launchLeo.py"

On a new install I now went with the default and recommended option to not 
put Anaconda on the PATH. I tried making a .bat file which runs both 
Anaconda3\Scripts\activate.bat and pythonw.exe, but activate.bat leaves 
behind a console window I don't want. There's tons of questions and 
potential solutions about similar issues on Windows in general, but they 
don't seem applicable for this particular case, or they involve 3rd party 
programs or vbs scripts to manage it.

Is there a good way to do what I want - to launch Leo from a shortcut 
(which requires an Anaconda environment) without getting an extra console 
window?

Cheers,
Arjan

-- 
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 to enable a theme?

2018-06-01 Thread Arjan
Aha, so my problem was just the missing `=`. 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.


How to enable a theme?

2018-06-01 Thread Arjan
I'm trying to enable a theme, but I seem to be missing something. The docs 
say:

To enable a theme, put the following setting in myLeoSettings.leo:
> @string theme-name 


I tried putting `@string theme-name LeoBlackSolarized.leo` (also without 
.leo) in myLeoSettings, but no changes take effect when restarting.

-- 
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 to PDF workflow using Leo

2018-03-12 Thread Arjan
Thanks, 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.


Autocomplete

2018-03-10 Thread Arjan
I happened upon Python auto-completion somewhere in the docs (nice 
feature!). Upon first trying it, I got an exception:

autocompleter On
Traceback (most recent call last):

  File "/home/username/bin/leo-editor/leo/external/codewise.py", line 563, 
in cursor
return self.dbconn.cursor()

sqlite3.ProgrammingError: Cannot operate on a closed database.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/home/username/bin/leo-editor/leo/core/leoGlobals.py", line 2471, 
in new_cmd_wrapper
func(self, event=event)

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 218, in 
autoComplete
self.start(event)

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 955, in 
start
self.init_qcompleter(event)

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 813, in 
init_qcompleter
options = self.get_completions(prefix)

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 586, in 
get_completions
aList = self.get_codewise_completions('self.')

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 630, in 
get_codewise_completions
hits = self.lookup_functions(func)

  File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 695, in 
lookup_functions
aList = codewise.cmd_functions([prefix])

  File "/home/username/bin/leo-editor/leo/external/codewise.py", line 173, 
in cmd_functions
funcs = cw.get_functions(args[0])

  File "/home/username/bin/leo-editor/leo/external/codewise.py", line 596, 
in get_functions
c = self.cursor()

  File "/home/username/bin/leo-editor/leo/external/codewise.py", line 565, 
in cursor
g.es("No cursor for codewise DB, closed database?")

AttributeError: module 'leo.external.codewise' has no attribute 'es'


The completions did work, and strangely, upon restarting Leo and enabling 
autocomplete again I no longer see this error. But I thought I'd mention it 
in case it does indicate a problem somewhere.

Another minor issue: the autocomplete dialog appears two lines below the 
point where it's invoked. I'm using Leo 5.8 devel, build 20180227113208 Git 
repo info: branch = master, commit = 2c288fb7c15b Python 3.6.3, PyQt 
version 5.6.2, with the default theme.

Cheers,

Arjan

-- 
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 to PDF workflow using Leo

2018-03-08 Thread Arjan
Reviving this old topic. I made a crude attempt, hard-coded etc., to just 
rewrite the section definitions via regex search and replace. Works just on 
a single .tex file (I don't see a benefit to using multiple input files 
when managing things via Leo anyway), but it's still useful in my case.

How would I add Undo to this? Any other obvious improvements to make?

Cheers


@language python

"""
Changes LaTeX section definition levels in the subtree of an @clean file 
node to their subtree level.
Only one LaTeX section level can therefore be used within a single node 
body.
"""

import re

section_levels = {
1: 'chapter',
2: 'section',
3: 'subsection',
4: 'subsubsection',
5: 'paragraph',
6: 'subparagraph'
}

def latex_convert_section_levels(body, adjusted_level_name):
""" Replaces LaTeX section definition levels found on a single line (re 
multiline mode).
Returns the modified node body."""
newbody = 
re.sub(r'\\(chapter|section|subsection|subsubsection|paragraph|subparagraph)(\[.*?\])?({.*})',
r'\\'+adjusted_level_name+r'\g<2>\g<3>', body, re.M)
return(newbody)

if re.match(r'@clean [A-Za-z\./]+\.tex', p.h):
root_level = p.level()
for node in p.subtree():
level = node.level() - root_level
if level < 7:
level_name = section_levels[level]
else:
level_name = 'subparagraph'
node.b = latex_convert_section_levels(node.b, level_name)
g.es('Updated section levels based on outline structure.')
else:
g.es('not a LaTeX file node?')



-- 
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: Making LeoVue a desktop app

2018-02-07 Thread Arjan
The details of this thread are well above my expertise, but I read 
something that looks relevant and interesting in a HN thread 
 on PyQt:

I have been developing in HTML/Python for a while now. This works 
> wonderfully. You just need to put all your business logic in Python, use 
> PyQt to run all the platform specific code like file dialogs, printing, 
> etc. but keep the main interface with React. You do that by having a 
> webview with a service object being the bridge between Python and the JS 
> view[0]. If you are a bit careful with the amount of information going 
> through the bridge, you get very good performance (source 
> )


Apologies if this is not relevant.

-- 
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: NEW: CSV editor

2018-02-07 Thread Arjan
This is great!

What would be an awesome way to use this would be if the CSV editor widget 
could be automatically activated in the edit pane for nodes with a table, 
so one can quickly switch between text and table/csv nodes. Maybe just for 
"@csv" nodes or so. Would something like that be possible?

-- 
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: Merging leo_edit_pane into master?

2017-11-02 Thread Arjan
I understand I need QScintilla to try this, but it seems there different 
versions and installation methods. What's the best way to install the 
required dependencies? (I use Anaconda).

Thanks, Arjan


-- 
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: Window pane layouts lost after Leo update?

2017-10-11 Thread Arjan
Ah, good to know about the embed layout option. It was only one simple 
layout, so no problem to recreate. I was mostly asking because if layouts 
generally do persist between updates, I may more frequently pull updates to 
Leo's master branch.

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.


Window pane layouts lost after Leo update?

2017-10-11 Thread Arjan
A window pane layout I'd created and saved under Leo 5.5 was lost after 
updating to 5.6. Is this expected? I'm running Leo from a git repo and 
Python 3 (Anaconda); happened on both Linux and Windows.

Arjan

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


Inserting extra newlines separating body text and Leo's xml tags?

2017-10-11 Thread Arjan
Hi all,

I would like to make Leo use a newline before the start and at the end of a 
node's body text, so the t node's xml tags and the body text are always on 
separate lines. This in order to make git diffs easier to read.

Any ideas how/where to do this, or would this need to be in Leo itself? I 
guess a git filter would be an option, but I'd prefer to have Leo handle it 
somehow.

So instead of this:

Body text.

I'd like this:


Body text.


-- 
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: Following up: Leo 5.5 will challenge org mode

2017-09-09 Thread Arjan
I'd like to +1 that multi-pane editing mode could really be a killer 
feature.

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


Tabular data in Leo outlines

2017-08-29 Thread Arjan
I'd like to work with tabular data in my Leo outlines, such that the table 
structure is visualized inside a node body (aligned column widths) and a 
key binding should facilitate navigation/data entry (e.g. tab jumps to next 
column). In other words, it should work roughly like OrgMode tables.

I've started looking at this and it seems the basic transformations aren't 
too problematic. But, I'm not very experienced with Python (or other 
languages, for that matter), nor with Leo plugins. I've made a first very 
rough version which seems to work for the basics. So my questions are: Is 
the idea in general likely to work well in Leo? And, how terrible is the 
attached approach? ;)
I've made an @button with two functions (see below): text_to_table() turns 
lines with |-separators into a list of lists (rows containing cells), and 
align_table() aligns the columns in such a table using whitespace, and 
returns the whole thing as a string.

Some specifics I'm wondering about now:
1) Is it possible to re-assign e.g. the tab key to trigger the alignment, 
but only on nodes of a new type (say @tabular)?
2) Would same be possible for a newly defined "@language tabular", so it 
would work on just the tabular section of a node?
3) The current approach relies on number of characters for aligning, so a 
mono-spaced font is required. Is it possible to use a particular font for 
just a particular node type (or language)?
4) Or are there ways of aligning text other than via mono-spaced fonts?
5) Is it feasible to use two different vnode body formats, where the GUI 
format would use the whitespace and visual separator such as |, but the 
on-disk format would be transformed to CSV or tab-separated plain text 
(stripped of the extra alignment whitespace)?
6) Note-to-self: there are a couple of libraries which could facilitate the 
aligning/format transformations, such as 
http://astropy.readthedocs.io/en/latest/io/ascii/index.html, 
https://pypi.python.org/pypi/tabulate, 
https://github.com/foutaise/texttable/.

I'm curious to hear your thoughts!

Best, Arjan


@language python

def text_to_table(texttable):
""" Transforms lines with pipe separators to a table stored as a list 
of lists."""
table = []
for line in texttable.splitlines():
# Don't combine stripping of separators and whitespace, in case of 
empty columns
line = line.strip() # Strip leading and trailing whitespace
line = line.strip('|') # Strip leading and trailing separators
columns = line.split('|') # Split line into cells
row = [column.strip() for column in columns] # Strip cell whitespace
table.append(row)
return(table)

def align_table(table):
"""Returns a table, padded for alignment, as a string.
@param table: The table to print. A list of lists.
Each row must have the same number of columns.
After 
http://ginstrom.com/scribbles/2007/09/04/pretty-printing-a-table-in-python/"";

def get_max_width(table, index):
"""Get the maximum width of the given column index."""
return max([len(row[index]) for row in table])

col_paddings = []
for i in range(len(table[0])): # number of columns in the first row
col_paddings.append(get_max_width(table, i))

alignedtable = ''
for row in table:
alignedrow = '|'
for i in range(0, len(row)):
tablecell = row[i].ljust(col_paddings[i] + 1) + '|'
alignedrow = alignedrow + tablecell
alignedrow = alignedrow + '\n'
alignedtable = alignedtable + alignedrow
return(alignedtable)

texttable = p.b
b = c.undoer.beforeChangeNodeContents(p)
table = text_to_table(texttable)
p.b = align_table(table)
c.undoer.afterChangeNodeContents(p,'tabulate',b)



-- 
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: OT: (Kinda) "Learning How to Learn" from Coursera

2017-08-24 Thread Arjan
Oh, also take a look at the superb videos at 3Blue1Brown 
<https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw/featured> then! 
There's playlists like *Essence of linear algebra*, *Essence of calculus*, 
and excellent items like Who cares about topology? 
<https://www.youtube.com/watch?v=AmgkSdhK4K8>, all of them with great 
visualizations...

Cheers!

Arjan

-- 
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 to PDF workflow using Leo

2017-04-11 Thread Arjan
Thanks, interesting to see what people are using for LaTeX. I'll describe 
my process, I'd be happy to hear about improvements. This is all just 
hardcoded and hacked together, as I currently work on just one LaTeX 
project.
I believe there are older threads which discuss more elaborate processing 
schemes, but I wasn't sure how to use those.

I'm using Leo to organize sections like \chapter, \section and \subsection. 
Since I'm just writing latex in Leo, I need to keep track of the right 
hierarchies, so I can't freely move nodes around in the hierarchy or I end 
up with \subsection at the same level as \section, etc. It would be great 
to be able to let Leo handle this.

MyProject
  - @clean myproject/myproject.tex
  - @clean myproject/references.bib
  - Compile myproject.tex

The compile node has something like this:
@language python

import os
import subprocess
import sys

repository_dir = os.path.abspath(os.curdir)

# The system commands should be run from the folder containing the 
tex/cls/clo/bib files.
working_dir = os.path.join(repository_dir, 'myproject')
os.chdir(working_dir)

# The commands to run.
run_xelatex = 'xelatex ' + working_dir + os.sep + 'myproject.tex'
run_bibtex =  'bibtex ' + working_dir + os.sep + 'myproject'

g.es('Running XeLaTeX and BibTeX')
# os.system starts a new subshell
# @todo: is it possible to run the below commands in one subshell 
consecutively?
os.system(run_xelatex)
os.system(run_bibtex)
os.system(run_xelatex)

# Platform-independent file opening
def open_file(filename):
if sys.platform == "win32":
os.startfile(filename)
else:
opener ="xdg-open"
subprocess.call([opener, filename])

open_file('myproject.pdf')

Arjan

-- 
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: HTML 5 Leo Viewer

2017-03-07 Thread Arjan
Regarding Atom, it might be interesting to take a look at Visual Studio 
Code as well https://code.visualstudio.com. Very similar, also an Electron 
app, but much faster opening of large files, and more snappy in general 
(unless Atom improved a lot recently).

Arjan

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


tables.py documentation

2017-03-01 Thread Arjan
>From the 5.6 thread: > [...] tables.py is a start.

Aah, I thought tables.py was a planned plugin, and hadn't realized there's 
already something implemented.

Is the current version of tables.py a work-in-progress, or should the 
implemented features already work - and if so, how to use it? I get some 
errors after enabling and experimenting with | characters, but I may not be 
doing the right thing.

Arjan

-- 
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: A sprint (real or virtual) about Leo 5.6

2017-03-01 Thread Arjan
> In particular, emulating org-mode tables (including its spreadsheet 
features) seems like a lot of work.

I use Leo primarily as an information manager (as well as for writing 
LaTeX), and I very frequently need to capture some tabular information. For 
me this would be a central feature for Leo as PIM. (It's actually what kept 
me from switching from Emacs/OrgMode to Leo for several months. Now I use 
Leo anyway, but keep larger sections of tabular data in LibreOffice Calc or 
SQLite, or use some plain text separator in a node body. Both of these 
workarounds are suboptimal.)

So I'm hoping it's important to others as well, and will turn out to be 
doable!

In any case, it's very nice to see all the recent activity.

Arjan


On Tuesday, February 28, 2017 at 4:55:53 PM UTC+1, Offray Vladimir Luna 
Cárdenas wrote:
>
>
>
> On 28/02/17 10:39, Edward K. Ream wrote:
>
>
>
> On Tue, Feb 28, 2017 at 9:35 AM, Offray Vladimir Luna Cárdenas <
> off...@riseup.net > wrote:
>
>> Just for curiosity, I wonder if the Babel approach taken by org-mode is 
>> client sever [1]. I have the "feeling" is not, but I have not still read 
>> the papers.
>>
>> [1] https://www.jstatsoft.org/article/view/v046i03
>>
> ​I would consult Babels​ docs <http://orgmode.org/worg/org-contrib/babel/>, 
> not some academic paper ;-)
>
>
> Thanks. I will read both ;-).
>
> Offray
>
>

-- 
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 vs org mode

2017-02-17 Thread Arjan

>
> A good table editor would be nice, it should read/write from 
> markdown/rst/latex/html.  I suspect there's been at least one iteration of 
> such a thing, in the distant past. If I had an urgent need to edit tables 
> in Leo, I'd probably edit them in the richtext plugin (CKEditor) and script 
> the results to whatever format I wanted.
>

As an aside, perhaps https://prosemirror.net/ would be an interesting 
alternative for CKEditor: it is lightweight, and supports markdown as 
document format (other formats like RST could be supported by writing a 
plugin). And it also has a table editor, though I don't know how ready it 
is.

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

2017-02-17 Thread Arjan

>
> ​Suppose Leo supported a V2 outline pane that shows
> ​ ​
> zero or more body panes, embedded (somehow!) in the Qt outline.
>

That sounds  very interesting. In that case, would the regular body pane be 
hidden for this mode of operation?

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

2017-02-16 Thread Arjan
This sounds great! I would add two further desiderata based on orgmode's 
capabilities (though I don't know if they are feasible).

1. Support for tabular data inside the body pane. In orgmode capturing some 
tabular data is as easy as writing "| column a | column b |" etc.; you can 
navigate columns with tab, columns adapt their width to the content, and it 
is structure-aware, e.g. you can export tables to CSV/Excel. Perhaps 
something like "@language csv" (or tab-separated @language tsv) could be 
Leo's answer?

2. In OrgMode, outline structure and content are in the same pane. You can 
expand all hierarchies and directly see and work on all the text in context 
(i.e. see the contents of preceding and following headings). I've started 
using Leo for writing and as information-manager, but this is really the 
biggest thing holding me back to use it for everything. Leo's strength 
derives from the outline capabilities, so you have to put small units of 
information in nodes to benefit from that, and that means you can only see 
one small piece of information at a time **while working on the text / 
information**.
So, what would be great is to be able to mark e.g. a chapter or section 
node with an option "include all child nodes in the chapter's body pane in 
outline order", with the ability to edit the child nodes' contents 
directly. Probably far-fetched, but I can dream, right? ;)

All best,

Arjan

-- 
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: Using dead keys with QT5?

2017-01-30 Thread Arjan
Hm, after some further tries it seems doing to opposite works, 
`QT_IM_MODULE=compose launchLeo.py` (instead of my default on ubuntu 14.04, 
where $QT_IM_MODULE=ibus).

Strange but good enough for me.

All best,

Arjan

On Sunday, January 29, 2017 at 1:27:39 PM UTC+1, Edward K. Ream wrote:
>
> ​​On Sat, Jan 28, 2017 at 5:29 PM, Arjan  wrote:
> 
> > I found this QT bug report for the problem: 
> https://bugreports.qt.io/browse/QTBUG-56452.
> ...
> > Any ideas what else to try?
>
> Define Leo abbreviations:
> 
> e/;;=​é
> e\;;=è
>
> HTH.
>
> 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.


Using dead keys with QT5?

2017-01-28 Thread Arjan
 

I'm not sure if my problem is due to my system settings or something to do 
with Leo, but here goes:


On Linux (Ubuntu 14.04), when I start Leo with Python 3.5, QT 5.6.2, PyQT 
5.6.0, dead keys don't work. For example, typing " followed by a space 
should give me a double quote, and ' followed by e should give é, etc.


When I start Leo from another Anaconda environment with Python 3.5, QT 
4.8.7 and PyQT 4.11.4, dead keys do work.


On Windows 7, using Anaconda with QT 5.6, dead keys do work as expected. So 
the problem seems specific to Linux with qt5.


I found this QT bug report for the 
problem: https://bugreports.qt.io/browse/QTBUG-56452. It says using the 
IBus input method is a workaround. But I am already using IBus input 
method, as far as I can tell. That is, under Language Support, it says Keyboard 
input method system: IBus. The language icon in my system tray is the IBus 
icon (like at the bottom of this page for 
example: http://pinyinjoe.com/linux/ubuntu-12-chinese-setup.htm).


I also tried creating a user input method configuration via the `im-config` 
tool, configured to default to IBus. Same results.


Has anyone encountered this? Any ideas what else to try?


Cheers!


Arjan


-- 
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: Using Leo to process Latex to Pdf

2017-01-20 Thread Arjan
Oh found it, it looks like Github search doesn't look in .txt files. I 
searched GitHub and looked manually in the scripts.leo file, but the string 
"makePDF" is only found in leoScripts.txt.


On Friday, January 20, 2017 at 6:53:28 PM UTC+1, Edward K. Ream wrote:
>
> On Fri, Jan 20, 2017 at 11:10 AM, Arjan <arjan...@gmail.com > 
> wrote:
>
>> I'm looking to compile raw latex to pdf from Leo. I wanted to take a look 
>> at the mentioned MakePDF script, but I can't find it in the current version 
>> of Leo.
>>
>
> ​It's in scripts.leo.  Just search for makePDF.
>
> I don't have the slightest memory of this script.  It might have written 
> 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: Fast syntax coloring is now on the trunk

2017-01-20 Thread Arjan
Thanks, this was very timely for me! I just imported a large Latex file 
with Leo v5.4, which gave me the "Large text" Qt problem and not working 
syntax coloring, so I switched to running Leo from Git master branch. Text 
size is no longer a problem, and coloring is now working fine!

Arjan

-- 
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: Using Leo to process Latex to Pdf

2017-01-20 Thread Arjan
I'm looking to compile raw latex to pdf from Leo. I wanted to take a look 
at the mentioned MakePDF script, but I can't find it in the current version 
of Leo. Has it been removed, or superceded by something else? Any 
recommendations?

I just have an "@clean myfile.tex" node (with @all), so I think I only need 
to run `xelatex myfile.tex`, `bibtex myfile`, then `xelatex myfile.tex` 
again (this is what I do from command line).

Arjan

On Friday, October 28, 2011 at 1:41:04 PM UTC+2, Edward K. Ream wrote:
>
> On Sun, Oct 16, 2011 at 3:28 PM, mdb <mdbo...@gmail.com > 
> wrote:
> > Finally got a chance to try Ed's version of MakePDF
>
> Thanks for these comments.
>
> > out-dir was not pre-created.
>
> I would suggest honoring the following setting::
>
> @bool create_nonexistent_directories = False
>
> You can do so by calling::
>
> g.makeAllNonExistentDirectories
>
> The arguments are (theDir,c=None,force=False,verbose=True)
>
> g.makeAllNonExistentDirectories will return None if the
> create_nonexistent_directories settings is False, or if there was any
> other problem creating the directories.
>
> > MakePDF was not in the main branch version of scripts.leo
> > (revision 4597).
>
> @@button MakePDF is in scripts.leo, the node::
>
>@thin leoScripts.txt-->Important-->@@button MakePDF
>
> > it seems p.isAnyAtFileNode()  does not recognize nodes starting with 
> @rst.  I guess that makes sense, so I will work on creating a step that 
> translate a @rst node with ReStruct markup  to a @file x.tex node
>
> Possible, or just test p.h.startswith('@rst') in addition to the test
> p.isAnyAtFileNode()
>
> Feel free to commit any of your changes to the trunk in scripts.leo.
>
> 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: What is the `a="E"` attribute in my .leo file for?

2016-12-05 Thread Arjan
Ah, that makes sense, some experimenting seems to confirm this. That means 
the pattern I thought I saw was just accidental.

Storing the content in separate files seems like a good idea, I guess, but 
will require more careful organization - I'm experimenting a lot with 
cloning and working in different trees, etc. If I understand correctly this 
will require storing the content, say markdown, in external files via @file 
trees with sentinels first, and only then clone nodes from such @file trees 
to other trees in the outline?

Thanks for chiming in!

On Tuesday, December 6, 2016 at 1:01:24 AM UTC+1, Terry Brown wrote:
>
> On Mon, 5 Dec 2016 14:29:42 -0800 (PST) 
> Arjan <arjan...@gmail.com > wrote: 
>
> > Hi, I'm still new to leo and slowly learning to work with it. I have 
> > a notes.leo file which I'm working on from two different computers 
> > (one Windows, one Linux, but with the same Python and Leo versions). 
> > 
> > When I save the file in Leo on Ubuntu, the V nodes get an `a="E"` 
> > attribute, but not on Windows. This is cluttering my git history. Any 
>
> I think, subject to Edward confirming, it marks the node as expanded. 
> If you can remember to collapse all (Alt-minus) before saving and 
> committing it should be less of an issues git history wise. 
>
> I typically don't look at changes to .leo files in git, i.e. I ignore 
> them - I think it's good practice to put "content" in 
> external .py / .md / whatever files and just use the .leo file for 
> organization. 
>
> Cheers -Terry 
>
> > clue where this extra attribute is coming from? Do I maybe have 
> > different Leo settings? I couldn't find anything because it's hard to 
> > search for information on a one-letter attribute. 
> > 
> > Example from git diff: 
> > 
> > -Sources 
> > +Sources 
> > 
> > Hoping someone can enlighten me! 
> > 
> > Best wishes, Arjan 
> > 
>

-- 
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 as Personal Information Manager: multiple nodes in the body pane?

2016-11-05 Thread Arjan
P.S. Oh, looks like there's some strange interference from QGIS on my 
system's default Python environment. When I use Anaconda's Python 2.7 
environment (Python 2.7.12, PyQt version 4.8.7) I get no errors on startup.


On Saturday, November 5, 2016 at 6:36:02 PM UTC+1, Arjan wrote:
>
> Thanks for getting back to me, and it's good to know the proper 
> terminology. Yeah, the description of the notebook plugin sounds like what 
> I want. Here's what happens for me.
>
> I uncommented the notebook.py line in the @enabled-plugins headline 
> of myLeoSettings.leo. Restarting Leo (v 5.4.1) gives me these errors:
>
>
> hook failed: after-create-leo-frame, , 
> leo.plugins.notebook
> Traceback (most recent call last):
>
>   File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in 
> callTagHandler
>     result = handler(tag, keywords)
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 39, in 
> onCreate
> controllers [h] = NbController(c)
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 97, in 
> __init__
> self.mw = ModelWrapper(["h", "b", "gnx", "level", "style"])
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 52, in 
> __init__
> mo.setRoleNames(rn)
> AttributeError: 'QStandardItemModel' object has no attribute 'setRoleNames'
>
> This is with Python 3.5.2 (Anaconda). A Plugin menu appears under plugins, 
> but it doesn't do anything.
>
>
> If I start Leo with Python 2.7.6 (and PyQt version 4.8.6), I get several 
> errors from other plugins, though the notebook plugin does seem to do work:
>
>
> hook failed: after-create-leo-frame, , 
> leo.plugins.todo
> Traceback (most recent call last):
>
>   File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in 
> callTagHandler
> result = handler(tag, keywords)
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 100, in 
> onCreate
> todoController(c)
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 407, in 
> __init__
> self.ui = todoQtUI(self)
>
>   File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 131, in 
> __init__
> form_class, base_class = uic.loadUiType(uiPath)
>
>   File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 210, in 
> loadUiType
>
> winfo = compiler.UICompiler().compileUi(uifile, code_string, 
> from_imports, resource_suffix)
>
>   File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", 
> line 55, in __init__
> CompilerCreatorPolicy())
>
>   File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 145, in 
> __init__
> self.factory = QObjectCreator(creatorPolicy)
>
>   File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 94, 
> in __init__
> modinfo = plugin_locals["moduleInformation"]()
>   File "", line 52, in moduleInformation
>
>   File "/usr/lib/python2.7/dist-packages/qgis/__init__.py", line 26, in 
> 
> from qgis.PyQt import QtCore
>
>   File "/usr/lib/python2.7/dist-packages/qgis/PyQt/QtCore.py", line 28, in 
> 
> sip.setapi(api, 2)
> ValueError: API 'QDate' has already been set to version 1
>
> There are two commands, nb-all and nb-subree, which open a new Leo window 
> with the (sub)tree of nodes. The idea is more or less what I'd want, but 
> it's not usable enough as-is for me:
>
> - I'd like not a separate window, but a pane which I can use in Leo's main 
> window in a layout (e.g. instead of the body pane), so I could also use the 
> outline pane to navigate.
> - You can pan and page-up/down in this window, but there's no scrollbar
> - The headlines are not editable
> - The text boxes in notebook's window are quite small, and sized 
> differently depending on how much text is in the body. They're also styled 
> differently from the regular body panes (smaller font, no highlighting).
>
> So it's close, but it looks like notebook.py needs some updating for 
> Python 3, and I'd also need several UI changes to be able to work with it 
> comfortably.
>
> A view-only version might be useful for e.g. proofreading, but not so much 
> for the daily use I'm thinking of.
>
> Any further thoughts? Would such a UI be something other people would want 
> to see in Leo?
>
> Thanks, Arjan
>
>
> On Friday, November 4, 2016 at 7:43:01 PM UTC+1, Terry Brown wrote:
>>
>> I think this makes sense, and has been addressed 

Re: Leo as Personal Information Manager: multiple nodes in the body pane?

2016-11-05 Thread Arjan
Thanks for getting back to me, and it's good to know the proper 
terminology. Yeah, the description of the notebook plugin sounds like what 
I want. Here's what happens for me.

I uncommented the notebook.py line in the @enabled-plugins headline 
of myLeoSettings.leo. Restarting Leo (v 5.4.1) gives me these errors:

hook failed: after-create-leo-frame, , 
leo.plugins.notebook
Traceback (most recent call last):
  File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in 
callTagHandler
result = handler(tag, keywords)
  File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 39, in 
onCreate
controllers [h] = NbController(c)
  File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 97, in 
__init__
self.mw = ModelWrapper(["h", "b", "gnx", "level", "style"])
  File "/home/arjan/Programs/leo-editor/leo/plugins/notebook.py", line 52, in 
__init__
mo.setRoleNames(rn)
AttributeError: 'QStandardItemModel' object has no attribute 'setRoleNames'

This is with Python 3.5.2 (Anaconda). A Plugin menu appears under plugins, 
but it doesn't do anything.


If I start Leo with Python 2.7.6 (and PyQt version 4.8.6), I get several 
errors from other plugins, though the notebook plugin does seem to do work:

hook failed: after-create-leo-frame, , 
leo.plugins.todo
Traceback (most recent call last):
  File "/home/arjan/Programs/leo-editor/leo/core/leoPlugins.py", line 326, in 
callTagHandler
result = handler(tag, keywords)
  File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 100, in 
onCreate
todoController(c)
  File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 407, in 
__init__
self.ui = todoQtUI(self)
  File "/home/arjan/Programs/leo-editor/leo/plugins/todo.py", line 131, in 
__init__
form_class, base_class = uic.loadUiType(uiPath)
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 210, in 
loadUiType
winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, 
resource_suffix)
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", line 
55, in __init__
CompilerCreatorPolicy())
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 145, in 
__init__
self.factory = QObjectCreator(creatorPolicy)
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 94, in 
__init__
modinfo = plugin_locals["moduleInformation"]()
  File "", line 52, in moduleInformation
  File "/usr/lib/python2.7/dist-packages/qgis/__init__.py", line 26, in 
from qgis.PyQt import QtCore
  File "/usr/lib/python2.7/dist-packages/qgis/PyQt/QtCore.py", line 28, in 

sip.setapi(api, 2)
ValueError: API 'QDate' has already been set to version 1

There are two commands, nb-all and nb-subree, which open a new Leo window 
with the (sub)tree of nodes. The idea is more or less what I'd want, but 
it's not usable enough as-is for me:

- I'd like not a separate window, but a pane which I can use in Leo's main 
window in a layout (e.g. instead of the body pane), so I could also use the 
outline pane to navigate.
- You can pan and page-up/down in this window, but there's no scrollbar
- The headlines are not editable
- The text boxes in notebook's window are quite small, and sized 
differently depending on how much text is in the body. They're also styled 
differently from the regular body panes (smaller font, no highlighting).

So it's close, but it looks like notebook.py needs some updating for Python 
3, and I'd also need several UI changes to be able to work with it 
comfortably.

A view-only version might be useful for e.g. proofreading, but not so much 
for the daily use I'm thinking of.

Any further thoughts? Would such a UI be something other people would want 
to see in Leo?

Thanks, Arjan


On Friday, November 4, 2016 at 7:43:01 PM UTC+1, Terry Brown wrote:
>
> I think this makes sense, and has been addressed a couple of times.
>
> First a terminology issue: the body pane edits the body of a node, what 
> you're looking for is a pane which lets you edit the bodies (and maybe 
> headlines) of multiple nodes at once, which would a pane with a different 
> name, distinct from the body pane.  I'm sure you don't care what it's 
> called :-)
>
> The closest to exactly what you want would be the notebook.py plugin, 
> here's its doc string:
>
> QML Notebook
> Edit several nodes at once, in a pannable "notebook" view.
> Use nb- to see the list of commands.
>
> But I don't know if it's still working.
>
> For a view only version of what you want, some iterations of the 
> viewrendered[23]? plugin have supported recursive rendering, which would 
> basically display a bunch of separate node

Leo as Personal Information Manager: multiple nodes in the body pane?

2016-11-04 Thread Arjan
Hi! I'm getting started with Leo as a personal information manager, and I 
like it a lot. The option to have clones of notes which stay in sync is 
very powerful.

I do have a usability problem with it: I very often have small sections, 
e.g. a paragraph, that I want to be able to reuse somewhere else. This 
means I have to create many small nodes, meaning I loose the overview of 
the whole section (say a chapter, or whatever larger container of 
information). Of course I have an overview of the structure (the chapter's 
child nodes) in the outline pane, but that doesn't give me an overview of 
the actual text in it. For something like a chapter I want to be able to 
see *and edit* all the text in it, and just scroll through all of it. For 
example, I might want to write something in one of the child nodes while 
looking at the contents of other adjacent nodes. Or copy-paste things 
between them, which now requires switching between the child nodes.

So I was wondering: would it be possible to have multiple nodes in the body 
pane? If so, there could perhaps be a setting per node saying whether all 
its child nodes should be rendered (and be editable) in the body pane.

Does that make any sense? Or are there other ways to someting like this? 
I'm curious to hear your thoughts!

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