New answers tagged

0

In your comment you say this: I have a close-and-kill-next-pane function defined in my .init. I use that to kill windows that I just needed temporarily, help docs, etc. After I identify the issue, I want to close the debugger and work on my code. By habit, I hit the keybinding for close-and-kill-next-pane and instead of the debugger going away, what ...


0

So the sequencing is a bit tricky as mentioned in the comment below, but reselecting the previous window seems like the easiest way: (defun my-debug-hook () ;; Selecting the window in `debug-mode-hook' is too early, it will ;; confuse the debugger's code, causing it to replace the current ;; buffer contents with the backtrace, and reset `buffer-undo-...


1

along with a message about the desktop file already being in use Emacsclient does not attempt to process the desktop file, so you are clearly starting a new instance of Emacs. If emacsclient can't connect to the server, but you either passed it -a '' or --alternate-editor='' or else have the ALTERNATE_EDITOR environment variable set to an empty string, ...


1

You can force entering the debugger when a function is called, (debug-on-entry 'myf) Any calls to myf triggers the debugger. A (myf 2 3) call, for example, would result in Debugger entered--entering a function: * (myf 2 3) ... Remove it when you're done, (cancel-debug-on-entry 'list)


2

It looks like you can call it like this: (let ((calendar-latitude 40.1) (calendar-longitude -88.2) (calendar-location-name "Urbana, IL")) (sunrise-sunset)) This does not prompt you for the latitude and longitude, and puts a message in the minibuffer for those variable values.


1

Two things were actually missing: - libxml2 dependency - proper setting of nov-unzip-program I could add libxml2 the easy way by going to Emacs FTP, download the dependencies, and apply them in my Emacs installation directory. For the set of nov-unzip-program I had to download Unzip for Windows, and set the path in init.el: (setq nov-unzip-program "C:\\My\\...


3

The function sunrise-sunset is an interactive function takes a numeric prefix argument as a parameter. It does not take the latitude and longitude as parameters, which is what you're trying to pass into it. I suggest reading this emacs wiki article as well as of course the manual itself to learn more about prefix arguments. Also checking out the interactive ...


0

I just found out what's wrong. Elisp requires a backslash in a string (i.e., between double-quotes "") to be escaped in Lisp, so the following code works: (setq org-latex-classes '(("article" " \\documentclass[12pt,a4paper]{article} \\usepackage{xeCJK} %\\usepackage[heading]{CJK} \\usepackage{zhnumber} % package for Chinese formatting of ...


0

In Lisp, the term/word that follows an open parenthesis (if the open parenthesis is not quoted) is interpreted to be a function, not a variable. In the context of this question, to is a variable. Because the word to follows an open parenthesis that is not quoted, Emacs thinks it was meant to be interpreted as a function instead of a variable. Try instead ...


0

As an answer I cite here the page M-: (info "(elisp)Eval List") of emacs-version: GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-04-12 (the feature is actually rather old) You can use the “evaluation list buffer”, called ‘edebug’, to evaluate expressions interactively. You can also set up the “evaluation list” of ...


0

Partially it is already there in GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-04-12. If you save a file test.el with the following contents, instrument f for edebug, step into f, and call ilem you can access the local variables x, y, and i in the ielm repl. (defun f (x) (let ((y (+ x 1))) (cl-loop for i from 0 below ...


Top 50 recent answers are included