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 a setting to display the short form of links in search results #59

Closed
icebruce opened this issue May 26, 2022 · 6 comments
Closed
Assignees
Milestone

Comments

@icebruce
Copy link

Problem description:
After searching and selecting a note, the file does not open. Using the arrow keys+enter or with the mouse does not open the selected note.

The strange thing is that it does not happen to all notes, only certain ones and at ad-hoc. After these notes are "stuck", using the built-in Obsidian search resolves the issue and I can go back and open them via Omnisearch. The notes in question are relatively easy, without any special characters or content.

bandicam.2022-05-25.22-56-02-768.mp4

Environment:

  • Omnisearch version:
  • Obsidian version: 0.1.7
  • Operating system: Windows 10
  • Number of notes in your vault (approx.): ~100
  • Other plugins that may be related to the issue: n/a
@scambier
Copy link
Owner

Hello, is there any error log in the console (Ctrl shift i)?

@scambier
Copy link
Owner

scambier commented May 26, 2022

Could you check Obsidian and Omnisearch versions? Omnisearch is at 1.3.3 and Obsidian should be at 0.14.2 minimum

@scambier scambier added the question Further information is requested label May 28, 2022
@icebruce
Copy link
Author

Obsidian is at 0.14.15.
Strangely Obsidian was not providing the latest omnisearch update. I had to uninstall and re-install to get the latest version, now everything seem to be in order.

There is another issue I came across however. The file name in the search pane now shows the full path of the file instead of the file name. I checked in obsidian settings and I do have the option for showing the "shortest path when possible" under link format (in case its related).

Any ideas?
image

@scambier
Copy link
Owner

This is the intended behavior, it mimics the Quick Switcher.

I do have the option for showing the "shortest path when possible"

I took a quick look, and Obsidian's public API does expose this setting, nor does it provide a function to get the short form of a link. I'll keep this issue open and ask around; if there's a built-in way I'll add a setting 👍

@scambier scambier changed the title Unable to open note from search results Add a setting to display the short form of links in search results May 30, 2022
@scambier scambier removed the question Further information is requested label May 30, 2022
@icebruce
Copy link
Author

icebruce commented Jun 1, 2022

Weird, now I wonder why it was actually showing the filename before. And I think I did not pay attention to the native switcher, you are right it is also showing the full path.

I took a quick look, and Obsidian's public API does expose this setting, nor does it provide a function to get the short form of a link. I'll keep this issue open and ask around; if there's a built-in way I'll add a setting 👍

Thanks for this! Personally I would love to have that option. If its ever of any help, I found this thread talking about this topic. This plugin actually has that enabled by default.

@scambier
Copy link
Owner

scambier commented Jun 1, 2022

Oh ok, I misunderstood (and probably though a bit too far). Actually I can display the short name without the full path, that's not an issue. What I can't do easily is reproduce Obsidian behavior that shows the short name only if there is no more than 1 file with this name. That's what the "shortest path when possible" option does.

Well actually I can implement something like that, but I don't want to write a different logic than Obsidian's and have consistency issues.

I'll add a setting to just toggle between short name / full path 👍

@scambier scambier added this to the 1.4 milestone Jun 1, 2022
@scambier scambier self-assigned this Jun 3, 2022
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