Questions tagged [debugging]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
199 views

Font issues using monokai on emacs 27.2 on WINDOWS 10

Hello guys i am experiencing some font issues using the theme monokai on windows 10 and emacs 27.2. Emacs seems to compile everything quite nice even there are not error and warnings. However, when i ...
0 votes
1 answer
71 views

debugging helm-bibtex cannot open PDF with the default emacs viewer

I cannot get helm-bibtex open pdfs from the helm-bibtex buffer with all bibliography nicely listed in an organized view showing which reference has a pdf or not. I usually get this view by M-x helm-...
4 votes
1 answer
431 views

Why is emacs freezing and how can I prevent it? (likely involving org agenda)

What would cause emacs to "mostly" freeze when creating an org agenda? I say "mostly" because when you type C-g, it does show "Quit" in the minibuffer, and the time logging number in the minibuffer ...
3 votes
1 answer
603 views

toggle-debug-on-error only works for the first error, how can i fix this?

when I enable debug on error it works perfectly the first time. when I go and fix my error and rerun my function debug on error no longer triggers for new errors. Is there a way to enable it so ...
0 votes
1 answer
85 views

Auctex 14.0.2 returns errors on (wrong-type-argument number-or-marker-p nil) in run-hooks when opening tex files

Similarly to this thread since upgrading to AUCTeX 14.0.2 there are errors when I open TeX files. This seems to be a different issue though, since the AUCTeX version is different and the toggle-debug-...
0 votes
1 answer
52 views

line-move-1 in temp buffer, sometimes results in unexpected point

I have some code that loads a file into a temp buffer and tries to do some sub-string operations on the temp buffer. But I have noticed that the same code and file sometimes gives different results ...
0 votes
2 answers
238 views

How do you troubleshoot an .el file not loading even though it's on load-path filepath?

I've copied a file to a path that's definitely listed in load-path symbol. But the file doesn't get loaded when running emacs with --debug-init flag. How would you find out what causes it? It uses ...
0 votes
1 answer
42 views

"Function provided is already compiled" - php mode

I get "Function provided is already compiled" in minibuffer whenever I enter php-mode. Why and how to fix it? Debian bookworm, Emacs 28.2, php-mode 1.24.2. EDIT This is the backtrace @phils ...
2 votes
1 answer
310 views

Thumbnails not displaying with image-dired

Background: I recently found out about image-dired, so I'm playing around with it and trying to get it to work. It seems to mostly work, but when I image-dired into a directory (we'll call it ~/...
0 votes
1 answer
87 views

inludegraphics macro does not ask for width etc. but only for llx, lly

Using GNU Emacs 26.3, I have a tex file with \usepackage{graphicx} and AUCTeX enabled. However, inserting a includegraphics macro does not prompt for the optional arguments defined in graphicx.el ...
0 votes
1 answer
18 views

Why can a function change behavior after instrumenting edebug on it 1 time?

I have a function that's broken until debugging: it returns nil which it shouldn't. After I flag it for debug and unflag it, it works correctly from then on. Why?
7 votes
1 answer
4k views

How to debug C++ (dap-mode + LLDB or GDB)

I want to use dap-mode to debug a C++ code. Until now I followed instructions dap-mode (LLDB) and lldb-vscode. I further enabled the mode and UI via (dap-mode 1) (dap-ui-mode 1) When I execute dap-...
1 vote
2 answers
203 views

dired-do-delete fails to delete file

In Dired, with point on a file name, I invoke dired-do-delete and confirm. The line disappears, as it normally does when a file is deleted. But the file is not in fact deleted, as I can see by e.g. ...
2 votes
2 answers
199 views

I can't run gdb in emacs

I want to debug some C++ code in emacs with gdb. I tried to enter gdb with the command: M-x RET gdb RET Then I get a prompt that reads: Enable debuginfod for this session? (y or [n]) Whatever I type,...
0 votes
1 answer
39 views

Trying to auto load these packages in Clojure files, they worked the first time but don't work anymore

I have the following function to auto start raindow-delimters and paredit (defun my-lisp-hook () (enable-paredit-mode 1) (rainbow-delimiters-mode 1)) (add-hook 'clojure-mode-hook 'my-lisp-hook) ...
0 votes
1 answer
71 views

Where is pixel-scroll-precision-use-momentum described in more detail?

Precision scrolling in Emacs 29 introduces several variables to control the momentum effect while scrolling. Are these terms defined anywhere in more detail, possibly by using a formula or two to ...
5 votes
1 answer
149 views

Unable to load color "#FFFFFF" (mouse-face)

Using Emacs 27.1 (mac port, BigSur), I get a strange behavior when I set the mouse face color using an hexadecimal description. Running emacs -Q -l show-bug.el, with show-bug.el being: (font-lock-mode ...
1 vote
0 answers
63 views

How to run a function when a variable is accessed/read in Emacs Lisp?

I'm trying to find a way to run a function whenever a specific variable is accessed or read in Emacs Lisp. I want to know which functions are using this variable, but I don't know them beforehand. I'm ...
0 votes
1 answer
39 views

Edebug Backtrace keeps disappearing

Has anyone found any way to step through the code using edebug and see how variables change on each step in the backtrace? On my emacs each time you run edebug-next-mode backtrace disappears and you ...
0 votes
1 answer
149 views

code execution issue in org mode on windows

I issue emacs -Q yes.org where yes.org is (org-babel-do-load-languages 'org-babel-load-languages '((python . t))) #+begin_src python :results output print(2) #+end_src I first evaluate the loading ...
2 votes
2 answers
192 views

How to make buffer recognize file moved?

Here's a simple use case: I open bar/foo/file in a buffer and I'm working. In eshell, I do mv bar/foo/file bar/baz/foo/file. Now emacs can no longer recognize where to save and doesn't save it ...
1 vote
1 answer
408 views

the following functions might not be defined at runtime: lsp-format-buffer, lsp-organize-imports function ‘dap-go-setup’ is not known to be defined

I 've below emacs init file config setup I'm getting below error in the emacs startup. I don't know what might be the root cause of the issue the following functions might not be defined at runtime: ...
4 votes
0 answers
2k views

Emacs sometimes fails to save files

I'm experiencing a weird problem with Emacs on Windows where sometimes, after a while, the current buffer I'm in throws an error when attempting to save the file. I can't seem to reliably reproduce ...
2 votes
0 answers
38 views

how to find why emacs crashes?

From time to time my emacs 29.1 crashes. This happens essentially when using one of the menu items. Fatal error 11: Segmentation fault Backtrace: emacs(+0x1b0c56)[0x56406d61bc56] emacs(+0x4bdbe)[...
0 votes
0 answers
14 views

(scan-error "Unbalanced parentheses" 1 1) when stepping forward in Edebug

Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 1 1) scan-lists(41 -1 -1) down-list(-1) edebug-step-out() edebug-forward-sexp(1) funcall-interactively(edebug-...
0 votes
1 answer
18 views

Symbol's function definition is void: ergoemacs-theme-option-on

This page of ergoemacs-mode documentation tells about ergoemacs-theme-option-on function that can disable some optional keybindings. When I try to use this function emacs throws an error. Besides this ...
1 vote
1 answer
107 views

"Invalid version list `(4 5 -4 414)'" when running `M-x package-list-packages`

When following a suggestion for solving another problem, I'm doing M-x package-list-packages. However, that gives me the error message Invalid version list `(4 5 -4 414)'. What does this mean, and ...
0 votes
1 answer
123 views

(wrong-type-argument stringp nil) error when calling tangle

As the title says, I get this error whenever I, or the function I'll show below, call org-babel-tangle. I'm using a org file to configure emacs, which tangles every time it is saved to my init.el. The ...
0 votes
1 answer
30 views

`term` often gets filled with random character codes, any suggestion on how to fix it?

I'm running doom emacs, and here's an example of a command I ran and the resulting output. For some reason, term gets filled with these random character codes. Any suggestions on how to fix this?
0 votes
1 answer
139 views

I got an error: Package 'tabbar-20160524' is a system package,not deleting

I installed spacemacs using "git clone https://github.com/syl20bnr/spacemacs.git ~/spacemacs/.emacs.d" but I got an error: Package 'tabbar-20160524' is a system package,not deleting.... When I ...
1 vote
1 answer
223 views

How to debug my init.el if --debug-init does not help?

Despite having --debug-init in .xinitrc (exec dbus-launch --exit-with-session emacs --debug-init), I'm not getting any leading details on this error. Error in dotspacemacs/user-config: Symbol’s value ...
0 votes
1 answer
142 views

emacs 26.1 "Symbol’s function definition is void: bibtex-completion-candidates-formatter"

I have updated to Emacs 26.1. and reinstalled all packages. When running helm-bibtex, the bibliographies are loaded, but then the process terminates with the following error message: helm-bibtex-...
0 votes
1 answer
396 views

emacs org-mode error during installation in windows

While I try to install org-mode using M-x package-install RET org RET, I am getting the following error. I am new to both emacs and org-mode and using Windows 10. Debugger entered--Lisp error: (void-...
1 vote
1 answer
1k 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 ...
3 votes
1 answer
934 views

trace-redisplay: How to see stderr from within Emacs?

When building Emacs, I use ./configure --enable-checking='glyphs' so that I can take advantage of some of the built-in tools such as M-x trace-redisplay. The redisplay debugging messages can be seen ...
2 votes
2 answers
177 views

How to log backtrace to a file instead of popping it up and blocking following backtraces

With emacs if there is a backtrace buffer open, new backtrace is ignored. I find it is unconvenient when I am trying to find out which function/hook changes a variable. I use debug-watch as described ...
1 vote
1 answer
40 views

Check value of local variable assigned with let/let* editing org-export functions

On my way learning emacs and doing some first steps in elisp programming, I'm trying to adapt the LaTeX output of org-export. It's a lot learning by doing and that's a good thing since it improves my ...
0 votes
1 answer
43 views

Conversion from html to org-mode error: *** Eval error *** Wrong type argument: listp, " "

I tried to build a small converter which will traverse the dom-tree and output its org-mode equivalent but I faced a *** Eval error *** Wrong type argument: listp, " " error means the ...
0 votes
1 answer
16 views

helm-projectile-recentf, "Can't rotate non image file"

When I hit M-r to get an exact match, helm-projectile-recentf, I get: Debugger entered--Lisp error: (cl-assertion-failed ((and (file-exists-p file) (string-match (image-file-name-regexp) file)) "...
0 votes
1 answer
68 views

How to watch variables in gdb?

Is there any buffer in emacs' gdb that can print selected variables (e.g. print *display) on each change (step, next, finish etc.)? It would be useful as opposed to typing print variable each time.
3 votes
1 answer
317 views

Org mode babel hangs with python C-c C-c

When I C-c C-c in a Python code block in Org mode: #+BEGIN_SRC python :results value :session a = 4 a + 13 #+END_SRC It hangs with a message: Warning (python): Your ‘python-shell-interpreter’ ...
0 votes
0 answers
28 views

Enter debugging mode on next action

I have a problem with my screenshots not showing in my org-file in emacs 29 If I click on attachment link an empty buffer opens. I would like to investigate the problem. I would like to start by ...
0 votes
1 answer
269 views

"Error (frameset): Wrong type argument: number-or-marker-p, nil" How to debug it?

Such a message in the "Warnings" window. "Frameset" I think refers to the .emacs.desktop file. I got this message when Emacs in daemon mode restored the desktop. There is no such ...
0 votes
0 answers
51 views

dired-sidebar not working

My dired-sidebar no longer works. For the commands dired-sidebar-toggle-sidebar and dired-sidebar-show-sidebar they both give: Wrong type argument: stringp, (Git "~/") Anyone know the ...
0 votes
2 answers
35 views

How to troubleshoot: `other-buffer` suddenly begins to ignore some buffers

With increasing frequency, my Emacs session's function other-buffer begins to malfunction. Specifically, at some point, and for no reason I can discern, other-buffer stops "seeing" some ...
0 votes
0 answers
32 views

Single stepping through shell script

Is there an emacs package that would enable single stepping through a shell script, or some facility for setting breakpoints or viewing variables?
1 vote
1 answer
91 views

Help me get Scala source blocks working in org mode

UPDATE: This issue was fixed for me by changing my version of scala from scala 3 to 2.13, as recommended by NickD in the comments below. END UPDATE When I attempt to evaluate Scala source blocks in ...
0 votes
0 answers
66 views

Buffers sporadically not updating

I'm having a very difficult time diagnosing this problem. Essentially, sometimes a buffer will not update without user interaction. For example, with a terminal buffer (the shell/term/package used ...
-1 votes
1 answer
292 views

How can we get input using emacs?

In order to compile my lua code i use this config (defun lua-main-compile () "use lua to compile my lua code" (interactive) (compile "lua main.lua")) In my lua code ...
0 votes
0 answers
37 views

How to fix "cd: Wrong type argument: stringp, nil" error?

I use org-babel-tangle to generate latex documents from org files. These org files have the following first line: #+PROPERTY: header-args :latex :comments org :tangle PATH/FILE_NAME.tex I built a ...

1
2 3 4 5
11