masasam / emacs-easy-hugo

Emacs major mode for managing hugo

Home Page:https://gohugo.io/tools/editors/#emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using easy-hugo-next-postdir

jackbaty opened this issue · comments

Hi,

After trying to hack together my own solution for posting to multiple folders in /content I found that you had already implemented easy-hugo-next-postdir which I think is exactly what I want.

However, when calling either easy-hugo-next-postdir or easy-hugo-prev-postdir I get the following:

helm-M-x: Lisp nesting exceeds ‘max-lisp-eval-depth’

This happens regardless of whether I have easy-hugo-postdir set or not. Here's what /content looks like...

.
├── lifestack
├── micro
│   └── 2017
└── post
    ├── 2000-2015
    ├── 2016
    ├── 2017
    └── 2018
        └── 2018-05-24_hugo-bundles

And here's my config:

  (setq easy-hugo-basedir "~/Sync/sites/blog/"
        easy-hugo-postdir "content/post"
        easy-hugo-image-directory "img/2018"
        easy-hugo-url ""
        easy-hugo-preview-url "http://localhost:1313/"
        easy-hugo-sshdomain ""
        easy-hugo-root ""
        easy-hugo-default-ext ".md"
        easy-hugo-default-picture-directory "~/tmp/outbox"
        easy-hugo-previewtime "300")

Emacs 26.1 and spacemacs (develop branch: f1f8db002af108f58c9a78c5286e8beca59af6de)

Hi @jackbaty .

Is this an error even if you make this setting?

(setq max-specpdl-size 10000)
(setq max-lisp-eval-depth 10000)

That seems to solve it for me, thanks!

This does make me wonder if it would make sense to have a easy-hugo-select-postdir or something like it. This would let me browse the /content directory (using helm or whatever) and choose the postdir directly rather than moving through them one at a time. I'm thinking that using the new "Post Bundles" in Hugo might mean I could end up with many directories to loop through if only using easy-hugo-next-postdir

Thanks so much for the quick response!

Hi @jackbaty .
I've implemented easy-hugo-select-postdir at 8054187
This is cool.
I appreciate your idea.

This works great, thanks!