Skip to content

Clarify distinction between actions on keys vs on citations (lists of keys) #203

@bdarcus

Description

@bdarcus

I really need feedback from people playing with org-cite, as this question not only relates to fixing the bug in #199, but has far-reaching implications.

Right now, at-point functionality supports both a single reference, and a list of references; actually, all the action commands do.

In practical terms, that means if point is on a multi-key org-cite citation (within "cite" for example), and you run org-open-at-point, we pass a list of keys to the action.

image

But is this wise? Consider two options:

  1. current behavior; the keys of all include references are passed to the commands (as happens now in the minibuffer, BTW)
  2. you are first prompted which key to run the action on, before seeing the above menu of actions

Other org-cite implementations do 2; see, for example, org-ref-cite-follow.

If we change to 2, it would involve removing, for example, this:

https://github.com/bdarcus/bibtex-actions/blob/4c6aa3612da91e9de27687bb2a7aeb4999ca84f5/bibtex-actions.el#L435-L436

Either way, this function should be moved to oc-bibtex-actions.

I can see arguments for both approaches, though lean towards changing to 2, because it simplifies this code, and also aligns it with org-ref-cite-follow.

But I can also see arguments for, maybe even prefer, a third option: it working as a list for some commands, and not for others.

Here's my thoughts on this path, which also may clarify the pros and cons of different approaches more generally.

Let's consider three cases:

  1. MUST allow a list
  2. Probably SHOULD allow a list
  3. Probably SHOULD NOT allow a list

Here's what it's in the at-point keymap for embark:

  • org-cite-insert: 1 (because these processors are context-aware, and present different UIs depending on where point is)
  • bibtex-actions-open: 2
  • bibtex-actions-open-entry: 3 (because usually the entries are in the same file)
  • bibtex-actions-open-link: 2
  • bibtex-actions-open-notes: 2 (this is complicated though, since notes can be single-file, or multi)
  • bibtex-actions-open-pdf: 2

Note: I plan to look into adding other actions from org-ref-cite soon, so would be good to clarify this now.

See also #161.

WDYT @oatmealm @ilupin @titaniumbones @mclearc @salutis

Originally posted by @bdarcus in #199 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions