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.

mobydick
  • 151
  • 1
  • 8

5 Answers5

1

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

%EMACS% --no-init-file --no-site-file --eval=%TO_EVAL%
Luka Ramishvili
  • 889
  • 1
  • 11
  • 20
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))'
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%
Larynx
  • 398
  • 1
  • 12
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.

klang
  • 524
  • 3
  • 12
  • 1
    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. :) – mobydick Apr 30 '11 at 06:30
0

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

whoplisp
  • 2,508
  • 16
  • 19