Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [debugging]

Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.

0
votes
1answer
243 views

“symbol's function definition is void: -dotimes” Error

I'm trying to use the following function (extracted from the amazing emacs-prelude configuration) (defun prelude-duplicate-current-line-or-region (arg) "Duplicates the current line or region ARG ...
9
votes
0answers
408 views

Edebug orgmode source code blocks with input variables

What is the standard method to debug emacs-lisp orgmode source code blocks with input variables as header arguments? I found the hacky solution to insert the following snipped in front of a source ...
1
vote
1answer
1k views

“Symbol's function definition is void: org-agenda-skip-scheduled-if-done”

I've recently started using Org-mode, and when I last restarted Emacs, I got the error message Symbol's function definition is void: org-agenda-skip-scheduled-if-done. Upon opening Emacs again using --...
17
votes
0answers
1k views

How can I debug random Emacs server crashes?

I generally have a long-running instance of emacs --daemon, which I connect to with various emacsclients. Recently I have started experiencing random crashes. I say "random" because I haven't been ...
10
votes
1answer
735 views

How to find out where a function is called from (backtrace/stacktrace)?

I've hit a problem that region is deactivated (in transient-mark-mode). The function deactivate-mark is called and I would like to find out where (and why) it is called from. I tried M-x debug-on-...
1
vote
0answers
430 views

c-indent-line-or-region: Variable binding depth exceeds max-specpdl-size

I'm trying to define a new major mode using define-generic-mode and want to try reusing c-indent-line-or-region for my indent-line-function. I've inserted (set (make-local-variable 'indent-line-...
2
votes
3answers
495 views

How can I determine which package is adding .emacs.d to my load-path?

I have a bunch of packages installed. One of them is adding ~/.emacs.d to my load-path, which Emacs is (unsurprisingly) complaining about. I could be incorrect here, but: Attempting to bisect my ...
1
vote
1answer
89 views

debug-ignored-errors --> suppress an annoying error/false-positives

In my emacs, i have set (debug-on-error t) to see the error's stacktrace. It is very helpful but for mundane errors, it becomes annoying... One such error is, Debugger entered--Lisp error: (error "...
5
votes
1answer
555 views

Is it possible to get stack trace of currently running code? Or profile? Or how do you diagnose „hangs”

I look for ideas, how to diagnose reason of Emacs freezes (by which I mean taking 100% CPU and being irresponsive for some time). This question is not about any specific case¹ but about approach… Is ...
1
vote
1answer
874 views

Debugging and setting breakpoints in Java code built with Gradle

I am using Emacs (v24.4) for writing Java applications. I have created a Java library that I am building using Gradle (v2.2) and testing with Spock Framework where I have all my test cases. I would ...
1
vote
0answers
38 views

wildcard expansion in buffer

I'm debugging with pdb in emacs and one of the parameters to the program I'm debugging is a list of regular expressions wrapped in quotes. Basically, pdb someProgram.py 'regex .* .*' from the ...
1
vote
1answer
182 views

How can I debug my init file using information from --debug-init? [closed]

I have my emacs setup as an alias in the bashrc as alias="emacsclient -t -s server alternate-editor=" in case this helps. The emacs version is 24.4.1 and AUCTeX is compiled from the git repo and was ...
0
votes
0answers
48 views

What completion modes am I using?

I do not curate my .emacs and packages very effectively. Right now I have an issue where, when working in the Ruby, I type def[space] and then magically two end lines appear. Obviously I have managed ...
5
votes
2answers
366 views

How to visit file containing source code for a given function?

To open a buffer on the source code for a command definition, I usually follow a convoluted procedure something like this: Guess the name of the mode from the function name Guess the name of an elisp ...
1
vote
1answer
333 views

How to debug the “message” function on entry ?

While debugging a minor mode (separate issue), I wanted to generate a stack trace of the message function so I thought I would just enter M-x debug-on-entry RET message I was quite surprised to see ...
2
votes
1answer
480 views

How can I delete all the gdb related windows/buffers after `q` in gdb CLI window

I use (setq gdb-many-windows t) and (setq gdb-show-main t) configurations in my init.el, so after executing M-x gdb, there will be six windows in the frame, after typing q in the main gdb cli window ...
15
votes
3answers
3k views

Show line number on error

Say that emacs throws some error that I don't understand. Or maybe the error says "Symbol's value as variable is void: modes", but there are many occurrences of the symbol modes in my code, so I need ...
1
vote
0answers
226 views

Unable to get backtrace for error

I have installed paredit & need to turnoff smartparens. I checked this answer and I have added (advice-add #'smartparens-mode :before-until (lambda (&rest args) t)) to my prelude starter ...
3
votes
0answers
512 views

Emacs typing backwards

So, sometimes when I go into a buffer that has a [ as the first character (such as .ini files) emacs suddenly starts typing everything backwards. In other words, if I press the keys y e s I get out s ...
0
votes
2answers
132 views

move-beginning-of-line broken in comint mode

After a while running emacs (typically days) all comint buffers start to behave strangely (shell, python, SQL). The ones I have already opened and the new ones that I open. When I am after prompt, C-...
1
vote
1answer
335 views

restclient errors “failed with code 111”

When I run GET http://localhost/ with restclient.el, I get the following error in the *Messages* buffer: GET http://localhost:80/] Contacting host: localhost:80 error in process sentinel: restclient-...
2
votes
1answer
249 views

Debugging a “binding stack not balanced” bug?

I'm trying to figure out how to approach a bug I've run into. I assume it's actually a bug in Emacs, but I don't know the right way to make headway with it. In short, I'm getting the message "binding ...
13
votes
2answers
1k views

How to kill a buffer when it causes Emacs to stop responding? [duplicate]

I use Emacs Dired to manage files. Accidentally, I hit Enter on an image file, Emacs tries to open the image and stop response. Is there a way to kill this process? (Since I am running other ...
10
votes
1answer
575 views

Find elisp origin of warning

I ran a command and received a warning in the minibuffer. The exact warning was comint-completion-at-point failed to return valid completion data, after I autocompleted a command in shell-mode. How ...
9
votes
1answer
987 views

How to compile emacs with debug symbols?

I'm having trouble walking through emacs source code in gdb. I think I'm missing debug symbols. Following a suggestion from https://stackoverflow.com/a/4298982/2752242, I tried: ./configure CFLAGS="...
17
votes
1answer
674 views

Interrupt evaluation and observe current stack in the emacs-lisp debugger?

If some emacs-lisp function, such as a major mode hook, is taking longer than expected to execute, I would sometimes like to interrupt it and look at the current stack. Ideally, I'd also like to be ...
2
votes
1answer
1k views

“Error in process sentinel: Selecting deleted buffer” when exiting Emacs?

I am getting the following message when I do C-x C-c to exit Emacs: error in process sentinel: Selecting deleted buffer So instead of exiting Emacs like normal, I am forced to close it through ...
10
votes
1answer
295 views

How to debug errors in sentinels and during font-lock

When an error occurs inside a process sentinel or during font-locking, then Emacs doesn't show a backtrace even though debug-on-error was previously enabled. I understand why these errors are caught, ...
4
votes
1answer
273 views

Why did I get an error message: wrong-type-argument stringp user-init-file

I have (set-register ?E '(file . user-init-file)), so that I can easily jump to my config file. Previously I used a string to specify the path to my init file, but I figured I'd tidy it up a bit. ...
0
votes
1answer
30 views

Scrolling seems to add an unwanted chunk into my kill ring

Anybody know why this may be occurring? Here is an outline of how I recreate the issue... I copy or kill something to my kill ring. I scroll up or down with the mouse. I then yank and get an ...
2
votes
1answer
527 views

Debugging server related warning message

I've been seeing this issue for some time now, but I don't know how to debug it. I start up a emacs instance, using say emacs foo.tex & Then I run C-c C-c to compile. A new window pops open, ...
3
votes
0answers
691 views

Why doesn't auto-complete work in ruby-mode?

I have spent several days trying to debug auto-complete, it is working properly in Elisp mode, but when I go in Ruby mode it stops working. auto-complete-mode runs successfully, but the menu of ...
1
vote
1answer
205 views

How do I make a bug report or feature request against GNU Emacs? [duplicate]

I found this list at the emacswiki: FFI (foreign function interface). Would be great to have this in GNU. Enhanced Numerics. We sorely need this too. Apparently much better multimedia support (Of ...
2
votes
1answer
244 views

Make comint-mode behave more like term-mode

I am constantly getting frustrated with the GDB comint-mode buffer when using GUD. Somehow my cursor always ends up straying from the bottom of the buffer, and then my input is not interpreted how I ...
6
votes
3answers
3k views

How to debug startup problem, if `--debug-init' has no effect

When I launch Emacs24 (in an Ubuntu machine) I get an error message in the init procedure. Warning (initialization): An error occurred while loading `/home/nivaca/.emacs': But when I launch it with ...
2
votes
1answer
419 views

Show breakpoints when debugging Matlab

I am using matlab-emacs to debug a matlab script from inside of emacs with GUD. Everything seems to be working as expected except that I don't see any breakpoint indicators in the fringe. This is ...
43
votes
2answers
5k views

Debugging a frozen Emacs

I am using mew for my e-mail. I need to use TLS with my email provider for SMTP. However, when I try to invoke that, Emacs freezes. I would like to take this opportunity to learn more about Emacs ...
47
votes
9answers
23k views

Using Emacs as a full-featured C/C++ IDE

I have been trying off and on for over a year now to use Emacs as a C/C++ IDE. I have only been marginally successful thus far, but have run into a few brick walls along the way. Currently I am ...
7
votes
2answers
635 views

How to debug Helm

I am having some trouble with helm, so I have set debug-on-error in an effort to locate the problem. Now whenever the problem occurs, the *Backtrace* buffer appears as expected, but I am still in one ...
2
votes
2answers
2k views

“Symbol's value as a variable is void: defun” when reloading .emacs?

I am always editing my .emacs file, and I was just wondering if I could reload it without restarting Emacs? Note: I have tried M-x load-file and choosing the .emacs file, but I get this error ...
9
votes
2answers
728 views

Better debugging of crashing Emacs?

Although Emacs (24.3.93.1) runs fine if launched from the Finder, if the terminal version is launched: /Applications/Emacs.app/Contents/MacOS/Emacs -nw Emacs crashes with: Fatal error 11: ...