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
38 views

Function to add a number at the end of a line to another number on the top line

I'm trying to implement a gamification system in org-mode. Basically, I assign a number of points to a checkboxed task and when I tick the checkbox I add the number of points to a total at the top of ...
0
votes
0answers
95 views

How to debug issues when using version control (vc) inside emacs?

I have some issues when using the version control ( commands inside emacs (e.g.: vc-dir, commit, etc...). Here is an example of what is shown when I try to commit (C-x v v): svn: E210002: Commit ...
0
votes
1answer
127 views

(require 'package) is newly very slow on Windows

In recent weeks, (require 'package) takes minutes. This only happens on Windows, not on macOS or GNU/Linux. What is going on? emacs-version is GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-11-15. ...
4
votes
2answers
414 views

Can't get out of minibuffer completion

Since upgrading from v. 24 to v. 25 [OSX 10.11.6] I find myself frequently fighting with minibuffer completion, as typing a tab after doing switch-to-buffer. ^G just beeps, and the completions ...
3
votes
2answers
186 views

How to know which function triggered an autoload of a library

How can I monitor when Emacs loads a library because of an autoloaded function, and also know the name of that function? EXAMPLE:  I type M-x eval-buffer in a buffer where one of the functions uses ...
0
votes
1answer
134 views

How to troubleshoot random hangs / pauses?

Short of building a debug version of emacs and adding break points. Whats the best way to know whats happening during a 'pause' while emacs runs? (assuming the pause is long enough to manually run an ...
5
votes
1answer
88 views

Can emacs auto-save backtrace?

Trying to debug a problem with debug-on-error. Backtrace appears for a second and then some other parts of the system make it disappear and emacs becomes dysfunctional so I can never read it. Is ...
0
votes
1answer
28 views

pabbrev-mode idle timer error

I have installed again pabbrev and whenever I activate the mode I constantly get theses 2 errors. Error running timer ‘pabbrev-idle-timer-function’: (invalid-function pabbrev-debug-message) Error ...
1
vote
1answer
71 views

Exporting org file breaks

I have a similar problem to the one asked here Exporting org file breaks when upgrading to orgmode 8.3, org-mode cannot export org files and raises this error: apply: Wrong type argument: listp, #("...
1
vote
1answer
1k views

How to solve “Autoloading failed to define function sml-mode”?

I have just install a version of emacs (GNU Emacs 24.5.1 i686-pc-mingw32) on a Windows 8 Machine. On trying to open an example SML file (Standard ML Language). An error occurred: File mode ...
0
votes
0answers
73 views

Cannot open .po files: “Wrong type argument”

Whenever I try to open .po (Portable Object) files in emacs, I get a "find-file-noselect-1: Wrong type argument: arrayp, nil" error and the file is not displayed. However, if I change the file ...
0
votes
1answer
67 views

How do I debug when match-data is not getting set?

Lately, I have seen some cases where I use re-search-forward to find a pattern, and then try to do something with the match, only to find that the match-data is apparently not correct. For example, ...
3
votes
1answer
81 views

Debugging in elisp

I am having a fairly big .emacs file with lots of stuff inside, parts of which I have copied from somewhere else. At some point in the file I am setting the font size to some value but this setting ...
0
votes
0answers
162 views

delete-selection-mode can no longer be set in init.el

I recently upgraded Emacs to 25.1 on Arch Linux, however now whenever I select text and type, the text appears after the selection instead of replacing the section. In init.el I have '(delete-...
4
votes
3answers
2k views

'wrong-type-argument stringp nil' Error With org-babel-load-file Function

I'm following the tutorial here to implement my init.el file in org mode. I therefore cleaned out my init.el file and added this only: (require 'org) (org-babel-load-file (expand-file-name "emacs-...
3
votes
0answers
57 views

how can I debug or fix slowness in org-cycle?

running org-cycle appears to hang sometimes. I've run M-x profiler-start <tab> ;; bound to org-cycle C-g ;; to cancel apparently-hung command M-x profiler-report and I see that a bunch of time ...
0
votes
4answers
107 views

Set the mark at the beginning of the current function definition

I want this function: assume that I am inside a function, and in line 100, now I want to go to the definition of this function, say 80, and set mark, then go back to 100. So now I have an active ...
1
vote
0answers
74 views

Getting gdb to work for this project

For this project, I cannot seem to get M-x gdb to work in Emacs 25.1 (on Ubuntu 14.04.5 64-bit if it matters - this should be the case for any Ubuntu-based Linux in general I imagine). Steps to ...
2
votes
1answer
776 views

Error void-variable in mapcar

What is the difference between the two functions func1 and func2? (defun func1 (arg) (if (listp arg) (mapcar (lambda (x) (func1 x)) arg) arg)) (func1 (list 1 2 3)) (defun func2 (arg) (...
1
vote
1answer
141 views

I got error when using command yank

When I typed C-y to call yank, I got this. apply: Symbol's value as variable is void: n Debugger entered--Lisp error: (void-variable n) ad-Advice-current-kill( ... [interprogram-paste-...
0
votes
0answers
39 views

How to investigate an emacs crash on linux [duplicate]

im not very technical and lately i have been getting random crashed the seem to kill emacs and even the emacs daemon. this is an example output from CLI Fatal error 11: Segmentation fault Backtrace: ...
0
votes
0answers
520 views

What should I do when Emacs segfaults?

I have found a semi-reproduceable way to make my Emacs segfault. This generates a core dump in my /var/lib/systemd/coredump/. The error occured several times when adding [ or [. in a specific column ...
3
votes
2answers
177 views

Emacs without GUI adding extra text to opened files

Whenever I open a file using emacs without gui (emacs --no-window-system) it modifies the file with the following text: 12;rgb:0000/0000/0000 This text is inserted at the beginning of the file. How ...
2
votes
1answer
241 views

how to debug constant freezing with emacs org-mode on windows?

I use org-mode with emacs heavily. On LINUX, everything is great. When I have to use windows emacs regularly freezes and I have to kill via task manager and restart. Any suggestions on how I can ...
21
votes
1answer
1k views

How do I troubleshoot Emacs problems?

In a situation where Emacs is not behaving like I want, what can I do to troubleshoot the problem? What steps can I take to find and fix the problem myself? Or, failing that, how can I gather useful ...
1
vote
1answer
84 views

Why does running my tests with ert-run-tests-batch-and-exit fail

I have written a few simple tests, when I run them on the buffer inside emacs everything passes. However, when I run them in batch mode as shown below, it fails. What can explain this? emacs -batch -...
9
votes
0answers
397 views

Get backtrace from error programmatically

If an error is signalled in Emacs Lisp code, and debug-on-error is t, I get a backtrace buffer that makes it easy to figure out where the error occurred. However, for errors that occur while ...
0
votes
2answers
260 views

Problems loading packages from repos in another emacs directory

I want to test a new configuration from emacs for that case I begin with this: emacs -q --load ".emacs.jesus.d/init.el" --debug-init it works and I load the emacs file, until I started to download ...
0
votes
0answers
439 views

How to debug “company backend” initialization problems?

I am getting error messages initializing some company backend packages, but messages only appear in the *Messages* buffer, like: Company backend 'company-web' could not be initialized: Symbol's ...
1
vote
2answers
327 views

Tracking down a write to a variable

Something setqs desktop-dirname to nil after my "init.el" is loaded. I want to track down the offending code. Just before the end of "init.el", desktop-dirname is correctly set. I checked run-hooks ...
0
votes
1answer
152 views

How to efficiently debug emacs package conflicts (strategies too)

I currently have an emacs package conflict occuring. It is a difficult one to pinpoint as it happens occasionally. I have started using M-x unload-feature to unload packages from memory, get out of ...
1
vote
1answer
2k views

Spacemacs: Company-Anaconda doesnt work

I recently installed Spacemacs and am new to it. 0.200.2@24.5.2 (spacemacs) / 14.04 Ubuntu same problem with 0.200.2@26.0.50.2 (spacemacs) / 14.04 Ubuntu Syntax Checking etc. is working fine, but ...
2
votes
1answer
248 views

gdb-many-windows causes hangs in emacs 24.5

When running gdb -i=miand then attach to the process for debugging, emacs hangs for like 5 minutes before I can type anything. After trial and error I found it is caused by the following line in my ...
1
vote
0answers
189 views

emacs crashes while opening .emacs file

When i try to open my .emacs file with emacs i get an error as such. $ emacs .emacs Fatal error 11: Segmentation fault Backtrace: emacs[0x4f74cb] emacs[0x4dcf3e] emacs[0x4f611e] emacs[0x4f6283]...
0
votes
1answer
40 views

car on cons gets nil

I define an alist like this: (setq major-mode-list '(((emacs-lisp-mode inferior-emacs-lisp-mode) . ("Elisp" "Emacs")) ((haskell-mode) . ("Haskell" "Haskell")) )) And match current major-...
3
votes
2answers
3k views

debugging some elisp — “end of file during parsing error” in init.el

After a long debugging of my init.el file, it looks like the first line of the following elisp-code, i.e (custom-set-variablesis provoking an 'End of file during parsing' error) which I absolutely don'...
2
votes
2answers
175 views

Trace calls to a function with the parameters

I need to track the calls to org-tags-view to discover the params passed to it. I tried an advice: (defun his-tracing-function (orig-fun &rest args) (message "org-tags-view called with args %S" ...
0
votes
2answers
195 views

How to Debug Javascript in HTML in Webmode.el

I am new to Emacs webmode. I was wondering how to debug javascript embedded into my html page using webmode.el. The script is in the <script> tag. I'd like to see break lines and see the values ...
1
vote
1answer
111 views

Can connect TRAMP with m-x ssh but can't with anything else (org code blocks, C-x C-f, etc.)

I have a very strange issue. I have no idea how to debug. TRAMP hangs every time I issue it via C-x C-f (and choose ssh), when I try to execute a org code block: :tangle: /zeltak@aaa.zzz.yyy.xxx:/...
2
votes
1answer
1k views

(wrong-type-argument stringp nil)-error when starting dired

Dired used to run fine on my machine (Ubuntu 14.04). But for a while now, i keep running into the error (wrong-type-argument stringp nil). This does not only happen with dired but also with other ...
3
votes
1answer
607 views

Correct way to configure the lastest `org-mode` (literate programming)

Update: 11/Aug: I forgot to mention that I'm using literate programming to build the init.el from an org file. It seems that the problem appears when emacs opens the configure.org to generate the .el ...
4
votes
0answers
193 views

Quitting emacs is very slow

Quitting my Emacs takes a really long time. Is there a good way to track what's happening while quitting Emacs? (So far I'm turning to git blame to figure out what changes I have made to cause this ...
2
votes
1answer
101 views

Why use the “and” in (funcall (and initial-major-mode))?

I came across this code today, and do not understand why the author used the "and" in it. As far as I can tell, these two lines deliver the same results and have the same functionality. The variable ...
1
vote
2answers
102 views

How to debug lack of response to a certain set of keystrokes?

Suppose I do a certain keystroke sequence in emacs, and nothing happens, even though I expect there to be a keybinding that would do something. This could be because: The keybinding is not actually ...
1
vote
1answer
222 views

cadr wrong type argument listp

I have this code that used to work fine until today: (let* ((newest-pkg (cadr (assq 'org package-archive-contents))) (installed-pkg (cadr (or (assq 'org package-alist) ...
1
vote
1answer
71 views

What is causing my javascript files to auto-format?

If I have a long line in a javascript file such as: let args = [options.loadRaw ? buffer : path.resolve(filePath)].concat(options.commands); At some point when I keep adding to that line, it auto-...
2
votes
1answer
147 views

Signaling a breakpoint in Emacs Lisp

Many languages have a mechanism to signal an attached debugger to pause or break. For example in JavaScript this is done using the debugger keyword. In others like C# or Visual Basic the signal is ...
0
votes
1answer
35 views

Having trouble pinpointing this error wrong argument listp 1

I'm having trouble finding where the problem here is exactly. The result I'd like returned is a string that looks like 1. (n,adj-no) occupation 2. business My function is here and it looks like ...
3
votes
0answers
40 views

Display all internet connections during startup

How can I display all Internet connections that are used during startup? Sometimes I work in a low speed Internet environment and I would like to remove all the Internet connection code during startup....
1
vote
2answers
292 views

How to write assertions

How does one write assertions in Emacs Lisp? I know that cl-macs.el has cl-assert and cl-check-type, but I'm wondering if there's a native Emacs way to perform something that basic.