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

Prefill e.g. "has: notes" for "citar-open-notes" #449

Open
rudolf-adamkovic opened this issue Nov 29, 2021 · 10 comments
Open

Prefill e.g. "has: notes" for "citar-open-notes" #449

rudolf-adamkovic opened this issue Nov 29, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@rudolf-adamkovic
Copy link

More often than not, when I run citar-open-notes, I type has:notes. Could this be set as the default input? From what I understand, citar-presets almost does what I want but not really. I would like the default input prefilled for all specialized citar-open functions (except citar-open-entry, obviously). Or perhaps I have a bad idea?

@rudolf-adamkovic rudolf-adamkovic added the enhancement New feature or request label Nov 29, 2021
@bdarcus
Copy link
Contributor

bdarcus commented Nov 29, 2021

In the past, we had that, using basically a hack.

But the hack itself was a problem, and there aren't any great, pain free, alternatives.

So I removed it.

Perhaps in the future we can revisit, depending on how the broader ecosystem of packages evolves.

Do note that you can probably just type :n; it's what I do.

@bdarcus
Copy link
Contributor

bdarcus commented Dec 1, 2021

The other possibility is we could add a defcustom to pre-filter candidates.

But the downside would be that one would not be able to back out of that and access the full bib list. So it would need to be nil by default.

@rudolf-adamkovic
Copy link
Author

[...], using basically a hack.

But the hack itself was a problem, and there aren't any great, pain free, alternatives.

Does this mean that there exists no API to prefill that input field at the bottom of the screen?

@bdarcus
Copy link
Contributor

bdarcus commented Dec 1, 2021

@rudolf-adamkovic
Copy link
Author

That makes sense. How about we have a variable that says "show only relevant stuff" for these specialized functions? For example, when I call citar-open-notes, I want to see stuff with notes, because I want to "open notes".

@rudolf-adamkovic
Copy link
Author

Maybe I should start using citar-open instead. I remember that you wanted to remove the specialized functions. At this point, what purpose do they serve?

@rudolf-adamkovic
Copy link
Author

Done.

(global-set-key (kbd "C-c b") 'citar-open)

In nobody uses the specialized functions (that do not even filter the items), perhaps we should remove them, as you suggested in the past.

@bdarcus
Copy link
Contributor

bdarcus commented Dec 7, 2021

In nobody uses the specialized functions (that do not even filter the items), perhaps we should remove them, as you suggested in the past.

Do you use embark with citar?

As oantolin has made the point, it's best not to think of this too rigidly, given all these commands are contextually available. All the command does in that context is define the default behavior (e.g. opening a note).

So, for example, you can just choose whatever is your preferred entry point, and use that, and use embark-act to access different actions.

You can also give that command an alias if you prefer, like salutis/cite.

If that strategy, it would likely make sense that it be a command that always needs the full candidate list; like citar-insert-citation.

Really, this UI is designed to work best with Emacs 28 and embark.

image

How about we have a variable that says "show only relevant stuff" for these specialized functions?

Yes.

@rudolf-adamkovic
Copy link
Author

Really, this UI is designed to work best with Emacs 28 and embark.

I tried Embark in the past, but never found myself using it, so I later removed it. Recently, though, I watched a video on Embark by System Crafters, and it made me want to try Embark again. Today, I installed and configured it, at last. So, starting today, I use citar-open (bound to C-c b for "bibliography") and Embark. Thank you for your time and wise guidance!

@bdarcus
Copy link
Contributor

bdarcus commented Dec 8, 2021

I have a wiki page on embark configuration, that might give some other ideas.

https://github.com/bdarcus/citar/wiki/Embark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants