LefterisJP/malinka

malinka-project-configure shows nothing

Closed this issue · 5 comments

Hi, there,
Here is my malinka configure:

(require 'malinka)
(add-hook 'c-mode-common-hook 'malinka-mode)
(add-hook 'eshell-mode-hook 'malinka-mode)
(setq malinka-completion-system 'ido)
(setq malinka-print-xdebug? t)

(malinka-define-project
 :name "ceph"
 :root-directory "~/project/ceph"
 :build-directory "~/project/ceph/build"
 :configure-cmd "cmake .."
 :compile-cmd "make -j4"
 :test-cmd "")

(malinka-define-project
 :name "opencv"
 :root-directory "~/projects/read_learn/opencv/"
 :build-directory "~/projects/read_learn/opencv/build_x86_release"
 :configure-cmd "cmake .."
 :compile-cmd "make -j4"
 :test-cmd "")

But when I run malinka-project-configure, nothing appears at minibuffer of emacs:

Project:  [No match]

By the way, I've tried run rdm manually, find it crashed. I don't know if it is related:

rdm --suspend-rp-on-crash
Running with 8 jobs, using args: -ferror-limit=0 -Wall -fspell-checking -Wno-unknown-warning-option
Includepaths: -isystem /usr/lib/llvm-3.4/lib/clang/3.4/include/
Restoring /home/zhongwei/projects/read_learn/rtags/ .....
Restoring /home/zhongwei/projects/read_learn/opencv/ .......
Restoring /home/zhongwei/projects/read_learn/clang-tags/ ........
Restoring /home/zhongwei/projects/read_learn/rtags_tar/ ...
Restoring /home/zhongwei/projects/read_learn/2_4_6_opencv/opencv-2.4.6.1/ ..................
Restoring /home/zhongwei/projects/project/ne10/ .
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
[1]+  Done                    rdm
Aborted (core dumped)

Hello,

For the rdm crush I would suggest compiling rtags in Debug mode, open it inside gdb (gdb --args rdm --suspend-rp-on-crash) and when it crushes typing bt to get a stack trace. Then open an issue in the rtags repository and show them this trace.

As for malinka, this is strange. Are you sure that the projects configuration you mentioned is visited? If it is then at least evaluatiing the following should show something.

(malinka--defined-project-names)

Can you try that? To evaluate an arbitrary expression press M-:

Eval (malinka--defined-project-names) returns nil.

I evaluating following region, still get nil:

229(malinka-define-project
230 :name "ceph"
231 :root-directory "~/project/ceph"
232 :build-directory "~/project/ceph/build"
233 :configure-cmd "cmake .."
234 :compile-cmd "make -j4"
235 :test-cmd "")
236(malinka--defined-project-names)

And I've already set (setq malinka-print-xdebug? t), but find none output (it is printed in Message buffer right?).

There are multiple "log" levels which you can activate with all of these calls:

(setq malinka-print-info? t)
(setq malinka-print-warning? t)
(setq malinka-print-debug? t)
(setq malinka-print-xdebug? t)

But this seems really strange. Nothing appears in the message buffer? Are you sure that malinka itself is loaded by your emacs.d/init.el?

What happens if you try to evaluate (malinka-define-project) without any arguments? You should be getting something like:

user-error: Malinka-user-error: Should provide a string for project name

In any case activate full debugging as shown above and let's see if you get something in the messages log.

Hi, Lefteris, I create a trivial pl, and fix my problem. Hope it does not break other thing.

It does not break anything. Your PR is correct and thank you. You must have emacs version < 24.4 and as such visited that part of the code which was untested.