could you please consider fix for me-mold-treesitter-to-parse-tree that might fail when the buffer of which it tries to retrieve the parse tree is not visiting a file name, as in the example case in #14 where the buffer is a process buffer.
Fixes #14.
Other than the :buffer-file change to check for the existence of buffer file name, I've converted the recursive calls to the fn lambda function to use the cl-labels which is a more appropriate pattern when using inline lambdas (the current pattern was failing for me when trying to run the tests).
I am grateful for your PR @ikappaki ! I have learned a couple of things (buffer-file-name is a buffer variable and cl-labels syntax).
Thanks for your contribution!
Hi,
could you please consider fix for
me-mold-treesitter-to-parse-tree
that might fail when the buffer of which it tries to retrieve the parse tree is not visiting a file name, as in the example case in #14 where the buffer is a process buffer.Fixes #14.
Other than the
:buffer-file
change to check for the existence of buffer file name, I've converted the recursive calls to thefn
lambda function to use thecl-labels
which is a more appropriate pattern when using inline lambdas (the current pattern was failing for me when trying to run the tests).I've included a test to check both cases.
Thanks