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

Add in simple knob to update ebib index on reading list updates #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

swflint
Copy link
Contributor

@swflint swflint commented Jan 6, 2024

See also #286.

This moves from the hook approach described to being a default part of the implementation.

@joostkremers
Copy link
Owner

Thanks for the PR. Two questions:

  • What's your reason for making it a user option? Do you envisage scenarios in which a user might not want the index updated?
  • You only update the index buffer, so I assume that means you haven't found a need to update the entry buffer?

@swflint
Copy link
Contributor Author

swflint commented Jan 7, 2024

Honestly, I can't imagine anyone not wanting the index updated. I'll remove the option if you think it's best.

I have not found a need to update the entry buffer. That being said, it probably should be, so I can add that in as well.

@swflint swflint force-pushed the reading-list-update-index branch from 5e98b9b to 8481db5 Compare January 7, 2024 15:27
@joostkremers
Copy link
Owner

Honestly, I can't imagine anyone not wanting the index updated. I'll remove the option if you think it's best.

Yes, I'd update it unconditionally.

I have not found a need to update the entry buffer. That being said, it probably should be, so I can add that in as well.

Well, if you haven't found a need, there may not be one. I don't think there's anything in the entry buffer that depends on the reading list. The only reason to update the entry buffer would be if ebib--reading-list-new-item or ebib--reading-list-remove-item can be called in a situation where the index buffer and the entry buffer are out of sync (i.e., when the "current entry" in the index buffer is not the entry being displayed in the entry buffer).

OTOH updating the entry buffer doesn't take long, so to be on the safe side, we might as well do both.

BTW, there's a function ebib--update-buffers that updates both buffers.

@swflint swflint force-pushed the reading-list-update-index branch from 8481db5 to 83e50cf Compare January 7, 2024 18:58
@swflint
Copy link
Contributor Author

swflint commented Jan 7, 2024

I've switched to use ebib--update-buffers and it now operates unconditionally.

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