Request: "@empty" as search operator to find empty notes

No matter how they seem to accumulate unnoticed, they inevitably pile up over time: empty notes!

I mean those ones:

A simple @empty search operator would be very helpful to find them all at once

2 Likes

Other methods I’ve used before:

  • Since all of my notes are supposed to be tagged, the “Show Untagged” smart list (Cmd-Opt-2) will show empty notes (and the occasional note I missed tagging for some reason).
  • In the main list, my sorting is by reverse Title — all notes use YYYY-MM-DD-hhmm to start, so this gives me a reverse chronological listing. If I temporarily switch to normal “A to Z” sorting, all of the empty notes are at the top.

Hi there,

I made an Apple Shortcut some time ago to trash empty notes,
maybe this could be helpful?

Install shortcut: Delete Empty Bear Notes - Shortcut

2 Likes

I agree, and that would also make the shortcut above much, much simpler :nerd_face:

Maybe empty notes shouldn’t exist? Having no tag, title, and Bear App not supporting note history nothing is lost. I think navigating away from an empty note should just delete it.

4 Likes

This is great, thanks for sharing

1 Like

I don’t have that much time at the moment and it took me a while to thank you for the shortcut. But it doesn’t really want to work. Could it be because of the English texts in the commands and the fact that my OS is set to German?

An @empty search operator could address not only the complete empty notes but also those that are not empty in the strict sense but can be considered as such. I am thinking, for example, of notes that only contain tags without a single word. Or notes that contain nothing other than a title.

1 Like

Thanks for pointing that out, my shortcut totally forgot to delete empty notes with tags.

But already made a new version – mentally :wink: and will possibly take up the challenge: coding an updated version, on a day I get bored :nerd_face:

Yes, an @empty notes search operator would make this much easier … @trix180 :pray:

A question many people may disagree upon, would be if notes with title only should be considered “Empty” or not.

I mean, notes with title only may be created by Wiki Links from other notes, just waiting to be filed in with content text at a later time.

I agree with you. The latter I have not considered

1 Like

Updating the shortcut is maybe more work that it’s worth :thinking:

My manual workaround for now on Mac would be:

  1. Sort all Notes list by Title with A to Z
    This will sort all empty notes (including those with tags) on top, below Pinned notes.
  2. Select first empty note
  3. Scroll down to last empty note
  4. Select this last one with Shift pressed
  5. Command + Delete

PS.
Alternately the following search will find all empty notes without tags:

Bear Search Operators:
-a -b -c -d -e -f -g -h -i -j -k -l -m -n -o -p -q -r -s -t -u -v -w -x -y -z -æ -ø -å -1 -2 -3 -4 -5 -6 -7 -8 -9 -0

Unfortunately, this will not find empty notes with tags ;(

1 Like

I thought a little about this and it’s trickier than it seems because of the options we have for creating notes with dates and different headers along with the tags added to new notes when created with the tag selected in the sidebar. I guess it all comes down to what we define as an empty note

I’d say a note with some title is not empty while a note with only MD markers and tags it’s empty. But this means new notes created with the date option(s) will not considered empty.

3 Likes

Personally I would be happy if it was just the case that entirely empty notes disappeared (to the trash or the ether) when you closed them.

FWIW this annoys me in Things 3 too. If I create a task but don’t populate it, I’m left with an empty task I have to manually delete. Happens more often than you’d think!

2 Likes

@krssno
I updated my Apple shortcut –
It now deletes empty notes with tags:

Delete Empty Bear Notes - Shortcut

Hope that works better.

PS. It’s set to only search for notes of last 30 days (@last30days) as to shorten run time, so run it at least once a month. Or feel free to change anything that better suits your needs.

Thank you very much. That works fine. The old shortcut for some reason was not able to find any empty note. I just have to replace the English text with a German translation. My skills are certainly good enough for that :smiley:

@trix180
Notes with a tag are shown as empty notes in the second pane. I assume because of the new feature to hide tags in the preview? An @empty operator indeed would not require an alternative definition of an empty note

1 Like

That always annoyed me too, especially with having to “Are you sure?” confirm the deletion afterwards. A point of irritating friction in an otherwise spiffy app.

Yes.

I see what you mean here, we can apply the same rules we apply to the placeholder note to the @empty query because the tags are already removed.

If I’m not mistaken the new notes created with one of the date title options available in the preferences are not considered empty by anybody here. If this is the case I think I can proceed with testing the above.

2 Likes

As @roar also stated no note with a title should be considered as empty, whether with date as title or not.

Thank you very much for adding the new @empty search operator :pray:
(latest beta of 2024-11-18)

Works well and also tested with Shortcuts:

So, here is an updated: Delete Empty Bear Notes - Shortcut

So much simpler now:

4 Likes

Thanks very much for the new search operator! :hugs:

You could add @empty and also @untitled to the documentation of special searches in the faq. The latter one seemed to be forgotten while the newer @wikilinks and @backlinks were added

1 Like

Hey there! We think the Shortcut you created is fantastic! Would you mind if we shared it with more of our users on socials? Of course, we’ll credit you as the creator! :raised_hands:

1 Like