How to debug cider on emacs? - emacs

I have an issue using cider: emacs freezes after nREPL server started on 54308 is written. C-g helps, but I have cider not working. My question is: how can I debug cider and get some usefull output to find the source of this problem?
P.S. After a long time I get error in process filter: error during connect: connection timed out. But I would like to debug underlying process (as nrepl-server is started).

M-x toggle-debug-on-error should make it easy to obtain the stacktrace of the problem. After that you can you use any general debugging technique (personally, I'm fond using the debugger). I see you've also reported your problem here - that's always a good idea.

Related

Emacs freezes when debugging a program that segfaults (DAP vscode-cpptools)

I'm having an issue when debugging c++ programs in emacs (using dap-mode, LSP, projectile...):
I have no problem with the debugger, as long as my code doesn't crash. But when the debugger hits a segmentation fault, I get the usual messages that I would see in gdb for instance, but then I also get this line:
Stopping due to fatal error: NotImplementedException: No handler implemented for request type: 'ExceptionInfoRequest'!
Then emacs freezes and the only way to unfreeze it is to kill clangd. however, when I get back control over emacs, LSP detects that clangd crashed, and suggests I restart the server. Even if I say no, emacs hangs again and I can only kill emacs to close it.
I am fairly new to emacs, and just discovered LSP / DAP integration, so I apologize if I missed anything obvious during the setup process. I don't know how to get further information on this error, I am not sure if the problem is in the vscode-cpptools, in clangd, emacs, or in the dap-mode package.
Has anyone encountered the issue, or knows how to fix this?

My plantuml-mode in emacs is not working correctly

I have tried to install and use plantuml-mode in emacs, with no success.
My emacs version: 25.2.2
Operating system: Ubuntu 18.04 x86_64
I have followed the official instructions on
https://github.com/skuro/plantuml-mode
When I load a file it says
"Contacting host: www.plantuml.com:443".
After a few seconds I get the error message
"plantuml-init: Wrong type argument: stringp, nil"
I've looked at
Can't turn on plantuml-mode in Emacs
It didn't help. In a previous attempt I found some other similar help pages, on github and stackoverflow, but I can't find them right now. One was to fix a broken url, and the other was to provide the correct path to the jar file. I fixed both, but none of them fixed my problem.
The above mentioned problem reports are related to the mode's attempts to contact a web server, or to run plantuml. I am not interested in any of them, I prefer to run plantuml myself from the command line. All I want from the mode is syntax highlighing and indentation. It is possible to turn off the other features, to get rid of the errors? Or is there another, simpler mode out there, that doesn't try to contact the web or run executables?
Best regards
The plantuml-mode sends your data to be evaluated at www.plantuml.com by default.
To run it locally, you need to set both the plantuml jar path and the execution mode as described in https://github.com/skuro/plantuml-mode#quick-guide:
(setq plantuml-jar-path "/path/to/your/copy/of/plantuml.jar")
(setq plantuml-default-exec-mode 'jar)

"error: Package `color-theme-' is unavailable"during emacs startup

I'm a newbie of emacs and I followed the guide from this web
step by step.
But when it startup, it said
Warning (initialization): An error occurred while loading `/home/mrfive/.emacs.d/init.el':
error: Package `color-theme-' is unavailable
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
what should I do now?
Thank?
Start by running emacs with the --debug-init switch i.e.
emacs --debug-init
This will give you more meaningful information which will help track down the problem. If the additional information doesn't help, add it to your question above and that will help others narrow down where the issue could be.

How can I clear and reload my nrepl session in emacs?

I am working with emacs and nrepl. How can I do the following:
Exit nrepl (currently I just kill the buffer)
Reload everything I was working with in nrepl.
The problem I'm trying to solve by doing this is that when I have loaded an ns form and it has an error, I am unable to load the correct code because it keeps giving me the previous error.
1) Exit the nrepl (currently I just kill the buffer)
M-x nrepl-quit
2) Reload everything in the nrepl. (I have this problem when I haave
loaded the ns, and it has an error. Then I am unable to load the
correct code, it still keeps giving me the previous error)
You can switch to the buffer and use C-c C-k to load the buffer, or just use C-c C-c to eval an expression. Another option would be:
(use :reload 'my.namespace)
in the REPL.
Check out Stuart Sierra's tools for namespace management at the repl, and read the blog post where he explains how to use it effectively. With a little bit of coding discipline, you won't have to exit your nrepl anymore (or less, in any case).
Good luck.

emacs - loading compile done error

In emacs - every now and then I'm running a command I don't want (don't know which one) and the status bar says "Loading compile...done" and emacs doesn't respond. How do I fix this?
try to start emacs via emacs -Q. If the error still persists, you need to debug yourself. If you cannot debug, you should send an email to GNU emacs-devel lists.
If the error dissapears, that means you have a bad .emacs or startup.el.