fsnotes icon indicating copy to clipboard operation
fsnotes copied to clipboard

Allow automatic file naming based on first line of file

Open dequeued0 opened this issue 4 years ago • 31 comments

Describe your feature request

1Writer (on iOS) has a nice feature for new files that I think would be a very nice enhancement for FSNotes.

The first line of a new file is used to name the file. Once the file is saved with that name, the file name doesn't change unless you explicitly rename the file. (In 1Writer, this feature is activated with the "auto file naming" setting.)

This seems much easier for everyday use than naming files based on timestamps.

Additional context

This is not the same thing as the "First line as title" option. (In fact, that option would almost definitely be turned off for most people using this proposed feature.) The first line is only used to determine the file name for new files. Afterwards, it's just a regular file name.

dequeued0 avatar Oct 11 '21 23:10 dequeued0

Have you ever opened the settings?

glushchenko avatar Oct 12 '21 06:10 glushchenko

Have you ever opened the settings?

I have opened the settings many times and I have tested multiple options. That is why I mentioned the "First line as title" option.

The "First line as title" option hides all of the filenames for my existing notes. I want to use the filename as the title.

I thought that the "Auto Rename By Title" option might be relevant, but it does not name files based on the first line of the title. If that is what it is supposed to do, it may not be working correctly on the Mac platform. File names are still getting a hexadecimal filename even after the first line is completed.

If there is another option that I should be looking at, please let me know.

Thanks.

dequeued0 avatar Oct 14 '21 02:10 dequeued0

To add some information:

I understand that if I create a new note using the "Search or create" field, the name used there becomes the first line and is used for the filename. However, if I create a new note using the button to the right of the "Search or create" (the square button with a pen/pencil on the upper right) then the first line does not become the filename.

In 1Writer, right when you click + to start a note and start typing, the first line becomes the title and any time you edit the first line, the file is automatically renamed. That is the feature I am requesting.

dequeued0 avatar Oct 14 '21 02:10 dequeued0

@dequeued0 can you click here?

IMG_6513

glushchenko avatar Oct 14 '21 17:10 glushchenko

I'm using the Mac version of FSNotes as I mentioned here:

I thought that the "Auto Rename By Title" option might be relevant, but it does not name files based on the first line of the title. If that is what it is supposed to do, it may not be working correctly on the Mac platform. File names are still getting a hexadecimal filename even after the first line is completed.

dequeued0 avatar Oct 15 '21 06:10 dequeued0

Auto rename by title working correctly on macOS and iOS.

glushchenko avatar Oct 15 '21 07:10 glushchenko

Here is a video demonstrating what I am describing:

https://imgur.com/a/7k2UJ81

dequeued0 avatar Oct 15 '21 07:10 dequeued0

image

"Auto rename by title" should be enabled in settings

glushchenko avatar Oct 15 '21 07:10 glushchenko

Yes. It is enabled. I have had it enabled the entire time.

https://imgur.com/HjGp94G

dequeued0 avatar Oct 15 '21 07:10 dequeued0

@dequeued0 I need to understand how to reproduce it. For everyone except you, the function works correctly. I recommend writing a detailed bug report, otherwise I won't be able to fix it.

glushchenko avatar Oct 15 '21 08:10 glushchenko

I am running macOS 11.6.

I have added all of my settings to this album: https://imgur.com/a/7k2UJ81

The first animated image in the album shows how to reproduce it on my system. FSNotes never renames the file based on the first line.

I also tested FSNotes 4.10.2 yesterday and it has the same issue for me.

What additional information do you need?

dequeued0 avatar Oct 15 '21 08:10 dequeued0

Just enable Preferences - Layout - First line as title

glushchenko avatar Oct 15 '21 08:10 glushchenko

My notes from other applications use the name of the file. I want to use the name of the file. This issue is about automatically (re)naming notes based on the first line.

It seems like you never read what I wrote initially.

dequeued0 avatar Oct 15 '21 08:10 dequeued0

I understand what you are talking about, but I don’t think it needs to be fixed. In any case, after editing, old notes will lose data from their titles if use auto rename option.

glushchenko avatar Oct 15 '21 09:10 glushchenko

It would be sufficient if the file was only named based on the first line once when the file is new and doesn't have a good name yet. After the first line is entered, that becomes the name of the file.

Naming files with UUIDs or timestamps is not very helpful and it does not make them easy to use on multiple platforms, searching the directory listing in Finder, finding notes in the Unix shell, editing a complex note in Emacs or vim, etc.

While you implemented "First line as title", that is not the same thing and it is definitely worse to use, especially when using notes on multiple platforms and with multiple apps. No other editor that I use does "first line as title" where it is only used for display of the title rather than changing the actual filename. If I enable "first line as title", all of my filenames are hidden and I lose that information.

It seems like a lot of people want this feature:

  • #929 - also see https://github.com/glushchenko/fsnotes/issues/929#issuecomment-662686870
  • #837 - also see https://github.com/glushchenko/fsnotes/issues/837#issuecomment-612032676 and https://github.com/glushchenko/fsnotes/issues/837#issuecomment-662689424
  • #831
  • #520
  • #418

dequeued0 avatar Oct 15 '21 09:10 dequeued0

Hi,

I'm with @dequeued0 here with the same situation. I just switched to FSNotes, loving it so far. But this things really bugs me.

I have "Auto Rename By Title" for files naming in settings, but when I create new note, I end up with something like this: "02056E29 B1AE 4D0C 8F43 7649E9C4E1A7".

Coming from multiple editors from the past and having more than 2k notes, I also need this working. I use filenames as titles. Am I doing something wrong or is this isn't possible yet?

How do you usually set the name of the titles, just writing it manually or?

I would be cool if it can be auto generated maybe from the first line before first save or auto renamed from YAML meta data as I usually use title and id there, so end up with a filename like this: "note title YYYYMMDDHHSS" format.

Thanks

hrvojepilic avatar Dec 19 '21 17:12 hrvojepilic

I can reproduce this issue.

The file name stays as UDID regardless of "Auto Rename By Title" or "First line as title" and typing something in the first line.

Perhaps this has regressed to not working? @glushchenko

gingerbeardman avatar Dec 19 '21 20:12 gingerbeardman

It has indeed regressed to not working. It was working 2 or 3 versions ago for me but no longer works.. I can post a youtube vid if needed.

ksdomino avatar Apr 21 '22 06:04 ksdomino

It has indeed regressed to not working. It was working 2 or 3 versions ago for me but no longer works.. I can post a youtube vid if needed.

How to reproduce it? Works fine for me.

glushchenko avatar Apr 21 '22 06:04 glushchenko

How to reproduce it? Works fine for me.

  1. I uninstalled and reinstalled FSNOTES to attempt to fix it so that can be n optional step in reproducing it.
  2. I create a new note and put "test title 1" or something similar (without the quote marks obviously).
  3. the note doesn't rename (I can visually tell it didn't rename because the bar at the top of the screen doesn't change (I will show all these better in the youtube vid I will post in a while).
  4. I go into preferences and check the 2 options mentioned ( in the general tab, files naming is set to "auto rename by title", and in layout, "first line as title" is ticked.) ( I tested changing those options and all the other options work, but as of the last few versions, auto-renaming doesn't work for everyone).

ksdomino avatar Apr 21 '22 06:04 ksdomino

2 minute youtube link showing this bug in detail: https://youtu.be/fxoGa4uUkaE

Hope this helps.

ksdomino avatar Apr 21 '22 07:04 ksdomino

Hi all, finally I found problem. Auto rename not working when "Scan inline tags" is disabled. Fixed now.

glushchenko avatar Apr 21 '22 18:04 glushchenko

Hi all, finally I found problem. Auto rename not working when "Scan inline tags" is disabled. Fixed now.

Excellent, will look forward to a future release (where hopefully I can disable inline tag scanning and have first line renaming still working! Thanks so much for getting this sorted.

ksdomino avatar Apr 21 '22 21:04 ksdomino

I plan to release the update like always on Sunday. Thank you for bug report 🍻

glushchenko avatar Apr 21 '22 21:04 glushchenko

I plan to release the update like always on Sunday. Thank you for bug report 🍻

Wow that's quick, Thanks so much and glad to help in whatever small way I can. Thanks again :)

ksdomino avatar Apr 21 '22 22:04 ksdomino

https://github.com/glushchenko/fsnotes/releases/download/5.4.0/FSNotes_5.4.0.zip

glushchenko avatar Apr 24 '22 08:04 glushchenko

Unfortunately it still doesn't work for me :( Whether "Scan inline tags" is enabled or not.

schwantuschke avatar Apr 25 '22 13:04 schwantuschke

Working fine here now. I updated using the apple store this morning and tested it. Hopefully you get it fixed on yours too schwantuschke. Could be another setting messing with it..did you put it back to defaults? (in the general tab, files naming is set to "auto rename by title", and in layout, "first line as title" is ticked.)

ksdomino avatar Apr 25 '22 13:04 ksdomino

Ok. "auto rename by title" works only if "first line as title" is active. Doesn't it then make sense to make the functions in the settings window dependent on each other?

schwantuschke avatar Apr 25 '22 19:04 schwantuschke

Glad you got it sorted :) I too was wondering why that option "first line as title" even exists so I think you're right, they should at least be put on the same tab/page ideally next to each other or if it doesn't do anything else then it could be removed/merged into a single item to avoid confusion for future users.

ksdomino avatar Apr 25 '22 20:04 ksdomino