Questions tagged [error-handling]

The tag has no usage guidance.

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

org-babel python code block - not showing errors during execution

I have a python code block in an org-file that when executed results in some error. I was expecting to see that error in the #+RESULTS: block, but it doesn't show up. I have to navigate to the python ...
skittish's user avatar
1 vote
1 answer
14 views

Re-raise error after adding some context

I have a package that invokes some user-defined code that can be error-prone. For the most part, I'd like to respect the user's choices for handling errors, e.g. debug-on-error. However, due to some ...
erjoalgo's user avatar
  • 863
0 votes
2 answers
63 views

How do you handle an error in the scope of current-buffer with condition-case?

I would like to create headings and subheadings with org-capture if they don't exist with file+olp in my templates. The problem is that I get this message Heading not found on level 1. I'm not sure ...
Rick's user avatar
  • 25
0 votes
0 answers
59 views

How to keep initializing regardless of errors signaled when loading init.el?

As most emacs user, I change my init.el fairly often. Sometimes a bug is introduced and the next time I start emacs I get an error message and a very ugly emacs without any of my keybindings. Then, I ...
TMat's user avatar
  • 95
0 votes
0 answers
24 views

How can one clear org-babel (emacs-lisp) function error to execute other code blocks?

Revised to [hopefully] add clarity: After trying to execute some elisp code in org-mode, I get an error related to a function definition. Once this error is raised, it is then returned when I try to ...
brawny84's user avatar
2 votes
1 answer
54 views

use search-forward to determine bound of another search-forward

I'm trying to use lisp to search for a pattern bounded by another one across a BiBTeX file. Let's say the following is the file I want to search in % Created using Papers on Wed, 07 Apr 2021. %% http:/...
Guillaume's user avatar
  • 189
0 votes
0 answers
34 views

What's the meaning of the error: Point 95406 after end of properties?

What's the meaning of the error: Point 95406 after end of properties? I identified the piece of code that produces this error (blocking my script): ;; "Fig" --> "Figure" ;; &...
Gabriele Nicolardi's user avatar
4 votes
1 answer
193 views

How to prevent the white flash when I try to go beyond the end/beginning of line?

When I hit the end or beginning of the line and I press to go past it, my echo area flashes white. This also happens when a function fails. How do I stop this from happening?
Vinn's user avatar
  • 293
1 vote
1 answer
65 views

Capturing "quit" in the completion prompt

I need to use completion prompt, but also capture the fact when the user hits <escape> or C-g. Here's an example: (let ((proj (completing-read "choose project:" projectile-known-...
iLemming's user avatar
  • 1,253
1 vote
1 answer
704 views

Failed to download ‘melpa-stable’ archive. GnuTLS : Contacting host: 443

I am trying to install packages/modes from melpa on my emacs27.1, but I am unable to do so. If I run M-x package-refresh-contents , I get the following error : Importing package-keyring.gpg...done ...
Vignesh S's user avatar
2 votes
1 answer
118 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
0 answers
25 views

Guess features needed to provide function upon void-function error

Question How do I run code before any void-function error is signaled? I have a feeling I can use advising for this, but I don't know what exactly I need to advise. What I want to achieve Before any ...
Aquaactress's user avatar
  • 1,443
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
1 vote
1 answer
60 views

A way to check if "(current-kill 0)" will run onto an error before it happens

I have an Elisp part involving (current-kill 0) to copy the current clipboard content into a variable. This works flawlessly as long as the kill-ring has content. However, if I just started the ...
Phoenix's user avatar
  • 351
1 vote
1 answer
254 views

unescaped character literals detection error

When I reload my init file I get an error (or warning) saying unescaped character literals `?(', `?)', `?[', `?]' detected! What does this error (warning) mean and how can one fix it?
Name's user avatar
  • 7,809
0 votes
1 answer
54 views

How to invoke another function only if there is some error with a given function?

Assume that I have two functions, say function1 and function2. I would like to execute function2 only if there is some error during the execution of function1. So far, I have tried the below code (...
Name's user avatar
  • 7,809
0 votes
0 answers
189 views

Some keybinding stopped working this morning with error "Wrong type argument: arrayp, nil"

I used counsel-org-goto-all to jump between headings. This morning, the command (which I have bound to C-;) stopped working with this error: Wrong type argument: arrayp, nil. I have searched on the ...
Yogeshwer Sharma's user avatar
0 votes
2 answers
114 views

How to raise an error when unrecogized keyword arguments are passed to a function?

With a function that uses keyword arguments using this style of function definition: (defun some-name (&rest kwargs) (plist-get kwargs 'example)) Is there a convenient way to ensure only ...
ideasman42's user avatar
  • 8,736
1 vote
0 answers
1k views

Cannot enable org-roam mode - No EmacSQL SQLite binary available (windows 10)

Cannot make org-roam work under windows 10 because I get "No EmacSQL SQLite binary available". What I've done: Installed org-roam using M-x install-package. Installed emacsql-sqlite3 using M-x ...
Suvidh Jain's user avatar
0 votes
1 answer
125 views

Emacs 24.3: warning "Unable to activate package"

Upon startup of my emacs 24.3, I'm getting the errors: Warning (emacs): Unable to activate package `with-editor'. Required package `emacs-24.4' is unavailable I have a dim recollection that when I ...
Swiss Frank's user avatar
1 vote
2 answers
35 views

Can a mode setup function fail?

If I define a new mode using define-derived-mode or define-minor-mode, can the mode setup somehow signal failure so that the mode is not activated? All of the following modes are activated despite ...
Lassi's user avatar
  • 377
0 votes
1 answer
127 views

How to handle multiple kinds of errors with condition-case?

With condition-case, is there a way to handle multiple kinds of errors? Currently I have user-error and error both being handled. Is there a way to de-duplicate these checks to handle any kind of ...
ideasman42's user avatar
  • 8,736
0 votes
1 answer
177 views

Why does Emacs not enter the debugger when popping a cons twice?

I wrote some LISP code that was wrong because I was trying to pop a cons twice: (let ((pair '("a" . "b"))) (let* ((a (pop pair)) (b (pop pair))) b)) Evaluating this in the *scratch* ...
miguelmorin's user avatar
  • 1,897
4 votes
2 answers
200 views

How to report that an interactive command couldn't run?

When writing my own interactive function, whats the best way to report that nothing happened. (if line-is-empty (message "Found empty line, nothing to do!") (do-stuff)) Or is it better to use ...
ideasman42's user avatar
  • 8,736
5 votes
0 answers
1k views

Fontconfig Error in Snap version of Emacs

I installed Emacs 26.3 using Snap in my Debian Buster. After I launch it, it gives me the following errors: Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules" Fontconfig ...
J Arun Mani's user avatar
1 vote
1 answer
96 views

How does emacs flash its icon on the windows taskbar?

Sometimes when I run a process if there is an error during the process the emacs icon on the windows taskbar lights up, so if I'm in an other app I can see something happened there. I'd like to use ...
Tom's user avatar
  • 1,230
0 votes
0 answers
111 views

"<Hangul> is undefined" error on space key press

I'm running Emacs 26.1 without any "strange" configuration: a bare bone Ubuntu 19.04 emacs package with few packages installed from elpa or melpa. I have the following issue: when pressing space bar ...
mszmurlo's user avatar
  • 101
3 votes
2 answers
731 views

Couldn't make condition-case work

Hello fellow Emacs Lisp enthusiasts! I've encountered problem that I am even embarrassed to describe. It is very clear how to use condition-case from all the docs and examples that I can find online, ...
Valeriy Savchenko's user avatar
2 votes
1 answer
274 views

After setting bookmark: `Wrong type argument: listp, "~/.spacemacs`

So I did just M-x bookmark-save in my original .spacemacs file, which lead to the case that when I booted Spacemacs, I get the following error: Upgrading bookmark format from 0 to 1... mapcar: Wrong ...
tbrodbeck's user avatar
  • 189
1 vote
1 answer
140 views

Why AUCTeX/pdflatex show me help in Japanese?

I had this error message displayed to me by AUCTeX (already corrected using \ddot{\boldsymbol x}) ERROR: Extra }, or forgotten $. --- TeX said --- <recently read> } l.51 \[ \boldsymbol M\ddot\...
gboffi's user avatar
  • 604
1 vote
1 answer
92 views

Latex compilation message in the echo area dissapears too soon

The outcome (success/error) of a Latex compilation (TeX-command-run-all) is printed in the echo area. Once you press a key, however, the echo area is cleared and the message is gone. I usually look at ...
StarBug's user avatar
  • 479
1 vote
1 answer
99 views

Keep going mode for require-package

In my initialization file, I have got: (require-package 'clips-mode) The thing is that, lately, this package fails to be loaded sometimes (it's already downloaded but I guess it fails when it tries ...
ABu's user avatar
  • 280
3 votes
2 answers
1k views

Orgmode table error - shrunk field?

I'm very new to Emacs and Org mode, so I'm basically fumbling around. I'm getting an alarm bell ding whenever I type in an table in an *.org file. A message says "invalid function: org-table-with-...
G. H.'s user avatar
  • 31
0 votes
1 answer
82 views

Identify which mode is throwing an error

I am attempting to edit a file. Emacs is preventing me from making the edit, and throwing: Args out of range: #<buffer user.action.js>, 4965, 17721. It is completely not obvious to me where this ...
Abraham P's user avatar
  • 201
0 votes
0 answers
387 views

"No such file or directory, bind-key" after installing use-package [duplicate]

I'm using Emacs on Windows 10. I want to override key bindings, so after reading How to override major mode bindings, I installed use-package with the built-in package manager (via M-x package-install ...
user19551's user avatar
  • 101
0 votes
2 answers
47 views

How Can I Prevent make-process from failing if the default-directory doesn't exist?

Usually, when you open a file, Emacs prompts you to run M-x make-directory RET RET if the directory doesn't exist. However, after writing my own advice, I realized that opening files in directories ...
Parham Doustdar's user avatar
2 votes
1 answer
298 views

How can I disable the "<C-lwindow> is undefined" error?

I use Windows 10's virtual desktop feature. The hotkey for switching between virtual desktops is Ctrl-Win-Left / Ctrl-Win-Right. When Emacs is focused and I want to switch dekstops, I get an error ...
werki's user avatar
  • 51
1 vote
1 answer
252 views

Running emacs client: how do you know if the init files had errors loading

I use emacs 25, in nw mode, with "alias emacs='emacsclient -nw'" When I add something to my personal.el, I do brew services restart emacs My issue is, if I make a big blunder inside my personal.el ...
american-ninja-warrior's user avatar
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 ...
Oly's user avatar
  • 593
2 votes
1 answer
49 views

Exiting from outer calling functions on error

Consider the following: (defun my-divide-by-0() (condition-case nil (/ 1 0) (error (progn (message "Could not evaluate: 1/0") nil)))) (defun my-test() (interactive) (my-divide-by-0) ...
AlwaysLearning's user avatar
0 votes
1 answer
297 views

redirect stderr to a file in call-process-region

I have been reading the documentation for call-process-region here and I am trying to redirect stderr to a file. from the the documentation, this looks correct (call-process-region beg end perltidy-...
Prgrm.celeritas's user avatar
1 vote
2 answers
473 views

Is the unwind-protect's clean form always evaluated?

I have this loop: (catch 'QUIT (while (search-forward-regexp "\\([^\n\\]\\(?:\\\\\\\\\\)*\\|^\\(?:\\\\\\\\\\)+\\)%.*\n" nil t) (save-excursion (let ((b (make-...
Gabriele Nicolardi's user avatar
3 votes
1 answer
133 views

When I (byte-compile-file "my-package.el"), can I treat warnings as errors?

As part of CI testing, I'm byte-compiling package files to make sure there are no errors. I'd like to take this a step further and ensure there are no warnings, either (like 'function not known to be ...
Sean Allred's user avatar
  • 6,901
0 votes
0 answers
160 views

On Windows 8.1, in Emacs Ghostscript doesn't work, while on commandline it does

Edited question of August 2017: After a long search I found the reason, why a wonderful software called pdfsizeopt (for my question from April 2017 see below) does not work, when called from Emacs, ...
Keks Dose's user avatar
  • 508
4 votes
2 answers
2k views

Symbol's function definition is void: insert-string

;; Specify the startup banner. Default value is `official', it displays ;; the official spacemacs logo. An integer value is the index of text ;; banner, `random' chooses a random text banner in `core/...
nalzok's user avatar
  • 675
4 votes
1 answer
974 views

What is the difference between the error handler in condition-case and the error function

I am wondering the semantic of the error function. For condition-case, the Elisp manual says: The arguments after the protected form are handlers. Each handler lists one or more condition names (...
Jason Umi's user avatar
13 votes
1 answer
1k 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 ...
legoscia's user avatar
  • 6,052
2 votes
1 answer
95 views

Taking action depending on the presence of particular message in the echo area

I have my proper function to run latex, say my-tex. Sometimes one should run latex two times to get references right. A message like below in the echo area appears to tell this. How to identify ...
Name's user avatar
  • 7,809
2 votes
1 answer
144 views

Standard way of reporting user errors to user?

I am writing an emacs package which provides some commands to the user. The user can run things like M-x foobar and M-x eggsspam. However, some of these commands can fail. As an example, without ...
omajid's user avatar
  • 508
2 votes
1 answer
58 views

Which function should I advise to do something when a user-error is unhandled?

I need to advise emacs to do something when any error dings to the user. I can't find any documentation on which function I actually need to advise. Which function do I need to advise to do ...
JCC's user avatar
  • 1,019