* How to install packages
@ 2006-07-04 10:09 news
2006-07-04 11:05 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: news @ 2006-07-04 10:09 UTC (permalink / raw)
Hi
Sorry about posting again on here - hopefully eventually I'll learn
enough so I can help others on here!
My question at the moment is about installing packages. I managed to
install mode-compile, by copying the .el file into a certain directory,
making sure that directory was referenced in (add-to-list) in my
.emacs and putting this in my .emacs as well:
(autoload 'mode-compile "mode-compile"
"Command to compile current buffer file based on the major mode" t)
I am now trying to install the help+ package - which I have got as a
file called help+.el and I've put it in the same directory as the
mode-compile file, and then put this in my .emacs:
(autoload 'help+ "help+"
"Command to give better help" t)
but it isn't working.
Again I'm probably doing something silly here - but I'm not sure what. I
also can't seem to find a simple guide to installing packages on the
internet anywhere, and not all packages seem to have instructions at the
top of their .el file.
Cheers,
Robin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to install packages
2006-07-04 10:09 How to install packages news
@ 2006-07-04 11:05 ` Peter Dyballa
2006-07-04 12:03 ` Tassilo Horn
2006-07-04 20:38 ` Drew Adams
2 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2006-07-04 11:05 UTC (permalink / raw)
Am 04.07.2006 um 12:09 schrieb news:
> (autoload 'help+ "help+"
> "Command to give better help" t)
>
> but it isn't working.
What is your proof? Autoload does not "compile-in" that package, it
just allows you to use a few more functions and variables, those from
this package. Once you use such a function or variable or access the
package's customisation interface, it really gets "loaded." This is a
feature of Emacs Lisp, at least.
>
> Again I'm probably doing something silly here - but I'm not sure
> what. I also can't seem to find a simple guide to installing
> packages on the internet anywhere, and not all packages seem to
> have instructions at the top of their .el file.
Some packages offer a provide, then you simply require them. To
install any Elisp code put these files into a directory mentioned in
the variable load-path. Best is to choose something site specific.
Putting lines like these into a file that is loaded early you can see
in *Messages* what gets loaded:
(defadvice load (before debug-log activate)
(message "(Hinted by Kai G) Loading now: %s" (ad-get-arg 0)))
--
Greetings
Pete
War springs from unseen and generally insignificant causes.
-- Anonymous
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to install packages
2006-07-04 10:09 How to install packages news
2006-07-04 11:05 ` Peter Dyballa
@ 2006-07-04 12:03 ` Tassilo Horn
2006-07-04 20:38 ` Drew Adams
2 siblings, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2006-07-04 12:03 UTC (permalink / raw)
news <"r.t.wilson(news)"@rmplc.co.uk> writes:
Hi!
> I am now trying to install the help+ package - which I have got as a
> file called help+.el and I've put it in the same directory as the
> mode-compile file, and then put this in my .emacs:
>
> (autoload 'help+ "help+"
> "Command to give better help" t)
>
> but it isn't working.
The problem is, that `help+' is no function name.
,----[ C-h f autoload RET ]
| autoload is a built-in function in `C source code'.
| (autoload FUNCTION FILE &optional DOCSTRING INTERACTIVE TYPE)
|
| Define FUNCTION to autoload from FILE.
| FUNCTION is a symbol; FILE is a file name string to pass to `load'.
| Third arg DOCSTRING is documentation for the function.
| Fourth arg INTERACTIVE if non-nil says function can be called
| interactively.
| Fifth arg TYPE indicates the type of the object:
| nil or omitted says FUNCTION is a function,
| `keymap' says FUNCTION is really a keymap, and
| `macro' or t says FUNCTION is really a macro.
| Third through fifth args give info about the real definition.
| They default to nil.
| If FUNCTION is already defined other than as an autoload,
| this does nothing and returns nil.
`----
Instead of autoload, you have to use `require' here:
(require 'help+)
For more infos on autoload have a look at the info page:
,----[ (info "(elisp)Autoload") ]
| The "autoload" facility allows you to make a function or macro
| known in Lisp, but put off loading the file that defines it. The
| first call to the function automatically reads the proper file to
| install the real definition and other associated code, then runs the
| real definition as if it had been loaded all along.
`----
HTH,
Tassilo
--
A child of five could understand this! Fetch me a child of five!
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: How to install packages
2006-07-04 10:09 How to install packages news
2006-07-04 11:05 ` Peter Dyballa
2006-07-04 12:03 ` Tassilo Horn
@ 2006-07-04 20:38 ` Drew Adams
2 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2006-07-04 20:38 UTC (permalink / raw)
(autoload 'help+ "help+" "Command to give better help" t)
Others have told you about (require 'help+), which should be all you need.
Just to avoid other problems, let me point out that help+.el works with
Emacs 20, not 21 or 22. I haven't yet tried to port its features to 21 & 22.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.3746.1152045523.9609.help-gnu-emacs@gnu.org>]
* Re: How to install packages
[not found] <mailman.3746.1152045523.9609.help-gnu-emacs@gnu.org>
@ 2006-07-04 20:45 ` Robin Wilson
2006-07-04 21:04 ` Colin S. Miller
2006-07-04 22:09 ` Drew Adams
0 siblings, 2 replies; 7+ messages in thread
From: Robin Wilson @ 2006-07-04 20:45 UTC (permalink / raw)
Drew Adams wrote:
> (autoload 'help+ "help+" "Command to give better help" t)
>
> Others have told you about (require 'help+), which should be all you need.
>
> Just to avoid other problems, let me point out that help+.el works with
> Emacs 20, not 21 or 22. I haven't yet tried to port its features to 21 & 22.
>
>
>
Hi
Thanks for telling me that Drew - I didn't realise (I'm sure it says
somewhere but I just didn't look!). Just out of interest, how do I find
out my emacs version? I think it is one of the latest ones but I'm not
too sure...
Cheers,
Robin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to install packages
2006-07-04 20:45 ` Robin Wilson
@ 2006-07-04 21:04 ` Colin S. Miller
2006-07-04 22:09 ` Drew Adams
1 sibling, 0 replies; 7+ messages in thread
From: Colin S. Miller @ 2006-07-04 21:04 UTC (permalink / raw)
Robin Wilson wrote:
>
> Thanks for telling me that Drew - I didn't realise (I'm sure it says
> somewhere but I just didn't look!). Just out of interest, how do I find
> out my emacs version? I think it is one of the latest ones but I'm not
> too sure...
>
> Cheers,
>
> Robin
M-x emacs-version
--
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: How to install packages
2006-07-04 20:45 ` Robin Wilson
2006-07-04 21:04 ` Colin S. Miller
@ 2006-07-04 22:09 ` Drew Adams
1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2006-07-04 22:09 UTC (permalink / raw)
> Just to avoid other problems, let me point out that help+.el
> works with Emacs 20, not 21 or 22.
Thanks for telling me that Drew - I didn't realise (I'm sure it says
somewhere but I just didn't look!).
Each of my libraries has this in the file header:
;; Compatibility: GNU Emacs 20.x
or
;; Compatibility: GNU Emacs 20.x, GNU Emacs 21.x, GNU Emacs 22.x
etc.
Also, if you picked up help+.el from Emacs Wiki, then the page listing my
libraries (http://www.emacswiki.org/cgi-bin/wiki/DrewsElispLibraries) has:
- section "Which Emacs Version", about version support
- lists of libraries for different Emacs versions:
. "Emacs 22 (and 21 (and 20 (and ...)))"
. "Emacs 22 and Emacs 21 (will not work in older versions)"
. "Emacs 20"
help+.el is listed in the last of these sections, for Emacs 20 only.
how do I find out my emacs version?
Menu Help > Show Version or Help > About Emacs, or, as Colin mentioned, `C-h
v emacs-version'.
HTH.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-07-04 22:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04 10:09 How to install packages news
2006-07-04 11:05 ` Peter Dyballa
2006-07-04 12:03 ` Tassilo Horn
2006-07-04 20:38 ` Drew Adams
[not found] <mailman.3746.1152045523.9609.help-gnu-emacs@gnu.org>
2006-07-04 20:45 ` Robin Wilson
2006-07-04 21:04 ` Colin S. Miller
2006-07-04 22:09 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.