0

I am getting a max-specdl-size error on only one .markdown file. I have increased the size via (setq max-specpdl-size 50000) to test, and I still get the error. This does not happen on any other .markdown files. I also tested it on .Rmarkdown and .R files, but it only happens on one particular file.

When I load the file, the file will be enabled without markdown-mode. However, if if I revert-buffer this seems to correct itself and the markdown-mode is re-enabled, but this does not always work either. I followed the advice here, but get a massive debug report (too big for the allowed limit to be posted here).

Any ideas why this is occurring? Please let me know if you need any more info.

This problem only happens when opening a file via projectile but not dired or directly form Finder.

EDIT

This seems to be a problem on the contents of this particular file. I have copied the content to a new and renamed file, and still get the same issues. I also started using imenu-list and it does not provided an outline for this particular file, and reports an error (wrong-type-argment consp 31794). I've tested this file in other editors (Sublime Text, VSCode), and it works fine.

Any ideas are greatly appreciated.

EDIT#2

I added (setq max-specpdl-size 50000) to my init file and the issue seems to have resolved.

  • What happens if you exit emacs and restart? Does opening the markdown file on another machine cause this failure? IOW, is the problem with the given emacs (in which case, restarting emacs solves the problem) or with emacs on the given machine (i.e. something wrong with the machine, so opening the file on a different machine works fine) or with emacs on any machine (i.e. a bug in emacs that is triggered by this particular file)? If the file is small enough, can you it or upload it somewhere (perhaps a public pastebin) and post a link? The same with the debug report: ... – NickD Jan 21 '20 at 11:58
  • 1
    ... can you post it or upload it and post a link? The usual cause of a `max-specpdl-size` error is a bottomless recursion, but I think more information than what you provide would be necessary to allow a diagnosis. – NickD Jan 21 '20 at 11:58
  • Thanks for your reply @NickD, however I cannot test it on other machines. However, I did just test it on different `Emacs` configs and it works fine, so seems it is something with my config. I posted the `debug` output [here](https://gist.github.com/atanasj/8a29f8a2f945e99a020d711e7e09b930). Sorry, I cannot post the file as it is a draft of a manuscript. Thanks again for your help. – Atanas Janackovski Jan 21 '20 at 12:14
  • 1
    Check the value of `markdown-fenced-block-pairs`: how long is it? is it perhaps a circular list? Compare it with the setting in the configuration that works. If that does not bear fruit, you can always try [bisecting your init file](https://emacs.stackexchange.com/questions/13868/how-to-get-emacs-to-locate-the-error-in-my-init-file-without-relaunching) to figure out which part of it causes the problem. – NickD Jan 21 '20 at 12:28
  • You know what, it seems to be working now. Not sure how or why, but it loads as expected. I've uploaded the value of the `marked-fenced-block-pairs` but don't understand it. Thanks for the tip in bisecting the `init` file, I think I really need it! Also, do you know if this works if you have your config in an `.org` file? Thanks again @NickD, truly appreciated. – Atanas Janackovski Jan 21 '20 at 12:40
  • Actually, I just opened the file with `dired` and all opened as expected. However, when opening via `projectile` via the `switch-to-project` search (`C-c p p`), this files fails, however the others work as expected. Strange. – Atanas Janackovski Jan 21 '20 at 13:15
  • Thanks @Drew. I've added some detail, hopefully that's more appropriate. If not, please let me know as I'm still learning the etiquette. Cheers. – Atanas Janackovski Jan 21 '20 at 20:17
  • 1
    Thx. I'll delete my comment. You might want to delete other comments also, integrating any useful info from them into the question. – Drew Jan 21 '20 at 21:54
  • @NickD and @Drew, I believe it is something to do with one particular `.md` file, as it is not happening with any others. I cannot understand the `markdown-fenced-block-pairs` variable, but I started experimenting with `imenu-list`, and it doesn't works for that file, `imenu-list` provides the error `(wrong-type-argument consp 31794)`. I copied all the text into a new file, renamed it to a different name and the problem persisted. Any ideas...? – Atanas Janackovski Jan 22 '20 at 11:17

0 Answers0