Homepage    |    GitHub    |    API    |    FAQ

Poll: Trash bin plugin

I've been thinking of writing a trash bin plugin, since this has been requested a few times.

However, I am not sure what to do for handling/specifying the trash notebook. I can think of 2 options:

  • create a Trash (Plugin) notebook the first time the plugin is used
  • allow people to select a notebook to be the Trash notebook by right-clicking on the folder and click on a context menu item Set as trash bin or Set as rubbish bin

0 voters

Both options would allow to change the name later and/or move it into any other notebook.

Please note that if somebody comes up with another option and I add that option to the poll, all votes that have been collected until that point will be lost. This mean that people will have to vote again.

This poll closes on 2021-09-10 04:00 UTC.

1 Like

I assume with the second choice that it will only allow one to be set? i.e if a user had one chosen as a bin and tried to set a second one then it would either prevent them or overwrite the original notebook's setting.
I'm in favour of the first one (especially if it allows editing of its name) simply because I can see people downloading the plugin, not reading and then wondering why it isn't working.

I was thinking of overwriting, thus specifying a new notebook as the trash notebook.

There would be a message, when one were to click on the trash can toolbar icon (or menu item or using the shortcut) and a notebook was not set.

Both sound perfectly fair enough to me.

I assume there is nothing in the API that would allow you intercept the delete command or to hide the delete option on the context menu? I'm again assuming the worst and thinking of people installing the plugin then going ahead and smashing the delete button expecting for things to be going to trash rather than the abyss.

No, there is not.

But I think Laurent might be open to add that at one point. For now I'd name the context menu and the shortcut Delete/Erase/Remove (Trash) or Move to trash. I don't really care what text we are using as long as the name differentiates itself from the delete action in core.


Thanks a lot for working on this, it's really a big missing feature of Joplin.

I can't see the use case for this option, I expect people to set one notebook as trash bin and be done with it.
Do some people change their trash folder on a regular basis? Otherwise this will just clutter the right-click menu.

As long as I can rename the created folder to something like 🗑 Trash (adding the emoji to have the notebook at the bottom of the list), I'm happy.

I'm not sure why anyone would need to rename it. By now isn't "trash" with a trashcan icon the universal name for this? Is it an issue of internationalization? If so, shouldn't that be handled some other way?

Also, I'd vote for this being a core feature. But that's not your pole :grin:!
What would happen to things in the trash folder when you disabled the plugin? Would it just become a regular folder again?

Thank you so much for working on this.

Recycle bin is still the name I think of first and lots of OSs have variants such as "rubbish bin" or just "bin" - I assume when set to EN_GB and probably others.
I still think making it is the best method and @tessus already confirmed that he would plan to make it freely re-nameable.

1 Like

Hmm. Right. But have you ever had software/OS that let you pick the name. I've never even had the thought to rename them before. I'm not arguing, I just feel like renaming the trash is the last thing I need in a trash plugin. :slight_smile:

For a notes app that currently organises the notebooks by name, I think it is fairly essential unless it is included in the core or Joplin allows custom ordering or a special status.

1 Like

You won't rename it in the plugin, but in Joplin. I'm just saying you can if you want to, because the plugin will be using the id not the name internally.

It will always be a regular folder. If you turn off the plugin there won't be a move to trash toolbar icon, shortcut, menu item.

1 Like

If you create a new Trash notebook when the plugin starts, doesn't it mean there would be multiple trash notebooks, one for each desktop client? You could detect the name I guess but it might have changed or the notebook might not have been synced yet.

In fact, we discussed several times the possibility of attaching custom data to notes (but could be notebooks too) and I think it would help in this case. Like you could attach a metadata is_trash=1 to the notebook and then you are sure it's the Trash notebook, even if it's been renamed. Likewise if there are multiple is_trash notebook, you can automatically find them and merge them.

I was thinking of creating a folder with a specific ID. Problem solved.

P.S.: Let's see how the vote turns out. e.g. in case item 2 wins, people could choose different trash notebooks depending on the client they are using. with item 1 there will be only one trash notebook.

I expect it will create weird sync conflicts because multiple folders with the same ID will be created independently on multiple apps.

Windows of all the operating systems lets you rename it freely.

If this is the case we might be stuck with option 2 anyway, unless we can come up with a working solution. e.g. if such a conflict is noted on this particular id, do some magic. I know what magic I could do as long as the plugin code get notified and can trigger an action when such a conflict occurs.

I've been using Windows since it came out and today was the first time I ever saw that. I stand corrected.


Also, I'd vote for this being a core feature

I second this, in my opinion this is a long missing feature in Joplin. I am aware there are valid reasons why this hasn't been implemented yet, but to me it should be implemented as a core feature, anything else would feel as a sort of a hack. Not that having such hack would be bad, it's just that it'd looked like a half-baked solution :slight_smile:

Anyway, thanks as always for Joplin <3


If the plugin can do the simple task of moving the note to a special notebook that's a good start.

If it was part of core, integration would indeed be better but there have been many failed attempts in the past, so a simple plugin solution might be the way for now.

1 Like

My feeling says that option 2 is the more logical implementation, but really I'm fine either way.

Thanks tessus for your efforts!