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

Dedupe items in unlinked references section #2362

Closed
okomestudio opened this issue Jul 11, 2023 · 2 comments
Closed

Dedupe items in unlinked references section #2362

okomestudio opened this issue Jul 11, 2023 · 2 comments

Comments

@okomestudio
Copy link

Brief Abstract

Deduping unlinked references items listed in the Org Roam buffer will improve browsability.

Long Description

The unlinked references section of Org Roam buffer lists matched line multiple times (this originates from ripgrep behavior). While the Magit-like support for being able to jump to the matched position is nice, repeatedly showing the same line bloats the buffer and making sense of search results difficult.

For example, in the following result, lines 333 and 337 contain the word "china" matched multiple times, and the rather long paragraph gets repeated for apparently no benefit.

Duplicate lines

(Note that truncation is avoided by the use of visual-line-mode and adaptive-wrap-prefix-mode for indentation of wrapped line. This is purely my personal settings.)

Proposed Implementation

A simple code modification to replace repetition with ellipses (... here) can make the Org Roam buffer cleaner to browse without loss of any information:

Deduped with ellipsis

while the ability for us to click on the entry line to jump to the match via Magit is retained.

I will submit a PR implementing the minimal change.

@xbc5
Copy link

xbc5 commented Jul 16, 2023

Try innovating a solution yourself then.

@okomestudio
Copy link
Author

To avoid clutter, I will close this in favor of #2416 which offers a more general solution.

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

No branches or pull requests

2 participants