glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.37k stars 469 forks source link

Improvement on the "Auto rename by Title" #1775

Open DesBw opened 2 days ago

DesBw commented 2 days ago

This is a very useful feature. I appreciate it you have it here. But, it needs a little tweak so that FSnotes will play good with other apps such as Obsidian. Currently, if we select "Auto renmame by title" in setting, editing notes that are already created in Obisidian or other app will get renamed to the first line text. That is too much. I think a better option would be to not touch the names of old notes; and rename only the ones we are creating inside fsnotes.

glushchenko commented 1 day ago

Files created in FSNotes are no different from any other markdown files. How to implement this?

And why shouldn't some files be renamed if auto-rename is selected? Old notes are sometimes edited too.

After a while, users will come to me asking "why aren't the notes renamed"?

DesBw commented 1 day ago

After a while, users will come to me asking "why aren't the notes renamed"?

I don't think that ever happens because if a user is editing an old file, he/she already assigned a file name to it. In rare occasions that we need to rename old files, it is not that hard to hit CMD+R.

The problem with the current system is any file we edit inside FSNotes is going to renamed. It could cause a lot of unexpected results.

As to the implementation, how about using the CreationDate attribute provided by the macOS? Auto rename a file --> iff it has been created in the last few seconds (or sth like that).

DesBw commented 1 day ago

Look at a comment by @xor-gate here

I think this feature works, but it did automagicly rename my files which I did not expect. If I use the setting other than "Auto Rename By Title" it should not touch my filenames every again right? I'm now using the "Format: Untitled Note" setting.

He expressed the problem of the current implementation. Editing a file should not trigger renaming, honestly. Creating a file can, well because we are creating it, need to name it anyways.

glushchenko commented 1 day ago

As to the implementation, how about using the CreationDate attribute provided by the macOS?

That's possible, I can even make an additional option for that.

DesBw commented 1 day ago

That's possible, I can even make an additional option for that.

thank you

glushchenko commented 1 day ago

Please check dev build FSNotes_6.9.8.zip

New option available here: Settings -> Files Naming -> Auto Rename By Title (New Only)

DesBw commented 1 day ago

Wow, that is impressive man.
Yes, it is working. May I suggest the name "Autoname by Title", because this one doesn't rename existing files. It assigns names to the newly created ones (unnamed yet).

Brilliant. Thank you.