Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add optional entry arg for orb-edit-note #211

Closed
bdarcus opened this issue Sep 13, 2021 · 0 comments
Closed

Add optional entry arg for orb-edit-note #211

bdarcus opened this issue Sep 13, 2021 · 0 comments

Comments

@bdarcus
Copy link

bdarcus commented Sep 13, 2021

In bibtex-actions I'm currently refactoring to decouple interactive functions, including for editing notes, from caching.

emacs-citar/citar#281

So on that branch, bibtex-actions-select-refs now returns more structured data, rather than a simple list of keys.

ELISP> (bibtex-actions-select-refs)
(("agnew2003"
  ("title" . "From Megalopolis to Global City-Region?")
  ("date" . "2003")
  ("author" . "Agnew, John")
  ("=type=" . "article")
  ("=key=" . "agnew2003"))
 ("huck1972"
  ("title" . "The Orders")
  ("date" . "1972")
  ("author" . "Huck, Susan L.M.")
  ("=type=" . "article")
  ("=key=" . "huck1972")))

But I earlier added bibtex-actions-file-open-note-function with the idea one could specify orb-edit-note there.

That function only takes a key as input, and so has to get that data from somewhere else; notably I guess the bibtex-completion cache (here I had a lookup function that was causing this problem that looked in the bibtex-actions caches via bibtex-actions--get-candidates).

I guess I'm wondering: do you think it's feasible to add an optional entry parameter on orb-edit-note for such structured data, so a user could still use that function here without getting an error? Or, if you like, you could actually use that data there as well.

E.g.:

(defun orb-edit-note (citekey &optional entry)
myshevchuk added a commit that referenced this issue Sep 14, 2021
`orb-edit-notes` can accept a list of strings or a list of lists whose
element lists start with strings.

See #211.
@bdarcus bdarcus closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant