0

I am currently using Lisp in a Box which comes pre-configured to not load the ".emacs" configuration file. I would like to change the shortcut so that Emacs does load this file by default but I cannot find where this piece of code is.

Can someone please help me locate this and if possible tell me which bits of code to remove/edit to allow this file to be loaded? I am using Lispbox on OS X if that makes any difference.

As far as I know I am looking for one of the following pieces of code for not loading an init file: -q --no-init-file --no-site-file

Thanks in advance.

1
  • FWIW, setting up Emacs, SLIME and Common Lisp on OS X isn't all that hard, and you might find it a bit easier to manage. Commented Apr 30, 2011 at 16:39

5 Answers 5

1

It's inside Lispbox.sh (Linux) or Lispbox.bat (Windows).

%EMACS% --no-init-file --no-site-file --eval=%TO_EVAL%
Sign up to request clarification or add additional context in comments.

Comments

0

Normally the init files loaded are either ~/.emacs.d/init.el or if that is not present ~/.emacs so, maybe you can get an indication of what is going on in the first file?

Also, the buffer *Messages* will sometimes tell you a bit about what is going on.

1 Comment

Thanks, Finally had a breakthrough and after a ton of searching I managed to find what I was looking for. For anyone else looking to do the same the file that you need to edit is: "/Emacs/Contents/MacOS/lispbox.sh" Then remove "--no-init-file --no-site-file " from the last line of code to allow .emacs to load on starting Lispbox. :)
0

These kinds of problems (binary tries to load some unknown configuration file) you can analyze using the tool 'strace'.

Comments

0

just simple and obvious way. inside lispbox.sh just insert into (progn (load "lispbox") (slime)) (load "~/emacs") or where is you .emacs file.

form

exec ${LISPBOX_HOME}/emacs-23.2/bin/emacs --no-init-file --no-site-file --eval='(progn (load "lispbox") (slime))'

make

exec ${LISPBOX_HOME}/emacs-23.2/bin/emacs --no-init-file --no-site-file --eval='(progn (load "lispbox") (load "~/.emacs") (slime))'

Comments

0

I struggled to solve the same problem, and I found the answer.

First, I opened my lispbox.bat file.

@echo off
rem Thanks to Venkat who provided this bit of COMMAND wizardry.

if NOT %OS%==Windows_NT goto checkhome
for %%i in ( "%CD%" ) do set LISPBOX_HOME=%%~si%
goto start

:checkhome

rem
rem if the environment variable is not defined, dereferencing
rem it produces the same string!
rem

if %LISPBOX_HOME%==%LISPBOX_HOME% goto noenv
:start

set EMACS=%LISPBOX_HOME%/emacs-23.2/bin/runemacs.exe
set TO_EVAL="(progn (load \"lispbox\") (slime))"

%EMACS%  --no-init-file --no-site-file --eval=%TO_EVAL%

goto end

:noenv

echo LISPBOX_HOME environment variable should be set and
echo point to the installation directory of LISPBOX before
echo launching this command.

:end

Next, I modified some lines in it.

From

set EMACS=%LISPBOX_HOME%/emacs-23.2/bin/runemacs.exe
set TO_EVAL="(progn (load \"lispbox\") (slime))"

%EMACS% --no-init-file --no-site-file --eval=%TO_EVAL%

TO (Just deleting "--no-init-file")

set EMACS=%LISPBOX_HOME%/emacs-23.2/bin/runemacs.exe
set TO_EVAL="(progn (load \"lispbox\") (slime))"

%EMACS% --no-site-file --eval=%TO_EVAL%

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.