Ability to Lock Notes

It would be nice to have the option to lock notes so that they are not accidentally deleted or overwritten (with an error message saying something like, “This note is locked. Would you like to unlock this note in order to delete, edit, etc?”

A further feature to this would be to have locked notes not show the edit section (desktop app). Locked notes can be denoted with a special icon.

6 Likes

The best solution probably would have to have a recycle bin where the deleted notes will go, that way even if it’s accidentally deleted it can be recovered.

4 Likes

That’s also another option which would work well. I think that if you do a recycle bin, you should also consider:

  • Ability to easily browse/retrieve deleted messages
  • Configurable auto delete after x days (maybe set to 30 days by default)
  • Possibly a empty out the bin option with a stark warning message which may include the number of notes

In terms of being able to restore messages, there should be some thought given to the destination notebook of the note. Ideally, it should restore the same notebook it was deleted from, but what happens if you try to restore a note where the notebook was removed? Should there be an option to attached to a new notebook? Something like, “The original notebook that this belonged to, “Fitness Notes” doesn’t exist anymore. Please select a new notebook to restore to:”

Most likely what will be implemented is whatever is the easiest. It’s always tricky to have to track everywhere what’s deleted or not in an application, so maybe it will be a regular notebook where notes are moved when they are deleted. Then it’s up to the user to move them back to “undelete” as they wish. That notebook won’t be synced and indeed we could have something like permanent auto-delete after a few days.

1 Like

Yeah that could work. I’m just trying to add additional things to consider.

Maybe there could be an entry in the notes' metadata, saying which notebook it was from? The 'restore' could then move it back there (and remove the info from metadata).

Also not sure about the "regular notebook" bit - one would preferably want special handling, like having the notes for read-only access. (It would only lead to confusion - I'm editing a file in this notebook, then suddenly after 30 days my note is gone. :smiley: )

Also, why not have it synced? If I've effed something up on mobile, and realize it while on the desktop, I would really like the option to restore it from there.

And while I'd like a "delete everything older than 30 days" function, I would never want it to run automatically. (Sometimes I'm sorting my notes "when I have time", which may take a looong while, and I like to know they stay in the trash bin until I'm sure the process is done and I no longer need them.)

I thought about this before and it would be strange to have deleted notes being synced everywhere. Like you delete a notebook of 20 notes and then you see 20 items being synced on all your devices. Would users want this? I'm actually wondering? I think in Evernote if you delete, it stays on the device, or do they sync them too?

That will definitely be optional. There will be a deletion date so it will be possible to see which ones are the oldest and manually delete them as needed. We could indeed also store with this metadata the original notebook ID.

Yes that makes sense, the notebook notes should be read-only.

How about keeping the deleted notes in .bin folder like you’ve done for .resources folder? The notes will be there in host service (Dropbox etc.) for 30days for people to undo what they did.

The problem is that going to the sync target to undelete something would not be very intuitive. It would still be better than now (since the notes are permanently deleted), but hopefully we can find a more user friendly way.

How about Bin section with a list of notes in .bin folder?

[Del note 1](:/6g42edcc02f04f2583fac21a656gh537)
[Del note 2](:/...)

Right click restore. Notes will be listed but not automatically download unless specifically requested.

Of course, easier said than done.

Thanks for your hard work @laurent.

I did a fresh install of EN in a VM. Trash seems to be synced, just as expected.

Re all the rest: Great! :blush:

Personally I would like to lock notes for my own security. My brain is ‘busy’, and sometimes I walk away from my computer or phone when they’re open. I keep lots of normal info in Onenote, but also lots of stuff I keep secure in a locked Onenote file. It would be fantastic to know those particular banking details etc were all carefully locked away behind an extra password in Joplin! Anyway, I love what I’m seeing here — keep up the great work!

1 Like

This topic was passing by when I was searching for "sort". I would like to revive it, since it almost immediately changed to a discussion about recovering from unwanted operations. The subject (i.e. the first paragraph of the OP) is still on my wish list because I want to prevent such situations. Sometimes I don't even notice that I made a change. I never feel quite comfortable in apps where I'm exposed to that danger.

Edit:
Oh, sorry, mistake, I saw it here, as item 4.

Edit 2:
It's thinkable to combine this with the checkbox for tasks, so that a checked task can only be modified after being unchecked again. However, many people will object to that idea, I expect. Better an autonomous lock control.

I stumble on this thread because I was looking for a way to mark a note as read only, because I don't want to accidently modify it :slight_smile:

4 Likes

Just adding that as someone who copy/pastes tons of data out of and into notes - having the ability to lock a note down so that it cant be edited (though I can easily unlock it if needed) would be EXTREMELY helpful.

Accidentally modifying notes occurs and its really frustrating.

3 Likes

I do not know why we are discussing Trash in this post, but here we have the right questions.

I want to add Evernote experience:

Yes, Trash is synced between devices. It is even encluded in search results like "36 more in Trash," so you can press this link and see it.

In an attempt to change something in a note from Trash app asks you "Do you want to restore it to be able to change it?".

Something like this.

trash discussions should be moved to a new thread. This thread is/should be focused on locking a note.

locking a note so that it isnt deleted isn't the only use case - and as the other discussions along those lines have pointed out - it requires a solution that goes well beyond simple locking of notes.

I want to lock a note so that I cant change it, until I unlock it.

Also - users are assuming a locked note cant be deleted. That isn't necessary the case, but it could be. I do like the aspect of a locked note being non-deletable however.

1 Like

I think this would be a useful feature, but I believe it would require to add a new metadata tag, because the type_ field is not a bitmask.

While a read-only mode should be easy to implement (given that the metadata has been added), being non-deletable would require more effort. Not sure how it would impact performance when having to check for that flag during a recursive delete (folder delete).

1 Like

Yes, it might be useful and straightforward to implement. But I will be sad if something like this would be implemented. I will try to explain.

The only use case for locking notes is to prevent accidents with unwanted changes. But Joplin is a one-person app with a history of notes. For example, I can be cautious with my notes. But even if I mess up something accidentally, I can restore notes from history.

On the other hand, I see how many problems this feature can bring. For example, I start to lock all important notes, so in a couple of years, I will end up with hundreds or thousands of locked notes. Sometimes I have to rearrange my notes (e.g. add tags to many notes at once, move several notes to another notebook, delete several notes). Should "locked" notes interrupt these commands (adding and removing tags, moving or deleting notes)? If so, I will end up with unlocking notes, changing something (e.g. notebook), locking them back. I am sure this feature would be more pain in work than an advantage.

Besides, another solution came into my mind. Let's think about situations when you want to "lock" your note:

  • you wrote something important what does not work if would be changed accidentally (contact information, bank accounts, piece of code)
  • you wrote a summary of some situation that was accepted by someone (an agreement, meeting minutes, plan of work, strategy)

In both these cases, if you change something in your note, it would not be reliable anymore. But if the "lock" function solves the first use case, it does not solve the second. Because sometimes you need to change your agreement, plan, etc. You should know that the "locked" note was changed and does not contain "accepted" information anymore.

So the solution for both cases would be a "snapshot" for note and not a "lock" function. By doing a snapshot of a note with a comment on why you decided to snapshot it, you will be able to realize why you chose to "lock" this note at first. By highlighting the differences between the current note and snapshot, you will be able to decide what you should do with changes. Either implement them by doing a new snapshot or discharge them by returning to the previous snapshot.

An exclamation mark before note name might highlight notes with a snapshot where the current version is not equal to the snapshot.

Snapshot feature solves problems with unnecessary changes but gives more flexibility for changing notes. For example, you had a note with a friend's phone number, but you can not reach him by this phone. You asked people if he changed the phone and they give you a new one. You add it to note as a new phone. Now your note has a name like "! Mike's contacts". You reached Mike with a new phone, assured that the new phone is correct and made a new snapshot, so now the name does not contain the exclamation mark "Mike's contacts". The same for your code, meeting minutes, agreements and so on. Snapshot is more flexible and solves problems with accidentally changes. But give you possibly to monitor and accept changes if you needed.

Long post, sorry. This is why I do not have good feelings about "simple lock" feature.

This might happen. But you locked the notes in order to "freeze" them. So no change is allowed by intention. Hence, I would indeed expect(!) that a bulk operation including locked notes does not change them. I mean that is why they were locked in the first place. Note that some file systems allow to mark a file as immutable/undeletable. A bulk operation would fail here, too. You need to first remove the corresponding file attribute before you can delete it. Obviously, the argument that a recursive delete operation of a folder with all its subdirectories would have "problems" with protected files was not strong enough.

OTOH, I'd also like such a snapshot feature. But not for using it as a workaround to avoid unwanted changes. I think there really are only a few people checking in their documents in a Git repository omce only to make sure no file is changed by accident. I would use snapshots for being able to persistently record a note's important states in history. Earlier versions of MS Word also had this feature. And I used it frequently.