Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Creating a new note from a template automatically assigns it filename "New Note.md" if template does not include ${FOAM_TITLE} variable #834

Closed
michael-guimet opened this issue Nov 19, 2021 · 0 comments · Fixed by #837
Labels
bug Something isn't working

Comments

@michael-guimet
Copy link

  • Foam version: v0.15.6
  • VS Code version: 1.62.3
  • Platform: Windows 11
  • Issue occurs on the foam template repo: Yes

Summary
Creating a new note from a template automatically assigns it filename "New Note.md" if template does not include ${FOAM_TITLE} variable. This is a regression from previous versions of Foam

Steps to reproduce

  1. Download foam template and extract
  2. Press F1 (or Ctrl+P then ">")
  3. Type or select "Foam: Create New Note From Template"
  4. It will ask you if you want to create a new template. Select "Yes". This will create a new template. No need to modify it. Ensure it is saved.
  5. Press F1 (or Ctrl+P then ">")
  6. Type or select "Foam: Create New Note From Template"
  7. Select the available template
  8. This will create a new file based on the template with the name "New Note.md"
  9. Bug: Expected behaviour (as established by previous versions of Foam) is to prompt for the name of the file.

Additional information

Workaround:

  • Include the variable ${FOAM_TITLE} in your template. If you do not want it to appear in the note you can include it in a comment. (Thanks to AndreiD049 (Discord) for coming up with this workaround)

Additionally:

  • I did not encounter this problem until recently (probably one of the last couple releases)
@michael-guimet michael-guimet added the bug Something isn't working label Nov 19, 2021
riccardoferretti added a commit that referenced this issue Nov 21, 2021
* Fix #831 - fixed glob used to look for templates

* Fix #834 - ask for note title when creating from template
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant