Noticing accidental "empty parents"?

A minor issue that has occasionally tripped me up is the accidental creation of what I can only call “empty parents”.

In the following, it looks as if beta gamma delta are children of alpha (and the line before beta is a spacer)

Screenshot 2023-08-28 at 18.20.55

but in fact there are two possibilities, and deleting the blank row may also delete all those descendants.

i.e. we (probably) assume this:

Screenshot 2023-08-28 at 18.17.39

but it might, in fact, be:

Screenshot 2023-08-28 at 18.17.26

in which alpha actually has no children at all, and deleting the blank line would also delete the remaining lines.

Probably a very small issue which doesn’t come up much – I noticed it when a Copy As MD script sometimes didn’t show the nesting that I expected – and we can write scripts to flag (possibly fix ?) these accidental “empty parents”

Expand disclosure triangle to view JS source
(() => {
    "use strict";

        bike = Application("Bike"),
        doc =;

    return doc.exists()
        ? (() => {
                allRows = doc.rows,
                emptyParents = allRows.where({
                    name: "",
                    containsRows: true
                n = emptyParents.length;

            return (
                    x => = "<empty parent>"
                `${n} empty parents found and flagged.`
        : "No document open in Bike.";

but I wonder if there is another approach ? Making them visible even when the cursor isn’t on that empty line, perhaps ?

I think that’s a good idea. I’ll try to squeeze that into this release.

Wait… I think it already works that way! Or maybe we are talking about different things.

I see:

Screenshot 2023-08-28 at 3.23.03 PM

First case there is empty parent. Second case there is empty row, but it is sibling of beta.

Ah, yes – I think it only arises (becomes visually ambiguous) with the hide focus arrows setting.

Screenshot 2023-08-28 at 21.44.16

Perhaps a good reason for me to switch them on again and get used to them :slight_smile:

(and even with focus arrows and guidelines hidden, it’s only ambiguous while we are typing - the first mouse movement reveals the expansion triangles. (Not sure how I failed to spot that I – should probably increase the contrast in my default style, and use the mouse more …)

Thanks, and sorry to have detained you with that.

1 Like

I think reports like this, where I don’t need to make changes, actually give me extra energy. So thanks! :slight_smile: Now I’m trying to convince myself that going for a jog would be a good idea. Did I get THAT much energy, I’m not sure.

1 Like

I find the best way to increase the distances run and walked is just to delegate all those decisions to a dog – they can be quite eloquent and persuasive.

1 Like