eval-buffer doesn't do anything when setting up CLISP/SLIME - emacs

I am using the following tutorial:
http://www.pchristensen.com/blog/articles/installing-clisp-emacs-and-slime-on-windows-xp/
I have set-up all the directories and downloaded all the necessary files. However, on step 4. I am using the emacs command "eval-buffer". I type in my settings, ran "eval-buffer", received feedback (in the bottom bar), and assumed everything worked correctly. Then when I ran M-x "slime" I received the error:
Spawning child process: invalid argument
I assumed I had typed something incorrectly in my .emacs file so I re-edited it. However, now when I attempt to run M-x "eval-buffer" I receive no feedback and I don't believe my new code executes.
My file, by the way, is:
(setq inferior-lisp-program "C:/Documents and Settings/U9UW/Desktop/root/bin/clisp/full/lisp.exe -B C:/Documents and Settings/U9UW/Desktop/root/bin/clisp/full -M
C:/Documents and Settings/U9UW/Desktop/root/bin/clisp/full/lispinit.mem -ansi -q")
(add-to-list 'load-path "C:/Documents and Settings/U9UW/Desktop/root/bin/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)

eval-buffer actually was evaluating. To fix the problem "Spawning child process: invalid argument", one has to replace the first line with:
(setq inferior-lisp-program “clisp”)

Related

emacs init file on MS Windows

There's a huge literature on the topic, but, nevertheless, I cannot get this done.
My ultimate goal is to work with fstar on Microsoft Windows.
C-x C-f resolves ~ as C:/Users/myname which is in line with my HOME environment variable in the Environmental variables Windows section.
(expand-file-name user-emacs-directory), as described here yields, C:/Users/myname/.emacs.d/
In C:/Users/myname/.emacs.d/ I have placed .emacs.el and init.el with the suggested script:
(require 'package) (add-to-list 'package-archives '("melpa" .
"http://melpa.org/packages/") t) (package-initialize)
However M-x returns undefined, no matter if I start Emacs with or without the -q flag (see here). My "Messages" buffer is empty".
A couple of things you could try:
Check the value of the variable user-init-file (use C-h v). That should tell you if Emacs loads the file you want it to load. If you started Emacs with the -q option, the value of this variable should be nil.
The error M-x is undefined can be caused by rebinding the Escape key. (That's because pressing a key while holding down the "Meta" key is equivalent to first pressing Escape and then the key in question.) Is there something in the init file that might cause this to happen?
Try starting Emacs with -Q instead of -q. This makes Emacs skip "site-wide" init files. I can't really think of a reason why your system would have any of those, but it might be worth ruling this out.
You could edit your question and include your entire init file (surround it with ``` on a line by itself), so we could have a look.

Emacs Warning (initialization) -- File error

Whenever I open emacs on a linux server I'm using I get the following message which takes up half my screen:
Warning (initialization): An error occurred while loading `/home/[my username]/.emacs':
File error: Cannot open load file, sm
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
What's happening here? I don't have any issues editing, except for this warning message in the way. How can I address this?
EDIT:
My ~/.emacs file contains the following:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Supermongo (SM) mode stuff
;;
(require 'sm)
(setq auto-mode-alist
(append
'( ("\\.sm\\'" . sm-mode) )
auto-mode-alist)
)
Your load-path variable is probably set missing something. You need to add a path so that the sm.el (or sm.elc) file can be found by emacs. Something like this at the beginning of your .emacs file:
(add-to-list 'load-path "/path/to/directory/containing/sm.el")

company-clang always No completion found

i have post and issue on company-mode's git site, but i cant't draw any attention there, maybe author is in some kind of busy recently. so i post here now.
when i setup the company, and want to use it.
there are always:
No completion found
user-error: Cannot complete at point
here is my init setup:
(require 'cc-mode)
(require 'company)
(add-hook 'after-init-hook 'global-company-mode)
(setq company-backends (delete 'company-semantic company-backends))
(define-key c-mode-map [(tab)] 'company-complete)
(define-key c++-mode-map [(tab)] 'company-complete)
(setq company-clang-executable "/usr/bin/clang-3.8")
and i also found, when i want to exit the emacs, i found compay-clang still running(have a active buffer, shown in process list):
company-clang run *clang-output* /dev/pty1 /usr/bin/clang-3.8 -fsyntax-only -Xclang -code-completion-macros -x c++ -I/cygdrive/e/lua/include -I/usr/include -Xclang -code-completion-at=-:28:5 -
btw, i use this setup(almost the same, such as include path) for auto-complete-clang, and it works fine.
i seems that company-clang have been running into a loop, because when i try to close the clang-output buffer, it always left a message which is "Buffer "clang-output" has a running process; kill it? (yes or no) ".
but the more important is that there is nothing in that buffer.
Use pipes instead of PTYs to receive output from Clang

running command on remote machine with tramp?

I opened a file on the remote machine, and typed C-u M-! and then typed tree command. It showed in the buffer:
/bin/sh: tree: command not found
The tree command is installed into /home/RNAer/bin, and I verified it can run successfully when login with bash terminal.
Then I added the path in the .emacs like the following and restart emacs,
(add-to-list 'tramp-remote-path "/home/RNAer/bin")
but it still has the same error of command not found. what's the problem?
I had the same problem, I solved by adding the following lines to .emacs
(require 'tramp)
(add-to-list 'tramp-remote-path "/home/RNAer/bin")
Note that without first line the second line throws error. You could double check your tramp-remote-path by
(message (format "%s" tramp-remote-path))
to see if your path is set correctly.

PATH and exec-path set, but emacs does not find executable

My .emacs contains
(setenv "PATH" (concat ".:/usr/texbin:/opt/local/bin" (getenv "PATH")))
(setq exec-path (append exec-path '(".:/usr/texbin:/opt/local/bin")))
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
(require 'tex-site)
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
/usr/texbin is where latex/pdflatex/.. are located.
/opt/local/bin/ is where gs can be found.
And yet when I run preview-at-point, which apparently needs both latex and gs, I get
Preview-DviPS finished at Thu Dec 22 11:25:46
DviPS sentinel: Searching for program: No such file or directory, gs
which means that latex could be found all right, but not gs.
I am not sure whether setting exec-path is necessary, perhaps PATH is enough, but I've set it as a debugging measure.
Why can emacs not find gs even though the directory it's in is in both PATH and exec-path?
If you're setting $PATH inside your Emacs, you might well be on OS X. GUI applications are not started via your shell, so they see different environment variables.
Here's a trick which I use to ensure the $PATH inside Emacs is the same one I see if I fire up a terminal (but see "update" below):
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match that used by the user's shell.
This is particularly useful under Mac OSX, where GUI apps are not started from a shell."
(interactive)
(let ((path-from-shell (replace-regexp-in-string "[ \t\n]*$" "" (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
Then simply call the set-exec-path-from-shell-PATH function, perhaps from your Emacs init file. I keep that code on github, BTW.
Update: this code has now been improved and published as an elisp library called exec-path-from-shell; installable packages are available in MELPA.
Try replacing the second line with this:
(setq exec-path (append exec-path '("/usr/texbin" "/opt/local/bin")))
I hit a similar problem, but with a correct PATH, including trailing ´:´. It turned out the internal emacs shell program was missing, resulting in a ´Searching for program: No such file or directory´ message.
Fixed with
(setq shell-file-name "bash").
It appears you're missing a path separator : at the end of your path string.