hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.12k stars 83 forks source link

Title change not taken into account when inserting literature note link #110

Closed Elaws closed 3 years ago

Elaws commented 3 years ago

Environment

Windows 10 Obsidian 0.12.12 Citations 0.4.3

Description

If you change the title of a literature note and then insert a link to it, citations plugin insert a link to another note with the title from the template.

Steps to reproduce

  1. Create or open a literature note with citations plugin.
  2. Change its title.
  3. With citations plugin, insert a note link to this literature note.
  4. The link does not point to the correct literature note (it uses the "old" title from the template, not the "new" edited title).
hans commented 3 years ago

This is the expected behavior. To accomplish what you request, the plugin would need to maintain a database separate from the Obsidian vault content, tracking mappings between citations and their titles. I think this is undesirable for interoperability / sustainability reasons: other tools accessing the vault / working with the Markdown export in 5--20 years would be need to be aware of and accommodate this extra complexity.

For this reason I'm declaring wontfix -- but if you have a strong and general use case in which it makes sense to manually change literature note titles, please share and I will reconsider.

Elaws commented 1 year ago

@hans : Here is a possible usecase, so that maybe you reconsider this FR.

Usecase description

In Literature note title template, I don't use something simple like {{citeKey}} or {{title}}. But something like DOC_TYPE YYYY-MM-DD {{title}}, where DOC_TYPE is a special character that quickly indicates if the document is a book, paper or article (this was inspired from Bryan Jenks Obsidian Workflow).

I have not found a way to automate the DOC_TYPE part, so this is added manually in the title after opening the note with citation plugin.

The problem is that whenever I open the note again with citation plugin, it does not recognize the title anymore.

Possible solutions