[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Load file and return evaluation result (instead of t)?
From: |
Thorsten Jolitz |
Subject: |
Load file and return evaluation result (instead of t)? |
Date: |
Wed, 09 Oct 2013 21:25:33 +0200 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
Hi List,
the manual says
,----------------------------------------------
| load returns t if the file loads successfully
`----------------------------------------------
but I would rather like to write a (big) Elisp expression into a file,
load the file, and get the expression's return value instead of just
't'.
Something like
,------------------------------
| (eval-buffer (find-file ...))
`------------------------------
does not do the job either.
Did I overlook the simple and canonical way to do this?
This is mainly to avoid that shell commands like
,-------------------------------------------------------------
| $ emacsclient -s my-server -e "( ... elisp expressions ...)"
`-------------------------------------------------------------
become too long, and thus replace them with something like:
,-------------------------------------------------------------
| $ emacsclient -s my-server -e "(load-file \"/my/file.el\")"
`-------------------------------------------------------------
where /my/file.el contains those elisp expressions.
--
cheers,
Thorsten
- Load file and return evaluation result (instead of t)?,
Thorsten Jolitz <=