I got this error message when exporting to html in org-mode:
Debugger entered--Lisp error: (wrong-type-argument processp nil)
process-command(nil)
shell-mode()
funcall(shell-mode)
...
After googling for a while, this post helped me resolve the error. I only needed to change:
#+BEGIN_SRC shell
...
#+END_SRC
to
#+BEGIN_SRC bash
...
#+END_SRC
However, I still want to know how I can understand the error messages better so that I can resolve it myself. How can I do this?
Related
I'm new to Emacs, coming from Vim, using Spacemacs on Windows 10 atm. My problem is that when I try to evaluate maxima code blocks in emacs, for example:
#+begin_src maxima
a: 1+1;
print(a);
#+end_src
I get the following error:
#+RESULTS:
"incorrect syntax: / is not a prefix operator"
I think it might be because of how windows is handling the path. I found the following code online and replaced it in "ob-maxima.el" but it didn't help:
(let* ((cmdline (or (cdr (assoc :cmdline params)) ""))
(in-file (org-babel-temp-file "maxima-" ".max"))
(cmd (format "%s --very-quiet -r \"batchload(\\\"%s\\\")$\" %s"
org-babel-maxima-command in-file cmdline)))
Thanks a lot for you help, much appreciated!
Edit 2020.03.26---------------------
I got it working using "choco install maxima", now it executes properly.
When I start emacs I get the error
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("cmd\\.exe" nil)
(if (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c")
eval((if (string-match "cmd\\.exe" tramp-encoding-shell) "/c" "-c"))
this appears to occur when loading the magit pack
eval-buffer(#<buffer *load*-330059> nil "c:/cygwin64/home/johnstonk/.emacs.d/emacs-live/packs/stable/git-pack/lib/magit/magit.el" nil t) ; Reading at buffer position 3100
I confirmed this occurs with a fresh git clone of emacs-live.
I tried removing the magit pack from loading in the live init file but I got the same error again when it loaded the clojure pack. Looks like a nil string error in tramp.
Does anyone know why?
Going through and loading the source code for tramp-sh.el I got the same (wrong-type-argument stringp nil) on the first line (require 'tramp)
So I loaded tramp.el (version 22.1) and got to the section
(defcustom tramp-encoding-shell
(if (memq system-type '(windows-nt))
(getenv "COMSPEC")...
I noticed that this system-type is getting set to windows-nt (As it should, I'm on windows7) but (getenv "COMSPEC") is returning nil. From what I googled elsewhere this COMSPEC environment variable is expected to exist on windows machines and point to the shell. Tramp uses the tramp-encoding-shell var for encoding and decoding commands on the local machine such as "~" -- at least according to tramps comments.
COMSPEC didn't exist as an system environment variable for me so I created it and pointed it to cmd.exe C:\Windows\System32\cmd.exe That fixed it for me.
Note don't set COMSPEC to powershell, I tried that first but got a nasty memory leak when I tried to use lein (keeps trying to create a server, fails, and tries again but doesn't clean up previous thread).
Since I would like to use accurev from emacs, I tried using this .el module:
https://github.com/shellbj/vc-accurev. However, I get the following error on both emacs 23.4.1 and 24.3:
Debugger entered--Lisp error: (void-function defclass)
(defclass vc-accurev-object nil ((node-name :initform ... :type symbol :allocation :class :documentation "XML node name")) :abstract t)
eval-current-buffer()
call-interactively(eval-current-buffer t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
I'm running native emacs on windows 7. Can someone kindly help me make this run so I can manipulate accurev from emacs? I'm also curious about learning how to use EIEIO (which is the package that apparently implements this defclass extension). Bing/Google searching did not reveal a require statement.
Thanks
Siegfried
When I open an HTML file with emacs (and nXhtml,) I get the following error from flymake:
Error (flymake): Flymake: Failed to launch syntax check process 'xml'
with args (val
/home/ABC/Downloads/capitals_flymake.html):
Searching for program: no such file or directory, xml. Flymake will be
switched OFF
I assume this means that I need to have a program installed that can be run at the command line with xml. However, I have not been able to find out what this program is in the documentation.
I am also currently using the following gist (with a modification suggested by one of the commenters to change equal to >=) to disable the Mumamo buffer filenames warning in my .emacs:
;; Workaround the annoying warnings:
;; Warning (mumamo-per-buffer-local-vars):
;; Already 'permanent-local t: buffer-file-name
(when
(and
(>= emacs-major-version 24)
(>= emacs-minor-version 2))
(eval-after-load "mumamo"
'(setq mumamo-per-buffer-local-vars
(delq 'buffer-file-name mumamo-per-buffer-local-vars))))
But, I am not sure if that is relevant.
How can I get flymake to work with nXhtml? I am currently on GNU Emacs 24.3.1.
I have this in my .emacs for live validating of XML and HTML, see if this would help.
(defun flymake-xml-init ()
(list "xmllint"
(list "--valid"
(flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))))
(defun flymake-html-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "tidy" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.html$" flymake-html-init))
Also, re xml executable: it might be this one http://packages.ubuntu.com/quantal/amd64/xml2/filelist from how it looks... also you can try apt-file /usr/bin/xml (I'm not sure if apt-file is installed by default, if not, then apt-get install apt-file). Also, maybe this would help: http://www.emacswiki.org/emacs/FlyMake . I couldn't find any setting particular to nXhtml that does something to flymake.
The default program that flymake is told to use (xml) isn't installed on your computer, or its location isn't in your path. You need to tell flymake to use a different syntax checker just like #wvxvw said (see their answer for the code).
However, when you change the syntax checker, you may also need to tell flymake how that new checker will output error messages or else flymake won't know how to read the checker's output.
If your new checker program has an exit code other than 0 (which normally indicates an error) AND flymake didn't see anything that it recognized as error text, then flymake will throw a CFGERR and turn off.
From the flymake manual:
The following errors cause a warning message and switch flymake mode OFF for the buffer.
CFGERR : Syntax check process returned nonzero exit code, but no errors/warnings were reported. This indicates a possible configuration error (for example, no suitable error message patterns for the syntax check tool)
So what you need to do is tell flymake how to interpret the errors from your updated parser. You do this by adding a regex expression to a list that flymake will check against the output of your parser. Add something like this to your .emacs file:
(add-to-list
`flymake-err-line-patterns
'("at line \\([0-9]+\\) of \"\\([^ \n]+\\)\"$" 2 1 nil))
This will then tell flymake that if your parser generates output that matches the regex ("at line \\([0-9]+\\) of \"\\([^ \n]+\\)\"$") to identify it as an error message. The 2 1 nil tell flymake which group in the regex represents the file, line number, and column number, respectively. If the error message doesn't provide that information, then set that parameter to nil. In this example, the error message only identifies the file (second group) and line number (first group), so the column is set to nil.
Lately i've been trying to install ELI on my Linux computer!
I've followed the guide from http://www.franz.com/emacs/ to make it work! I've also searched for similar errors and found this thread http://ubuntuforums.org/showthread.php?t=1646855
However unlike the person in the forum I cannot load the fi-site-init.el file from the scratch buffer.
By opening emacs with the --debug-init flag i get the following error messege
Debugger entered--Lisp error: (file-error "Cannot open load file" "fi-site-init.el")
load("fi-site-init.el")
eval-buffer(#<buffer *load*> nil "/home/simon/.emacs" nil t) ; Reading at buffer position 82
load-with-code-conversion("/home/simon/.emacs" "/home/simon/.emacs" t t)
load("~/.emacs" t t)
#[nil "\205\264
What can be worth noticing is that in the guide they have
"/usr/local/acl82express/eli"
as the search path while i'm having
"/usr/Documents/acl82express/eli"
as path (since Allegro CL is installed there)
All in all this is what I've writed in the .emacs file
(push "/usr/Documents/acl82express/eli" load-path)
(load "fi-site-init.el")
(setq fi:common-lisp-image-name "/usr/Documents/acl82express/alisp")
(setq fi:common-lisp-image-file "/usr/Documents/acl82express/alisp.dxl")
(setq fi:common-lisp-directory "/usr/Documents/acl82express")
I am thankful for any help!
Simon Nyström
Documents is typically the name of the directory in the user home directory. It is customary to find it under /home/{user}/Documents where {user} is the currently logged in user. who am i | awk '{ print $1 }' - this is the way to find out, unless you forget :)
This directory is often times aliased with ~ (tilde) or $HOME environmental variable, so that when doing path expansion happens these "$HOME/Documents", "~/Documents" and "/home/{user}/Documents" will all point to the same directory.
Notice the leading "/"-symbol. I'm quite sure it'd have to be "/usr/Documents/acl82express/eli" for you.