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

Avy cannot find invisible zetteldeft-link-indicators, such as "[[" #106

Open
localauthor opened this issue Feb 17, 2021 · 4 comments
Open
Labels
minor bug Not working, but not fundamental

Comments

@localauthor
Copy link
Contributor

When using 'The Archive' style UIDs and links, such as [[202102171159]], emacs renders the enclosing brackets invisible in the buffer.

As a consequence, the avy functions zetteldeft-avy-file-search or zetteldeft-avy-link-search return "zero candidates." Presumably avy cannot see invisible characters.

One possible solution is to invoke 'visible-mode,' to make the brackets visible.

But I wonder if it is possible to configure Avy to see invisible characters?

@EFLS EFLS added the minor bug Not working, but not fundamental label Feb 17, 2021
@EFLS
Copy link
Owner

EFLS commented Feb 17, 2021

If Avy could see those, that would be the easiest solution, but I don't think it can.

When using [[ style links, are you not in Markdown mode? Or does Markdown mode also hide the brackets?

Not sure what the best solution would be to address this, but I'm open for suggestions.

@localauthor
Copy link
Contributor Author

localauthor commented Feb 17, 2021

I am in org-mode, so that might be the root of the problem. My hacky solution, then, is to add (eval visible-mode 1) to my zettekasten directory's "directory local variables" file.

I actually quite like to have the brackets visible, so this solution satisfies me. But I wanted to raise the issue anyway, in case others were finding that running zetteldeft-avy-file-search and zetteldeft-avy-link-search always returned "zero candidates" as it did for me.

So, perhaps no action needed here. :)

edit: Except, of course, that visible-mode disables org-mode's folding feature... thumb's down

edit edit: An alternative might be to use ace-link instead of avy, but that would require some elisp jerry rigging that I'm not capable of (yet).

@EFLS
Copy link
Owner

EFLS commented Feb 18, 2021

My hacky solution, then, is to add (eval visible-mode 1) to my zettekasten directory's "directory local variables" file.

Except, of course, that visible-mode disables org-mode's folding feature... thumb's down

Seems like a good solution, but you might want to check the variable org-hide-emphasis-markers instead (wrong: see below). That should include the [[ visibility, if I remember correctly.

@localauthor
Copy link
Contributor Author

localauthor commented Feb 18, 2021

Seems like a good solution, but you might want to check the variable org-hide-emphasis-markers instead. That should include the [[ visibility, if I remember correctly.

The variable org-hide-emphasis-marks only applies to markers for bold, italic, underline, etc.

The visibility of link brackets is handled by the variable org-link-descriptive, which can be toggled by the function org-toggle-link-display.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor bug Not working, but not fundamental
Projects
None yet
Development

No branches or pull requests

2 participants