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

Make it possible to customize the completing-read function #91

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

maw
Copy link
Contributor

@maw maw commented Nov 21, 2020

Add a customizable variable, zetteldeft-completing-read which defaults to 'completing-read but which can be replaced with compatible functions such as ivy-read.

A caveat: if you say (fset 'zetteldeft-completing-read 'ivy-read) somewhere then this works exactly as I'd hoped. I can't figure out how to make it work via customize. This PR therefore isn't acceptable as-is, but I hope it's a useful start.

ref #90

@EFLS
Copy link
Owner

EFLS commented Nov 23, 2020

Looks like a useful addition, thanks!

I'm not familiar with completing engines, but maybe I should add to the documentation something like this: "If you change completion globally in your setup, e.g. by enabling ivy-mode, you don't need to adjust this variable."

Would that be correct?

@EFLS
Copy link
Owner

EFLS commented Nov 23, 2020

A caveat: if you say (fset 'zetteldeft-completing-read 'ivy-read) somewhere then this works exactly as I'd hoped. I can't figure out how to make it work via customize. This PR therefore isn't acceptable as-is, but I hope it's a useful start.

I haven't tested your PR, but does this mean that currently it doesn't via customize? Because that's definitely something to address. Unfortunately, this isn't really my area of expertise.

@maw
Copy link
Contributor Author

maw commented Nov 23, 2020

something like this: "If you change completion globally in your setup, e.g. by enabling ivy-mode, you don't need to adjust this variable."

Yes, I think that's a good way to phrase it.

@maw
Copy link
Contributor Author

maw commented Nov 23, 2020

currently it doesn't via customize?

Right. It isn't usable as-is. I spent a little while on this but I wasn't able to figure it out. It's what I was trying to do in here, c6597ff#diff-2b2d30963fb9d37edc1f2ac4e23abbdab9090ef054ffdd9860fc887cf50a66efR235. From the customize interface I tried setting ivy-read, 'ivy-read, and '#ivy-read as values but I don't think any of them worked.

maw added 4 commits July 24, 2022 19:20
The latter is a customizable variable that defaults to `completing-read'.
This makes it possible to, for example, use a special completing reader
just for zetteldeft without using it universally.
@maw maw force-pushed the customize-completing-read branch from 0c3f322 to 3305fa3 Compare July 25, 2022 00:21
@maw
Copy link
Contributor Author

maw commented Jul 25, 2022

@EFLS I finally tracked down and fixed the problem with customize.

I rebased my branch against current master.

I think this is ready to be tested now.

I wanted to include your proposed doc change but I wasn't sure where it was supposed to go.

@EFLS
Copy link
Owner

EFLS commented Aug 5, 2022

Thanks, I'll take a look at this in a short while!

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

Successfully merging this pull request may close these issues.

2 participants