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

Apparent Parsing Bug #17

Closed
mikelococo opened this issue Sep 4, 2015 · 5 comments
Closed

Apparent Parsing Bug #17

mikelococo opened this issue Sep 4, 2015 · 5 comments

Comments

@mikelococo
Copy link

The following markdown code seems to cause a parser bug.

```
{
 :user {
   :repositories [["clojars" {:sign-releases false}]]
   :plugins [
      [lein-cloverage "1.0.6"]
   ]
 }
}
```

Steps to reproduce:

  1. Write the above content to a file with markdown-mode disabled (or using an editor other than emacs)
  2. Open the file in emacs and enable markdown-mode
  3. Attempt to quit emacs via C-x C-c

Expected Behavior: Emacs quits as normal

Actual Behavior: An error on the mode-line saying...

Not a Tramp file name: "/"clojars"_{:sign-releases_false}.md"

At this point emacs starts behaving pretty strangely, and can't be closed via M-x kill-emacs. I've ended up killing the pid from the command-line and restarting.

Could this string being sending some regex into a tizzy?

@jrblevin
Copy link
Owner

jrblevin commented Sep 4, 2015

I think it's mistakenly recognizing [["clojars" {:sign-releases false}]] as a wiki link. Recently, someone contributed a patch that searches for files in parent directories. Looks like it is searching for a file of that name in the root directory. Could you try this and let me know if you still have the error:

(setq markdown-wiki-link-search-parent-directories nil)

The broader issue is that markdown-mode shouldn't look for wiki links inside of code blocks.

@mikelococo
Copy link
Author

You're correct, disabling markdown-wiki-link-search-parent-directories suppresses the symptom, which makes the impact of the mischaracterizing wiki-links in code-blocks very tolerable.

@jrblevin
Copy link
Owner

jrblevin commented Sep 4, 2015

I disabled this by default in 5fd759c. Better parsing of wiki links and code blocks is on the todo list.

@jrblevin jrblevin closed this as completed Sep 4, 2015
@mikelococo
Copy link
Author

Sounds reasonable. Thanks for your work maintaining markdown-mode.

jrblevin added a commit that referenced this issue Dec 16, 2015
@jrblevin
Copy link
Owner

With recent changes to improve detection of code blocks, I was able to fix this properly now in d299a37.

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