Questions tagged [debugging]
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program.
515
questions
1
vote
1
answer
112
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-...
0
votes
1
answer
112
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 ....
2
votes
1
answer
118
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 ...
0
votes
1
answer
103
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 ...
5
votes
1
answer
164
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 ...
0
votes
1
answer
187
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 ...
1
vote
1
answer
111
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 - ...
0
votes
0
answers
99
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 ...
1
vote
1
answer
50
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 ...
4
votes
1
answer
264
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 ...
4
votes
1
answer
664
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, ...
0
votes
1
answer
200
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:...
3
votes
1
answer
122
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 ...
0
votes
0
answers
1k
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)))
(...
2
votes
1
answer
377
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 ...
0
votes
0
answers
48
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 ...
0
votes
1
answer
232
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 ...
2
votes
1
answer
313
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, ...
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 ...
0
votes
1
answer
83
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 ...
2
votes
1
answer
265
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 ...
4
votes
1
answer
1k
views
How do I solve `Lisp error: (void-function -compose)` when using lsp-dart?
When I load a Dart file with GNU Emacs 27.1-1 for OS X I get the following little error novel.
Debugger entered--Lisp error: (void-function -compose)
(-compose #'lsp--client-path->uri-fn #'lsp--...
0
votes
1
answer
361
views
Tramp hangs indefinitely when using doas on Linux
Tramp works fine when I try to edit with sudo or ssh, but when I try to edit with doas it will hang (while also maxing out my cpu). Here is some tramp output:
backtrace()
tramp-signal-hook-...
1
vote
0
answers
268
views
How can one debug a situation when emacs is unresponsive on Windows?
There is an operation in my setup which makes emacs unresponsive with high CPU.
I checked the emacs process with process monitor, but it does not wait for an other process, so I guess it must be ...
0
votes
1
answer
82
views
Debuggable emacs and vanilla emacs binaries
I'm running Ubuntu 20.04.
I would like to build an emacs binary for general usage (no debug symbols) and
another emacs binary (when something goes wrong). The build is pretty straight-forward, but I ...
0
votes
0
answers
169
views
How to debug emacs config / need to rerun org-mode after startup
I run emacs on Windows and I start with this command:
C:\path-to\emacs.exe -q --load "C:/path-to-git-tracked-config-folder/.emacs" --debug-init
Emacs starts without error from --debug-init.
...
0
votes
0
answers
447
views
org-capture: Capture abort: Wrong type argument: stringp, org-main-file
I know this error has come up here before, but none of the answers thus far have been able to help me and no amount of googling has got me anywhere. I've been using org-capture-templates for quite a ...
0
votes
1
answer
71
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
0
answers
55
views
savehist-mode: Lisp error: (void-variable pell-buffer)
I am using GNU Emacs 26.3 in macOS. For (savehist-mode 1) I keep getting following error:
Debugger entered--Lisp error: (void-variable pell-buffer)
signal(void-variable (pell-buffer))
savehist-...
3
votes
0
answers
1k
views
`wrong type argument: number-or-marker-p, nil` after upgrading auctex
After upgrading to auctex-13.0.1 I am getting the error wrong type argument: number-or-marker-p, nil whenever I try to compile a latex document in emacs.
Activating toggle-debug-on-error and issuing C-...
0
votes
0
answers
612
views
Custom theme problem - invalid face underline
I have a problem with creating my own custom theme. I'm new to doing this and my elisp knowledge is minimal.
I've used the customise-create-theme option and it was working well but it seems that at ...
1
vote
0
answers
48
views
Cannot call use-package on Emacs master
I can't use use-package with Emacs master. How can I find out why this is?
For me, all calls (via eval-last-sexp) to use-package fail as
Error (use-package): Cannot load X Disable showing Disable ...
0
votes
1
answer
169
views
emacs 27 (lucid toolkit) daemon crashes every couple of minutes
Some variant of this has been asked before - emacs daemon crashing when it has been built with Gtk3 etc - but I couldn't find any solution to this.
I've built Emacs 27.1 from source on Xubuntu 20.04 ...
1
vote
0
answers
307
views
emacs27 : Depends: emacs27-common but it is not going to be installed
I has Emacs 25.3
emacs -version
GNU Emacs 25.3.2
Copyright (C) 2017 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms ...
0
votes
0
answers
394
views
Function: "Symbol's function definition is void" until I C-h C-f its definition, then works fine
I've defined a function that uses popup-tip. On startup, if I call the function, I get the error, Symbol's function definition is void: popup-tip. If I call Ch Cf for popup-tip, I can find the ...
2
votes
1
answer
179
views
Error when first launching Spacemacs in macOS 11.0.1
I am trying to learn Emacs. I successfully installed it and went through the built-in tutorial. I thought that installing Spacemacs would be nice so I gave it a try.
I followed a tutorial and now I am ...
1
vote
1
answer
306
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: ...
1
vote
0
answers
17
views
Help using compilation-mode or similar to use next-error to navigate bash debug output
Using "set -x" in bash script, outputs each executed command to an ouput file. eg here is part of the bash script
#!/usr/bin/env bash
# This is called by (my) .xinitrc, xdm and _should_ be ...
5
votes
1
answer
133
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
1
answer
121
views
Log Tramp traces to a file
I am experiencing some Emacs Tramp connection problems and want to ask for help. However in my case Emacs hangs completely because of Tramp and there is no way I can access Tramp debug files. (it is ...
0
votes
1
answer
243
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
38
views
Link broken in inline comment
[[link]]@@comment:[[link]]@@
# [[link]]
* link
I get the message "No Link Found" when clicking on the [[link]] within the inline @@comment:[[link]]@@.
The link works fine with emacs -Q, ...
1
vote
1
answer
137
views
How to modify a file you're debugging with realgud
I understand mechanically from here:
debugging: how to optimize a RealGUD workflow
How to edit code in the source window using realgud?
I can use C-x C-q to disable read-only mode on the python file ...
0
votes
1
answer
79
views
Realgud to default to my most recent python executable
When I run realgud for python debugging, with:
M-x realgud:pdb
I see this prompt:
Run pdb (like this): python -m pdb /home/username/work/place/scratch.py
I'm using a conda environment installed in ./...
1
vote
1
answer
475
views
gdb over ssh via tramp fails (but gdb-gud works?)
I am running into an issue where the gdb command fails over tramp. The remote host is a simple linux box I am accessing via ssh. Even when I run emacs without my init file it still happens.
Emacs 27....
0
votes
1
answer
281
views
How can I get holding down the spacebar to work as expected
When I am editing text, if I press and release the spacebar it works as expected. However, if I hold down the spacebar I get the following message in the echo area.
<Hangul> is undefined
I saw ...
0
votes
1
answer
118
views
How can I stop iso-transl running
I have run the macport emacs 27 on macOS.
The bindings of my keys as as per mac-keys-mode (and aquamacs) and have Command key acting as alt.
Thus all my key bindings are A-key
This normally works.
...
0
votes
1
answer
171
views
Emacs transparent after fresh install
Complete emacs beginner here. Just installed emacs in my Manjaro (awesomewm edition) machine using pacman.
The emacs window is almost completely transparent, I can't read anything. If started from a ...
1
vote
1
answer
178
views
How to track down where Emacs message "<Scroll_Lock> is undefined" comes from?
I am using Emacs 25.5 and now am getting the message: "<Scroll_Lock> is undefined" appearing regularly in the Messages buffer. If I turn on debug-on-error, it doesn't stop on it and ...
1
vote
0
answers
448
views
(Windows Terminal) and xterm-mouse-mode has a problem
Don’t really know where to post this issue, or even the nature of it, but it can get very frustrating. This is not exclusive to Windows Terminal, MobaXTerm has the same problem.
So I use emacs under ...