Annoyances

83 views
Skip to first unread message

Karsten Wolf

unread,
Oct 23, 2022, 8:37:15 AM10/23/22
to leo-editor
Again all this applies to Leo 6.7.0 on macos 10.13.6

The annoyances just for today; trying to do some work.

indent inserts TABs
Even if there is no TAB character in the file, using TAB to indent a selection inserts TAB characters. This goes to the point that Leo refuses to save the file because of mixed TABs and SPACEs

indent need a selection
I have to select a single line to indent it? Usually I position the cursor at the beginning of a line and press tab.

find always switches "search Headline" back on
I need this in about 5% of my searches. Press command-F and it's back on.

find does not honor the "Suboutline only" flag
searches go beyond the selected node at start.

find does not always select the found string
Doing repeatedly find-next the found string is not always selected; sometimes selected, sometimes blinking cursor.



Thomas Passin

unread,
Oct 23, 2022, 9:54:25 AM10/23/22
to leo-editor
For comparison, on my Windows and Linux systems using the devel branch (6.7.1-devel) from a few days ago:

On Sunday, October 23, 2022 at 8:37:15 AM UTC-4 kars...@googlemail.com wrote:
Again all this applies to Leo 6.7.0 on macos 10.13.6

The annoyances just for today; trying to do some work.

indent inserts TABs
Even if there is no TAB character in the file, using TAB to indent a selection inserts TAB characters. This goes to the point that Leo refuses to save the file because of mixed TABs and SPACEs

Me: For plain nodes with no file type (not an @file, @clean, etc tree), <TAB> inserts spaces not TABs. 

indent need a selection
I have to select a single line to indent it? Usually I position the cursor at the beginning of a line and press tab.

Me: When the cursor is at the start of a line, <TAB> indents it whether or not the line has been selected.
 
find always switches "search Headline" back on
I need this in about 5% of my searches. Press command-F and it's back on.

Me: Same for my systems.  I suppose its a matter of taste, but I agree that if it's been unchecked, it should stay unchecked.
 
find does not honor the "Suboutline only" flag
searches go beyond the selected node at start.

Suboutline flag works as expected: searches stop at the end of the subtree.
 
find does not always select the found string
Doing repeatedly find-next the found string is not always selected; sometimes selected, sometimes blinking cursor.

Me: Not sure about this one.  I have only noticed that the found string was selected, but it's possible that sometimes it wasn't and I didn't notice.  I don't use the Find tab very often - I usually use the Nav tab instead - so I could be overlooking or not remembering some things.  Have you noticed whether  "File Only" searches stay confined to the entire external file (@file, @clean, etc)?

It's odd that these behaviors are different on your system.  If it's a Mac-specific thing, I won't be able to help track it down.

As a stopgap measure for mixed TABs and spaces, there is a command convert-all-tabs that converts all TABs to spaces.  You can use it from the Edit/Edit Text  menu, or as a Minibuffer command  I believe that the command operates on the selected node and its subtree.

Karsten Wolf

unread,
Oct 23, 2022, 11:04:40 AM10/23/22
to leo-editor
I forgot to mention: I'm editing Python files. The only other files  I use with Leo are settings, html and css.

I'l give it another try and delete the ~/.leo directory


Thomas Passin

unread,
Oct 23, 2022, 11:39:03 AM10/23/22
to leo-editor
Remember that when you delete your .leo directory, your myLeoSettings.leo and workbook.leo files will go away with it.

Thomas Passin

unread,
Oct 23, 2022, 11:40:47 AM10/23/22
to leo-editor
 I don't see your problems with @file or @clean python files either.

On Sunday, October 23, 2022 at 11:04:40 AM UTC-4 kars...@googlemail.com wrote:

Karsten Wolf

unread,
Oct 23, 2022, 2:27:00 PM10/23/22
to leo-editor
On Sunday, October 23, 2022 at 2:37:15 PM UTC+2 Karsten Wolf wrote:
Again all this applies to Leo 6.7.0 on macos 10.13.6

The annoyances just for today; trying to do some work.

indent inserts TABs
Even if there is no TAB character in the file, using TAB to indent a selection inserts TAB characters. This goes to the point that Leo refuses to save the file because of mixed TABs and SPACEs

Gone with killing the .leo directory

 

indent need a selection
I have to select a single line to indent it? Usually I position the cursor at the beginning of a line and press tab.

Gone with killing the .leo directory
 

find always switches "search Headline" back on
I need this in about 5% of my searches. Press command-F and it's back on.

find does not honor the "Suboutline only" flag
searches go beyond the selected node at start.

Gone with killing the .leo directory
 

find does not always select the found string
Doing repeatedly find-next the found string is not always selected; sometimes selected, sometimes blinking cursor.

Gone with killing the .leo directory

Now I need my mac keyboard shortcuts working.

 

Thomas Passin

unread,
Oct 23, 2022, 5:18:26 PM10/23/22
to leo-editor
Wow, that's a lot of strangeness cleared up by deleting the .leo directory!  Well done!

Thomas Passin

unread,
Oct 25, 2022, 9:47:05 AM10/25/22
to leo-editor
More than likely it was deleting the "db" directory inside ".leo" that did the job.  I recently had an infuriating period where I was working with LeoPyRef a lot.  Each time I saved the outline, after the save succeeded Leo would block for 5 to 10 seconds, or even more.  Nothing I thought of did any good.  Finally I deleted the "db" directory and now Leo no longer blocks after saving LeoPyRef.

I have no idea how Leo uses its sqlite database, but I notice that in the old version - I "deleted" it by renaming it to "dbx" so it's not truly gone - the file g_app_db/cache.sqlite has a size of 120 kb.  The same file in the new "db" directory is only 12 kb.  The other cache.sqlite file in both old and new "db" directories are only 12 kb in size.  This makes me wonder if Leo sometimes makes a query that takes a very long time to execute if the database has been used a lot.  Maybe there needs to be an index on some of the fields (if sqlite supports indexes; I've never used it and don't know any details about it).  An index can make a dramatic difference for queries that need to scan the entire database over and over.

Or maybe that database file needs to be defraged/compacted from time to time.  The Thunderbird email client has a command to compact its database, and running it can reduce the database size quite a lot.

Thomas Passin

unread,
Oct 25, 2022, 10:10:00 AM10/25/22
to leo-editor
I've just found a GUI sqlite browser that looks very decent:  DB Browser for SQLite.  It may not be very useful for Leo's sqlite data since it's all stored as blobs, but it's probably worth checking out if you use sqlite.

Karsten Wolf

unread,
Oct 25, 2022, 10:21:04 AM10/25/22
to leo-editor

I have it and haven't used it for a long time. With sqlite I'm mostly a terminal guy.

To clean up a sqlite3 database: open with sqlite3 and type "vacuum;[return]"

Edward K. Ream

unread,
Oct 25, 2022, 11:51:21 AM10/25/22
to leo-e...@googlegroups.com
On Tue, Oct 25, 2022 at 9:10 AM Thomas Passin <tbp1...@gmail.com> wrote:
I've just found a GUI sqlite browser that looks very decent:  DB Browser for SQLite

Try starting Leo with --trace=cache

Edward
Reply all
Reply to author
Forward
0 new messages