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

General org target finder #250

Closed
Zetagon opened this issue Jun 15, 2021 · 7 comments
Closed

General org target finder #250

Zetagon opened this issue Jun 15, 2021 · 7 comments

Comments

@Zetagon
Copy link

Zetagon commented Jun 15, 2021

Separate issue for continuation on discussions from here and here.

tl;dr; I have written a target finder for org that uses org's own parser which atm can be found here. It is easy to extend for users.

I have signed the copyright papers for Emacs if this ends up becoming a PR.

@bdarcus
Copy link

bdarcus commented Jun 15, 2021

Per my comment over there, just wanted to make sure you're aware of the native org-cite functionality that's about to be merged.

That includes new citation and citation-reference org objects.

At bibtex-actions, we're actually including a target finder for it, with the intention to turn it into a "follow" processor.

emacs-citar/citar#143
emacs-citar/citar#141

@minad
Copy link
Contributor

minad commented Jun 16, 2021

To repeat my opinion regarding this generic org target finder and org actions in general:

  1. I prefer to have a flat list of finders, not something nested. While one saves the parsing effort with the nesting, the advantages are marginal. Embark target finders are not performance critical. By providing appropriate helper functions it is easy to create a target finder corresponding to an Org object, such that everything stays easily extensible and one avoid code duplication.
  2. The first step should be to identify the actions we want to have here. There are two other projects we can use for reference:
  3. How can one add such target finders, such that they are not always loaded? Most finders should only be enabled if orgmode is loaded and active. There is however one scenario, where this approach is lacking: It would be nice to have global org link actions, in the style of org-open-at-point-global. There are org link regular expressions which could be reused. This allows to use org links as Hyperbole-style buttons everywhere. See my Hyperbole/Org comment on reddit.
  4. For org actions at point it may be useful to have repeatable actions (see Repeating actions #244 and Add repeatable actions #245). cmap has repeatable actions too mainly for org actions at point.
  5. Of course there is the question if we need this at all. Org already provides a rich set of keybindings for all the various operations one may want to perform on the object at point. What do we win by embarking these commands?

@bdarcus
Copy link

bdarcus commented Jun 16, 2021

Org already provides a rich set of keybindings for all the various operations one may want to perform on the object at point. What do we win by embarking these commands?

Good question.

I guess it's only valuable if you want to add access to additional contextual actions beyond those provided in org.

It makes sense for the new org-cite, for example.

@Zetagon
Copy link
Author

Zetagon commented Jun 22, 2021 via email

@sheijk
Copy link

sheijk commented Jun 23, 2021

Org already provides a rich set of keybindings for all the various operations one may want to perform on the object at point. What do we win by embarking these commands?

Good question.

I guess it's only valuable if you want to add access to additional contextual actions beyond those provided in org.

It can also help with discoverability, to see what operations are available at point without needing to know the existing functionality

@alphapapa
Copy link
Contributor

See also, the new org-ql-find command in org-ql. Documentation and screenshot: https://github.com/alphapapa/org-ql#org-ql-find

@oantolin
Copy link
Owner

As things turned out, I wound up implementing a slightly different org target finder in the embark-org library. I still don't have key bindings for all the actions that @sheijk's org-menu package provides in its transient menus, but I already find embark-org useful. I definitely welcome any suggestions for embark-org on either new org elements to target (which is as easy as uncommenting them in the definition of embark-org--types) or of new actions to add to the keymaps.

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

6 participants