Closed laurynas-biveinis closed 4 years ago
Fixed in a more general sense of checking if we're actually somewhere valid before trying to do things, and giving some possibly-useful information otherwise. Let me know if this crops up elsewhere; I tried to cut it off at the two main points (compile/run).
This replaced an Elisp error with user error - but cmake-build-never-split
set to nil
still does not work: now it refuses to compile instead of doing what M-x compile
would.
Ah right I noticed splitting was still splitting incorrectly (in too-small windows) at some point and forgot to swing back around. The three cases ought to work now based on my testing (never-split, split threshold, regular split).
(Note in the above/original post, LET
will not work instead of setq-local
, because buffer-local variables are in a different context, so to speak. Thus the message about compilation-directory
, which isn't a defvar
variable, but a lexical. In short, buffer locals are separate from dynamic scope.)
The return of https://github.com/rpav/cmake-build.el/issues/10:
The culprit is recently added
where buffer-name is nil.
If I am not misunderstanding how elisp local bindings of global vars work, the following should work (it resolves the immediate error for me, but gives "Unused lexical variable `variable compilation-directory'"):