-
Notifications
You must be signed in to change notification settings - Fork 53
Context-sensitive insertion and edit commands #426
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
Conversation
b0c57db to
5a76ee4
Compare
This reverts emacs-citar#374, but in the context of this embark change: oantolin/embark#401
Also, use completing-read instead of completing-read-multiple when only one key is required.
2c8e3fc to
b917efb
Compare
This is a thin wrapper around org-cite-insert in org-mode, citar-latex-insert-citation in latex, and citar-markdown-insert-citation in Markdown. Available under "i" in the embark at-point map.
b917efb to
296c7b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @roshanshariff!
I just added a few minor line comments/questions, and suggestions which are mostly about docstring formatting.
EDIT: I committed the suggestions and merged. You can followup on the questions.
PS - Perhaps worth mentioning:
I've gone back-and-forth about whether it's the right approach for citation insertion and editing, but the solid at-point functionality might provide a foundation on which to add capf functionality in the future if it makes sense.
|
The
If we choose (2), we can also use it in Org mode; insert processors don't have to be made using |
Correct. I asked the developer to add that because didn't want to figure out to do all that coding myself :-) Also possible, and likely better: if we find some good tweaks for |
This is a continuation of #394.
org-cite-insert)citar-latex-insert-citation)citar-markdown-insert-citation)Partly implements #383: in Markdown,
citar-insert-citationwill now add new keys after the current citation key, or at the beginning of the citation if point is just after[.Fixes #278, fixes #393:
citar-insert-citationnow does something useful in Org mode, either inserting a new org-cite citation or adding new keys to an existing citation at point. The new keys are added at the beginning of the citation if point is before the first key, or after the current key otherwise.Relevant to #203: there are now two target finders, one for individual keys and the other for full citations. Both target types have the same keymap, offering the usual open actions. Running
embark-actonce will select and highlight the single key at point, and then runningembark-cycle(or pressing the key bound toembark-actagain) will select and highlight the entire citation. Depending on which target is active, the open commands will either act on a single key or all the keys in the citation.Relevant to #190: the new
citar-insert-editaction now runs theinsert-editmajor mode function, which is currently a thin wrapper aroundorg-cite-insertin Org mode. TBD whether this behaviour should be changed.Fixes #387.