Skip to content

Conversation

@paris3200
Copy link
Owner

Summary

  • Fixes tag search and link following when vault_path is a symbolic link
  • Adds -L flag to find commands to follow symlinks
  • Resolves "No tags found in frontmatter" error for symlinked vaults

Problem

The find command doesn't follow symbolic links by default. When a user's vault_path points to a symlink (e.g., ~/personal/docs/notes~/personal/repos/notes), the find commands would return 0 files, causing:

  • Tag search to show "No tags found in frontmatter"
  • Link following fuzzy search to fail

Solution

Added the -L flag to find commands in:

  • search_tags() in lua/markdown-notes/notes.lua (line 164)
  • follow_link() fuzzy search fallback in lua/markdown-notes/links.lua (line 73)

Testing

Tested with symlinked vault:

  • Before: 0 files found, no tags
  • After: 328 files found, 112 unique tags from 276 files

Changes

  • lua/markdown-notes/notes.lua: Added -L to find command in search_tags
  • lua/markdown-notes/links.lua: Added -L to find command in follow_link fallback

The find commands in tag search and link following were failing
when vault_path was a symbolic link because find doesn't follow
symlinks by default. This caused "No tags found in frontmatter"
errors and link following failures when using symlinked vaults.

Added -L flag to find commands to follow symbolic links in:
- search_tags() function in notes.lua
- follow_link() fuzzy search fallback in links.lua

This allows the plugin to work correctly with symlinked vault
directories (e.g., ~/personal/docs/notes -> ~/personal/repos/notes).
@paris3200 paris3200 merged commit 196265b into main Nov 18, 2025
4 checks passed
@paris3200 paris3200 deleted the fix/symlink-support branch November 18, 2025 19:09
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