Skip to content

Batch Note Insertion in Citar #837

@yuchen-lea

Description

@yuchen-lea

Background:
I previously used helm-bibtex and customized an action where I could pass in keys. If a key had a corresponding note, it would skip it; if not, it would add a new one. This allowed me to batch add notes when selecting multiple items, which was particularly useful for managing lists of books or movies.

I implemented a notes-source where notes were added as outlines to an existing file rather than creating new files.

Issue:
In citar, while selecting multiple entries and inserting citations works perfectly, attempting to open notes for multiple entries results in an error: embark PCH: (wrong-type-argument stringp nil). I initially assumed this would batch insert notes, but it seems there is a limitation or bug.

Feature Request:
I would like to request a feature in citar that allows for batch note insertion for multiple selected entries, similar to my previous setup with helm-bibtex. This feature should:

  1. Check for Existing Notes: When selecting multiple entries, the function should check if a note already exists for each entry.
  2. Handle Notes Accordingly:
    • For Entries with Existing Notes: Skip or provide an option to update the existing notes.
    • For Entries without Notes: Add new notes as per the defined notes-source setup (e.g., as outlines in an existing file).
  3. Error Handling: Ensure that the function does not throw errors when dealing with multiple entries, even if some entries have no existing notes.

Questions:
I'm not sure if modifying the existing function to implement this feature is appropriate...

The situation is indeed quite complex, simply looping the :create function may be not enough.

If I want to add a new function to embark to achieve this feature, which keymap should I hack? how should I get the selected keys from citar?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions