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
1 vote
1 answer
26 views

doremi: previous event triggering an error

In this example, the function doremi https://www.emacswiki.org/emacs/DoReMi seems to be encountering a problem due to the previous input. Based upon that assumption, I have tried calling discard-...
lawlist's user avatar
  • 19.1k
0 votes
0 answers
41 views

What is "member" and why does it expect to find an `org` directory in my home directory?

Faced with some org-agenda problems, I tried this: Blow away all emacs config that I know about .emacs .emacs.d .spacemacs .spacemacs.d Follow spacemacs install docs from scratch (checking out ...
Croad Langshan's user avatar
0 votes
0 answers
148 views

Void variable company-active-map

I am getting a weird void variable error despite using what I thought would be a very appropriate with-eval-after-load. Here is my company config. (use-package company :commands (company-complete-...
jds's user avatar
  • 177
0 votes
1 answer
33 views

Emacs GNUS Fullscreen Article, Args out of range: 0

I'm trying to get GNUS to show article fullscreen after select on summary screen. I found out about gnus-buffer-configuration variable where is configuration of how screen should by displayed. I also ...
tino415's user avatar
  • 13
0 votes
2 answers
200 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 ...
baezacaljo's user avatar
1 vote
0 answers
39 views

How to trigger debugger on emacsclient error

I asked in a prior question about what might be causing my emacsclient widows to shutdown immediately with the following output on stderr: "ERROR: Beginning of buffer". I have tried to use ...
Daniel Doherty's user avatar
0 votes
1 answer
96 views

Different behavior between M-! and a terminal?

I'm writing a major mode to interface with a popular but clunky Monte Carlo program. I've also written a script that makes the interface a little more tolerable, and have written the following simple ...
Duncan W's user avatar
  • 113
0 votes
0 answers
192 views

Debugging Issue: After Updating Emacs Input Lags Massively

After updating Emacs, I am seeing incredibly lagging input performance. I thought the slowness was due to LSP, but it seems to persist even when I disable LSP-mode. Unless I disable all major and ...
clo_jur's user avatar
  • 101
0 votes
1 answer
203 views

dap-mode cpptools gives error `VTerm needs module support`

I am trying to use dap-mode to debug my C++ code. My debug template looks like: (dap-register-debug-template "cpptools::Run Configuration" (list :type "cppdbg" :request ...
Lucas Myers's user avatar
0 votes
3 answers
111 views

Why am I getting this error, saying that a comma is not a function?

In a related thread https://emacs.stackexchange.com/a/34336/2287, a string (containing JSON data) is converted using json-read-from-string. The value returned in that example looks like this: ((1 ...
lawlist's user avatar
  • 19.1k
0 votes
0 answers
28 views

Emacs displays letters and spaces as newlines until a non-letter/space char is entered

I am editing a C file, and it suddenly starts moving to a new line instead of showing the character I typed. This seems to be for letters and space. However, it has saved the characters, and if I type ...
Bill Purvis's user avatar
0 votes
1 answer
40 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) ...
Anders Kitson's user avatar
4 votes
0 answers
546 views

How to use dap-mode with TypeScript?

https://github.com/emacs-lsp/dap-mode provides DAP debugging for various languages (along the same lines as LSP does for completion, formatting, etc). How can I use that to debug programs written in ...
Croad Langshan's user avatar
2 votes
0 answers
67 views

How to save a Slime Debugger buffer into a file, preserving all its data?

I am using Common Lisp, SBCL, Emacs, and Slime. Often, an error will happen while programming. When an error occurs, Slime opens a Debugger buffer. Sometimes, I would like to save this debugger buffer ...
Pedro Delfino's user avatar
1 vote
1 answer
62 views

How to automate the test step in "debugging by bisection"?

Sometimes I run into a problem with Emacs that goes away if invoke Emacs with the --no-init-flag. In other word, I can deduce that the problem in question is caused by code somewhere in my .emacs file....
kjo's user avatar
  • 3,247
0 votes
2 answers
723 views

How to debug error in process sentinel?

I've recently switched to doom emacs, and for the most part it's working great. However, when I'm looking at a folder in dired-mode, if I copy a file using C the file is copied but *Messages* contains ...
Richard Corden's user avatar
1 vote
2 answers
207 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. ...
Pablo's user avatar
  • 313
2 votes
0 answers
36 views

Debugging for Elisp threads?

Let's say some package does (make-thread (lambda () (message "Started thread.") (error "Fit happens.") (message "Finished thread."))) Regardless of M-x ...
kdb's user avatar
  • 1,561
0 votes
1 answer
296 views

Julia mode in MacOS

I updated my macOS from Big Sur to Monterey and found that my julia command does not work. Specifically, I use the following init.el. So far, I could send line using C-return but, now I got a message &...
hrkshr's user avatar
  • 143
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-...
David Feest's user avatar
0 votes
0 answers
99 views

`void-variable: Symbol’s value as variable is void: v` when deleting remote directory in dired

This recently started happening. Whenever I try to recursively delete any remote directory from dired (i.e. D over the dired entry), I get this after Emacs asks me for confirmation: void-variable: ...
Romário's user avatar
  • 143
1 vote
1 answer
129 views

`while` is hanging

(defun test (n) (let ((list1 ())) (while (< (length list1) 10)) (push (random n) list1) list1)) I'm trying to add (random n) to list1 while the length of list1 is ...
zeynel's user avatar
  • 371
3 votes
1 answer
362 views

What's this `slot-missing: Invalid slot name: "#<forge-database forge-database-156f3376b4d8>", :file`

I somehow messed up my magit/forge db, and now emacs won't forgive me. Now I can't open magit's status buffer, and sometimes not even a file buffer opens. This is all I can gather from the Messages ...
philsf's user avatar
  • 215
2 votes
1 answer
119 views

Find out where "Text is read only" coming from

My workflow involves converting a huge generated org-mode document that is created in a read only buffer and is automatically put together. When trying to export it to latex, sporadically I get the &...
fakedrake's user avatar
  • 141
0 votes
1 answer
94 views

debugging why emacs is autoformatting on save hook

I'm currently facing an issue where I am trying to save a file, but some save hook is triggering an auto formatting the file in a way that I do not want. I am not sure how to debug this issue. Ideally,...
clo_jur's user avatar
  • 101
3 votes
1 answer
139 views

shell-resync-dirs hangs

When I run shell-resync-dirs 1, the function hangs, until I press C-g, at which this point, what looks suspiciously like the output of my shell's dirs -l command 2 gets inserted into my buffer at ...
kjo's user avatar
  • 3,247
1 vote
1 answer
53 views

How are program arguments handled when a program/script is launched from Emacs?

I often find myself wondering how people handle program arguments when they are developing with Emacs. Let's say we have a Python script test.py and launching it requires supplying arguments, e.g. --...
Lennart Van der Goten's user avatar
1 vote
0 answers
107 views

Error sending mail via mu4e

I get the following error after sending mail via mu4e: Error (message-sent-hook): Error running hook #[0 "\301\302\303 !\207" [mu4e-sent-func mu4e-sent-handler mu4e~proc-sent buffer-file-...
Sati's user avatar
  • 775
2 votes
0 answers
228 views

package-load-descriptor: End of file during parsing

I've encountered this error on an Arch Linux system running Emacs-27.2. I sync my Emacs ~/.config/emacs/init.el which calls a host of other files located under ~/.config/emacs/settings/*-settings.el ...
slackline's user avatar
  • 335
1 vote
1 answer
123 views

Emacs 27: How to jump to backward found word when switched into reverse incremental search?

I am trying to apply following solution(How to jump to backward found word when switched into reverse incremental search?) into Emacs >27.1, (which works in emacs 26.3): (define-advice isearch-...
alper's user avatar
  • 1,350
0 votes
1 answer
156 views

New `wrong-number-of-arguments` error from `desktop-change-dir` and other commands

(This has started happening with other commands too, but I don't remember which.) Previously when I ran M-x desktop-change-dir I would be prompted to enter a folder, whereupon Emacs would load the ....
Jeffrey Benjamin Brown's user avatar
2 votes
1 answer
137 views

How to find the function that is run after cursor is moved?

I am working with a highly customized emacs configuration that is not built by me and it highlights all the words in the buffer that match the word under the cursor. How to find the function that ...
Talespin_Kit's user avatar
0 votes
1 answer
121 views

"inspect element" for GUI elements?

Is there a way to "inspect elements" for Emacs? e.g. In Firefox, I would open the developer tools, select this icon: Then pick an element on the page to get information on it. For an ...
Jay's user avatar
  • 103
5 votes
1 answer
229 views

Function add-variable-watcher does not watch "last-command" variable

I have added a watcher function to watch the last-command variable. (defun my-watch (symbol newval op where) (message "Hello")) (add-variable-watcher 'last-command #'my-watch) The ...
Talespin_Kit's user avatar
0 votes
1 answer
287 views

gdb input/output buffer not working

I start gdb (with many-windows) through projectile-run-gdb but stdin/out is not displayed in the input/output buffer. And I have no clue where to look for the issue. Google search did not bring up any ...
clanghans's user avatar
1 vote
1 answer
126 views

How to automatically open the debugger whenever `kill-buffer` is invoked?

I'm using Elpy for Python development, and when I run code with C-c C-c the source buffer closes -- which I don't want. Have to constantly reopen. One idea is to set a breakpoint in kill-buffer - ...
patfla's user avatar
  • 11
0 votes
0 answers
180 views

Cannot navigate to recent projects in emacs dashboard: "Symbol's function definition is void: nil" error

Recently, I have not been able to open any of my recent projects that show up on the dashboard screen (package emacs-dashboard). If I move my cursor over one of the projects and press enter nothing ...
johnymm's user avatar
  • 163
1 vote
1 answer
60 views

Why is Emacs Entering the Debugger despite a condition case wrapper?

The context of my question: I was editing some clojure code, and point was inside a comment, and to the right of three characters: `abc'. I ran the command: M-x company-diag, to ask company mode for a ...
Lyn Headley's user avatar
4 votes
1 answer
376 views

Emacs elisp debugger: How do i make the debugger jump to source when i press s?

The builtin elisp debugger (i.e. the regular one, debug, not edebug) has a default binding of s to command backtrace-goto-source. When I try to use it, it says: Source code location not known You can ...
nate's user avatar
  • 63
5 votes
1 answer
851 views

Is there any way to get the memory size (usage) of a Lisp variable/value?

Basically sizeof for lists, hashmaps, etc., with nested structures. I could of course disable garbage collection and then compare numbers from memory usage functions before and after allocation, ...
aaa's user avatar
  • 436
0 votes
1 answer
259 views

Can't disable font-lock-mode

If I have font-lock on and I do M-x find-library RET simple RET, I have colours: If I then M-x font-lock-mode to disable the mode, the colours disappear in the currently-visible portion of the buffer:...
HappyFace's user avatar
  • 830
3 votes
1 answer
172 views

How to debug an Emacs that stops taking input and needs to be restarted every few hours, but doesn't throw any errors

I've been having a problem lately where every few hours of use, for some reason I don't understand, Emacs stops responding to input without throwing an error. C-g and Esc-Esc-Esc do nothing, so I'm ...
Zorgoth's user avatar
  • 840
0 votes
0 answers
2k views

Why am I getting Wrong type argument: stringp, nil?

What's wrong here ? It gives me the error Wrong type argument: stringp, nil. (let* ((filename (file-name-nondirectory buffer-file-name)) (executable (file-name-sans-extension filename))) (...
Brownie Bryan's user avatar
3 votes
1 answer
536 views

"#+STARTUP: hideblocks" won't work. Can't find offending package/setting

After I upgraded to Org Mode 9.4.5, I learned about the startup option hideblocks, but it won't work as advertised for me. OK, when I start emacs with the flag -Q, it did, so I went hunting for ...
user4311624's user avatar
0 votes
0 answers
52 views

query-replace within LaTeX/Math

The answer below was taken from https://stackoverflow.com/a/44913296. This is the most upvoted answer there. Unfortunately, after running the code (for example by replacing q with \theta) one ...
Name's user avatar
  • 7,829
0 votes
1 answer
279 views

emacs crashes at least 10 times a day

9 out of 10 times it happens when invoking magit with C-x g. I noticed (sometimes) pressing 'g' for refresh inside a dired buffer crashes too. There's no error shown. My -nw emacsclient just lands in ...
american-ninja-warrior's user avatar
2 votes
1 answer
482 views

Emacs hangs/crashes when opening files with special unicode characters, does not crash with -nw

I'm using Arch Linux, i3wm and emacs 27.1, and I'm having an issue where emacs hangs when opening certain files, but I can't seem to find a pattern as to which files cause the hang. When emacs hangs, ...
Joseph Morgan's user avatar
4 votes
0 answers
2k views

Emacs won’t access Documents directory on MacOS Big Sur

I am running Emacs 26.3 on MacOS 11.2.1 “Big Sur”. When I try to open the directory ~/Documents, it fails with the message “Listing directory failed but ‘access-file’ worked.” Emacs.app is given ...
Mikelis Bickis's user avatar
0 votes
1 answer
106 views

void-variable battery-status-function [duplicate]

I'm trying to set up a custom battery indicator in the mode line and I'd like to use the battery-status-function variable defined in battery.el, which is a part of emacs. However, I cannot use it in ...
Tyler Grinn's user avatar
2 votes
1 answer
352 views

Portacle Emacs C-c C-c stopped working

I am a beginner Lisp programmer and new to Emacs. I work on Portacle. I must have done something because when I press C-c C-c to compile a function in a buffer I get: C-c C-c is undefined. This worked ...
user2319244's user avatar

1 2
3
4 5
11