Re: how to manipulate Leo's windows

2020-02-22 Thread Thomas Passin
On Saturday, February 22, 2020 at 10:38:39 PM UTC-5, andyjim wrote:
>
> I haven't managed to find how.  I want my default to be outline tree on 
> the left, body on the right, no log window, no render window.  But I want 
> to know the ropes so I can modify that as desired.  I'm sure it's in the 
> docs somewhere but I haven't put my finger on it.  Thanks.
>

I wrestled with this, too, and no, it's not really in the docs.

Here's what I did.  I happen to want outline left, body right, and the tabs 
pane (the one with the log tab) on the left below the outline.  You should 
really not get rid of it, because you will want to use the search and Nav 
tabs at a minimum, and of you start to use the tags or backlinks plugins, 
they will create new tabs in that pane, too.

First, add a node with this headline to the @settings tree in 
MyLeoSettings.leo -

@string central-dock-widget = body

The next step is to drag the panes by their title bars where you want 
them.  But this is tricky and a little non-intuitive.  There are certain 
areas you can drag to.  When a pane is over one of them, the space 
underneath will turn a translucent blue color (I *think* it's blue - my 
color vision isn't always the best).  Then you release the mouse button.

One of these docking  areas is on the right.  The body pane should already 
be in it, if you put that *@setting* node in and restarted Leo.  There is 
another docking area on the left, and you drag the outline pane over 
there.  The tabs pane may end up tabbed in the same pane as the outline, or 
with the body pane.  Either way, drag it way down to the bottom under the 
outline pane on the left.  A new docking area should open up.  Drop the 
tabs pane there.  

This docking area sometimes is very small, and if so it's easy to miss.  
Look closely for a bluish line or tiny rectangle to show up - that will be 
the place. 

After the tabs pane is in place, you can drag its separator bar up or down 
to adjust its height.

You may find that the next time you open Leo, the height of the tabs pane 
has changed.  Who know why this happens?  I have noticed that after you 
have saved the file several times, the height of the tabs pane tends to 
settle down somewhat.  But I still often have to readjust it after a 
restart.

If you start Leo with the --global-docks option, then all the outlines will 
open with the same pane arrangement ( I *think*).

When I was working my way through this, I got the panes into some 
arrangement that was unusable and I couldn't recover from.  The remedy is 
to delete Leo's "*db*" directory (thanks to @ekr for this).  This will let 
you start again.  On Windows, directory this is usually at 

%userprofile%\.leo

Yes, you can type that directly into the address bar of Windows Explorer, 
or into a command window.  On Linux, it's usually at 

~/.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/58cc2c5d-512d-4f82-a532-aeec76db08f5%40googlegroups.com.


Re: Zettelkasten - Notes Jim but not as we know them.

2020-02-22 Thread Thomas Passin


On Saturday, February 22, 2020 at 9:26:11 PM UTC-5, andyjim wrote:
>
> ...  I also need to learn about Leo tags. And start learning some RsT and 
> write some zettels at least for testing.
>

One simple way to get tags is to simply include a line or lines like this 
in the zettel node:

:tag: tagname

Note that you *must* include the space after the second colon, at least for 
it to render nicely in Restructured Text.

Now you can search on *tagname *or *:tag: tagname *or even* : tagname.* 
Granted, you can't easily get a listing of all the tags - until we have a 
zettelkasten plugin that can create one - but you could maintain a zettel 
that only contains the tag names. It would be almost as good.

I've attached an example of the RsT rendering of a node with this format of 
metadata.  BTW, notice the *:links:* item?  I've started including them for 
my links, with the future in mind.  It should not be hard to parse out the 
links from those items when we have a plugin going.  Probably we will be 
able to to it just with a command, no plugin needed.  The command could be 
bound to a key, so, for example, *ALT+F6* would take you right to the 
linked node.  The node ids are not going to change, so no matter how we 
implement it, this metadata will be useful. 

I am unsure, though, whether to allow more than one link per line.  One 
link per line would be easier to write the code for, yet more than one 
would be easier to author and would reduce the visual clutter.  I'm open to 
suggestions here (and everywhere else!).

-- 
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/515bbefe-9044-4139-af90-a16f51347619%40googlegroups.com.


Re: Zettelkasten - Notes Jim but not as we know them.

2020-02-22 Thread Thomas Passin
On Saturday, February 22, 2020 at 10:11:51 PM UTC-5, Thomas Passin wrote:
>
>
> I will attach my zettelkasten outline in another post as a guide to 
> creating a structure that works on its own and also with the bookmarks 
> manager.
>

Attached is the Leo file for my little zettelkasten.  It includes @settings 
nodes for the commands and keyboard shortcuts for inserting the node id and 
timestamp.   

The structure uses *@path* nodes to create directories.  When you run the 
rst3 command on the tree, it will create a directory tree in the file 
system that matches the structure of the Leo outline.  The bookmark manager 
uses this directory structure to build its internal data structures linking 
different parts of the outline together.  This procedure also gives you the 
ability to export the files if you should ever want to move to some other 
system.

So the* @path* directives are only needed if you plan to make use of the 
bookmark manager (when I get it ready for use).  Otherwise, you would still 
want those nodes, but they wouldn't have to have the *@path* directives.  
Ultimately my plan is to use them with a Leo plugin to do the kind of 
linking I currently do in the bookmark manager.  So it would be wise to 
include the organizing nodes, and to give them meaningful titles. And even 
without the behind-the-scenes data structures, they will still be useful 
for searching in the *Nav* tab.

The @rst directives are only needed for using the *rst3* command. But I 
think that's worthwhile.

Oh, and here is a command to open Explorer (Windows only) at the directory 
of the path of the current outline.  It's very useful for getting to those 
directories you just made with *rst3*.

from subprocess import Popen
cmd = 'explorer.exe .'
Popen(cmd)

Put this into the body of an @button node, press the *script-button* 
button, and you will have a button to open the directory.

The script could be modified for linux, but details would depend on which 
linux flavor you are using.

-- 
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/a22240cd-aef1-4747-aac5-5b77dcbc1caf%40googlegroups.com.


zettelkasten.leo
Description: Binary data


how to manipulate Leo's windows

2020-02-22 Thread andyjim
I haven't managed to find how.  I want my default to be outline tree on the 
left, body on the right, no log window, no render window.  But I want to 
know the ropes so I can modify that as desired.  I'm sure it's in the docs 
somewhere but I haven't put my finger on it.  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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/cc21f665-26e2-41b9-8cb0-f7e6ddb4e645%40googlegroups.com.


Re: Zettelkasten - Notes Jim but not as we know them.

2020-02-22 Thread Thomas Passin

On Saturday, February 22, 2020 at 9:26:11 PM UTC-5, andyjim wrote:
>
> I  look forward to getting into this.  So on the Leo side I need to start 
> setting up a heading structure.  I also need to learn about Leo tags. And 
> start learning some RsT and write some zettels at least for testing.
>
> It's looking interesting.
>

I'm using my suggested format 4.  My idea for going forward is to get 
everything working with the bookmarks manager and learn as much s we can.  
Then we can start to migrate functionality from it into a Leo plugin, and 
add new functionality after we get more clarity about what seems to work 
well.  The format for the zettels will be forward compatible - that is, it 
should not need to be changed except possibly adding a little more metadata 
or changing the format of, say, links.

Right now I am not favoring the use of either the backlinks or tags 
plugins, because they don't store their information in the zettel files 
themselves.  Since my current approach is to create those files from the 
outline by using the rst3 command, I want all the linking data to be in the 
files themselves.

I have developed two commands that insert the node id and current timestamp 
into the zettel. I'm already using them in my little experimental 
zettelkasten. The results look like this:

:id: TomP.20200221221759.1
:timestamp: 02/22/2020 08:25:29

Since the creation time is included in the node id, we are free to use the 
timestamp to record the modification time if that's what we want.

I should be able to have a command to navigate to a node id soon.  The 
examples of links I gave in my earlier post work, but they won't keep 
working if the structure of the outline gets changed.  That's not 
desirable. Using the node id, the details of the outline structure won't 
matter.

I will attach my zettelkasten outline in another post as a guide to 
creating a structure that works on its own and also with the bookmarks 
manager.

-- 
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/7f4c64db-376d-4df0-ab10-f08f0b82fad3%40googlegroups.com.


Re: Zettelkasten - Notes Jim but not as we know them.

2020-02-22 Thread andyjim
I  look forward to getting into this.  So on the Leo side I need to start 
setting up a heading structure.  I also need to learn about Leo tags. And 
start learning some RsT and write some zettels at least for testing.

It's looking interesting.

-- 
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/73ff6174-391a-4050-8bf6-cdc8f0685d69%40googlegroups.com.


Re: event for changing the order of nodes

2020-02-22 Thread Xu Wang
As an alternative solution, I'm thinking to create two new user defined
commands, @key=Move_up_key and @key=Move_down_key for moving current node
UP and DOWN.

Would you please share me where I can find of Leo code for moving node UP
and DOWN for reference?

Thanks,
Austin

Xu Wang  于2020年2月23日周日 上午1:13写道:

> Dear Leo Developer,
>
> If I have a node with 5 subnodes, the child #1 is focused, I clicked
> SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event
> for the position swap?
>
> I checked here
> http://leoeditor.com/slides/writingPlugins.html#handling-events
> but was not able to find a related one.
>
> Best Regards,
> Austin
>

-- 
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/CAEpKVv9nNmhw8xApiFne90_K5wwx_uj_DBDMVTCjRkoLpKJT0g%40mail.gmail.com.


event for changing the order of nodes

2020-02-22 Thread Xu Wang
Dear Leo Developer,

If I have a node with 5 subnodes, the child #1 is focused, I clicked
SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event
for the position swap?

I checked here
http://leoeditor.com/slides/writingPlugins.html#handling-events
but was not able to find a related one.

Best Regards,
Austin

-- 
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/CAEpKVv8gqyi3gLpD_SOzpJprERdQN6Pc3Ry9QxbfVv%3DG%2BDByCA%40mail.gmail.com.