joostkremers / ebib

A BibTeX database manager for Emacs.
https://joostkremers.github.io/ebib/
BSD 3-Clause "New" or "Revised" License
272 stars 37 forks source link

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

Open swflint opened 6 months ago

swflint commented 6 months ago

See also #286.

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

joostkremers commented 6 months ago

Thanks for the PR. Two questions:

swflint commented 6 months ago

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.

joostkremers commented 6 months ago

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 commented 6 months ago

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