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

Safer convert to filename #65

Merged
merged 2 commits into from
Jan 8, 2016

Conversation

csrhodes
Copy link
Contributor

@csrhodes csrhodes commented Jan 8, 2016

With sufficiently evil contents in [[Wikilinks]], it's possible to confuse emacs and tramp to the point that they won't let you switch away from the buffer. Handle conditions appropriately when examining the filesystem for
files named by wikilink content.

If you put something like

[[/!foo website="http://bar.baz"]]

in a markdown file, the conversion to filename will start failing
with tramp-related errors.  This is particularly bad because
fontification happens on window configuration change, so killing
the buffer and/or switching away from it also fail.

Fix: for the normal case, escape without testing the filesystem.
Wrap a condition-case around for when the user has specified
search-parent-directories.
It's all very well fixing the filename finding, but we also need
to prevent the fontification engine itself asking about invalid
tramp files.
@jrblevin jrblevin merged commit bdc065b into jrblevin:master Jan 8, 2016
@jrblevin
Copy link
Owner

jrblevin commented Jan 8, 2016

Thanks for these patches!

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