* for loading own lisp functions, if some in separated files, automatically
@ 2009-07-13 15:34 Erhy
2009-07-14 7:39 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Erhy @ 2009-07-13 15:34 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
for training myself, I'm writing some lisp functions.
What is the usual way for automatic maintenance,
that my .el files are loaded automatically, when
starting Emacs?
I would prefer that the lisp files are located in the site-lisp directory.
Thank you for advice
Erhy
I use GNU Emacs 22.3.1 (i386-mingw-nt6.0.6001)
of 2008-09-06 on SOFT-MJASON
on Windows Vista
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: for loading own lisp functions, if some in separated files, automatically
2009-07-13 15:34 for loading own lisp functions, if some in separated files, automatically Erhy
@ 2009-07-14 7:39 ` Peter Dyballa
2009-07-14 11:29 ` Abdullah Abdul Khadir
[not found] ` <mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-07-14 7:39 UTC (permalink / raw)
To: Emacs list
Am 13.07.2009 um 17:34 schrieb Erhy:
> What is the usual way for automatic maintenance, that my .el files
> are loaded automatically, when
> starting Emacs?
For example: load-file, load-library, require…
--
Greetings
Pete
To most people solutions mean finding the answers. But to chemists
solutions
are things that are still all mixed up.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: for loading own lisp functions, if some in separated files, automatically
2009-07-13 15:34 for loading own lisp functions, if some in separated files, automatically Erhy
2009-07-14 7:39 ` Peter Dyballa
@ 2009-07-14 11:29 ` Abdullah Abdul Khadir
[not found] ` <mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: Abdullah Abdul Khadir @ 2009-07-14 11:29 UTC (permalink / raw)
To: _glueck_austria; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
On Mon, Jul 13, 2009 at 9:04 PM, _ glueck _ austria@no.spam.hotmail.com Erhy
<erhard> wrote:
> Hello,
> for training myself, I'm writing some lisp functions.
>
> What is the usual way for automatic maintenance, that my .el files are
> loaded automatically, when
> starting Emacs?
You can save your lisp functions in the .emacs file. This file is to be
stored in C:/.emacs.
At least that worked for me on Windows XP.
>
>
> I would prefer that the lisp files are located in the site-lisp directory.
If you want to store the functions in a .el file then you may do that. But
you must include some functions like load-function in .emacs or
load-library, require.
--
Regards,
Abdullah Abdul Khadir
------------------------------------------------------------------
Home page : www.cmi.ac.in/~abdullah
My blog : www.linuxandlisp.blogspot.com
[-- Attachment #2: Type: text/html, Size: 1419 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org>]
* Re: for loading own lisp functions, if some in separated files, automatically
[not found] ` <mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org>
@ 2009-07-14 17:42 ` Erhy
2009-07-14 23:05 ` Colin S. Miller
0 siblings, 1 reply; 7+ messages in thread
From: Erhy @ 2009-07-14 17:42 UTC (permalink / raw)
To: help-gnu-emacs
"Peter Dyballa" <Peter_Dyballa@Web.DE> schrieb im Newsbeitrag
news:mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org...
>
> Am 13.07.2009 um 17:34 schrieb Erhy:
>
>> What is the usual way for automatic maintenance, that my .el files are
>> loaded automatically, when
>> starting Emacs?
>
>
> For example: load-file, load-library, require…
>
> --
> Greetings
>
> Pete
>
So I see, there is a dir with .el files and a separate command file,
where each of this .el marked to be loaded.
I hoped there is a standard way, to coordinate the content of the
directory and the associated lines in the command file automatically.
Thank you talking about
Erhy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: for loading own lisp functions, if some in separated files, automatically
2009-07-14 17:42 ` Erhy
@ 2009-07-14 23:05 ` Colin S. Miller
2009-07-14 23:16 ` Colin S. Miller
2009-07-15 0:10 ` Peter Dyballa
0 siblings, 2 replies; 7+ messages in thread
From: Colin S. Miller @ 2009-07-14 23:05 UTC (permalink / raw)
To: help-gnu-emacs
Erhy wrote:
>
> So I see, there is a dir with .el files and a separate command file,
> where each of this .el marked to be loaded.
> I hoped there is a standard way, to coordinate the content of the
> directory and the associated lines in the command file automatically.
>
> Thank you talking about
> Erhy
You mean something like this?
(loop for lib in (directory-files "~/my-emacs-packages/" 't "elc?$" 't) do (load-library lib))
Although that will attempt to load both the .el and .elc should both exist.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: for loading own lisp functions, if some in separated files, automatically
2009-07-14 23:05 ` Colin S. Miller
@ 2009-07-14 23:16 ` Colin S. Miller
2009-07-15 0:10 ` Peter Dyballa
1 sibling, 0 replies; 7+ messages in thread
From: Colin S. Miller @ 2009-07-14 23:16 UTC (permalink / raw)
To: help-gnu-emacs
> You mean something like this?
> (loop for lib in (directory-files "~/my-emacs-packages/" 't "elc?$" 't)
> do (load-library lib))
>
Oops,
That should be
(loop for lib in (directory-files "~/my-emacs-packages/" 't "\.elc?$" 't) do (load-library lib))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: for loading own lisp functions, if some in separated files, automatically
2009-07-14 23:05 ` Colin S. Miller
2009-07-14 23:16 ` Colin S. Miller
@ 2009-07-15 0:10 ` Peter Dyballa
1 sibling, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2009-07-15 0:10 UTC (permalink / raw)
To: Colin S. Miller; +Cc: help-gnu-emacs
Am 15.07.2009 um 01:05 schrieb Colin S. Miller:
> You mean something like this?
> (loop for lib in (directory-files "~/my-emacs-packages/" 't "elc?$"
> 't) do (load-library lib))
No (and also no to the updated version).
Add "~/my-emacs-packages" (or ~/.emacs.d etc., see documentation) to
GNU Emacs' load-path. If your Elisp files have a provide statement
you can require them (i.e., they get loaded when something they
provide gets used). Otherwise load-library has to be used.
And of course I thought you would put a series of load statements
into your init file to be able to comment or uncomment statements,
i.e., to have control of what "gets used." Anyway, if the ELC files
are tested and final versions, you can "load" them in a loop…
--
Greetings
Pete
Perl—the only language that looks the same before and after RSA
encryption.
- Keith Bostic
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-15 0:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 15:34 for loading own lisp functions, if some in separated files, automatically Erhy
2009-07-14 7:39 ` Peter Dyballa
2009-07-14 11:29 ` Abdullah Abdul Khadir
[not found] ` <mailman.2466.1247557209.2239.help-gnu-emacs@gnu.org>
2009-07-14 17:42 ` Erhy
2009-07-14 23:05 ` Colin S. Miller
2009-07-14 23:16 ` Colin S. Miller
2009-07-15 0:10 ` Peter Dyballa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).