martanne / vis

A vi-like editor based on Plan 9's structural regular expressions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lua: lpeg module isn't actually optional

donaldcallen opened this issue · comments

Having built vis from source on FreeBSD 13.2 (up-to-date), when I start vis, I get

/usr/local/share/vis/vis-std.lua:20: attempt to call a nil value (field 'load')
/usr/local/share/vis/plugins/filetype.lua:503: attempt to index a nil value (field 'property')

in a separate (debug?) buffer. Below that buffer, it says "WARNING: could not find lpeg module"

This issue occurs with both lua5.4 and lua5.3 (after having made the fix to vis/configure given in my pull request of a few minutes ago, without which, vis configure does not see lua5.4 even when installed). I usually install built-from-source packages with the --prefix /usr/local/from_source. I did this at first with vis, had this problem, and tried the default prefix, which had no effect.

I've done the same installation on an Arch Linux system with no trouble.

This occurs because you don't have lpeg installed (on FreeBSD lua-lpeg is
the port name). Its meant to be optional but at some point that stopped
being the case. I will try to fix it later.

Thanks very much -- that does fix the problem.