atilaneves/cmake-ide

cmake-ide-rdm-rc-path in .dir-locals.el not taken into account?

benbovy opened this issue · 2 comments

I'm trying to use the feature introduced in #85, so I added cmake-ide-rdm-rc-path in .dir-locals.el like this:

((nil
  (cmake-ide-rdm-rc-path . "/valid/path/to/.rdmrc")))

However, cmake-ide doesn't seem to use it when calling cmake-ide-maybe-start-rdm, i.e., I don't see its value on the rdm command arguments

$ ps ax | grep rdm
84906 s002  Rs+    0:02.70 /Users/me/.emacs.d/elpa/rtags-20181205.1639//rtags-2.21/bin/rdm -c

The behavior of rdm is indeed inconsistent with the options that I've put in "/valid/path/to/.rdmrc".

Any idea?

I guess it has something to do with where you put your .dir-locals.el. I just set the variable manually and it worked, so AFAICT it's not anything to do with cmake-ide.

It worked too when I set the variable manually, but still not when I set it in .dir-locals.el.

I've setup a minimal repository here: https://github.com/benbovy/check-cmake-ide-rdm-path. Maybe this can help.

I opened the cpp file, and the rdm server started ignoring the path to .rdmrc, despite this output of describe-variable:

cmake-ide-rdm-rc-path is a variable defined in `cmake-ide.el'.
Its value is
"/Users/bbovy/Git/github/benbovy/check-cmake-ide-rdm-path/.rdmrc"
Original value was ""
Local in buffer helloworld.cpp; global value is ""

  This variable's value is directory-local, set by the file
  `/Users/bbovy/Git/github/benbovy/check-cmake-ide-rdm-path/.dir-locals.el'.
  This variable is safe as a file local variable if its value
  satisfies the predicate `stringp'.

So it looks like the value is set properly (note: it doesn't work either with a relative path to .rdmrc). Is there anything wrong with this setup? For other cmake-ide related variable that I put in .dir-locals.el I usually don't have any problem.