After creating a custom fold, `+fold/open-all` no longer opens structured folds in the buffer

What happened?

I created a custom fold using zf (evil-vimish-fold/create). Subsequently zr (+fold/open-all) stopped opening structured folds.

What did you expect to happen?

I expected +fold/open-all (zr) to open all folds in the buffer, including structured ones.

Steps to reproduce

  1. Create a test file

    cat > /tmp/foldit.py <<XXX
    import this
    import that
    import the as other
    
    def foo():
        pass
    
    def bar():
        pass
    XXX
    
  2. Doom sandbox seems to be broken, so use workaround to open test file in vanilla doom sandbox:

    DOOMDIR=/does/not/exist emacs /tmp/foldit.py &

  3. Verify that +fold/close-all and +fold/open-all close and open structured code (hideshow):

    • zm: observe the function definitions being folded
    • zr: observe the function definitions being unfolded
    • repeat the two above steps an arbitrary number of times: they continue to work.
  4. Create a custom fold (vimish-fold)

    ggvjjzf

  5. Observe that zr no longer opens structured (hideshow) folds, only custom ones (vimish-fold):

    zr, zm, zr, zm … ad boredom

  6. Observe that C-c @ C-a does still open structured folds.

Note, this example happens to use Python, but the same problem occurs in at least Rust, elisp, C and C++ code/modes too.

System information


Loading data dump...