emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Generating autoloads for libraries in contrib
@ 2011-07-26 13:12 suvayu ali
  2011-07-26 18:02 ` Jambunathan K
  0 siblings, 1 reply; 3+ messages in thread
From: suvayu ali @ 2011-07-26 13:12 UTC (permalink / raw)
  To: org-mode mailing list

Hi,

Does anyone know how to generate autoloads for libraries in the
contrib directory? I was hoping generating autoloads would let me
remove some of the (require 'library) from my setup.

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Generating autoloads for libraries in contrib
  2011-07-26 13:12 Generating autoloads for libraries in contrib suvayu ali
@ 2011-07-26 18:02 ` Jambunathan K
  2011-07-26 18:15   ` Achim Gratz
  0 siblings, 1 reply; 3+ messages in thread
From: Jambunathan K @ 2011-07-26 18:02 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi,
>
> Does anyone know how to generate autoloads for libraries in the
> contrib directory? I was hoping generating autoloads would let me
> remove some of the (require 'library) from my setup.

(To satisfy my own curiosity)

IIRC, Achim has added support for the above. I am unable to find the
link right now.

The below snippet is stolen from Makefile and adopted for interactive
use. If you call the below command from the rootdir of installation, it
would create an autoload file in
contrib/lisp/org-contrib-install.el. 

Note: Finding out the right paths is left as an exercise to the reader.

--8<---------------cut here---------------start------------->8---
(defun my-org-contrib-autoloads ()
  (interactive)

  (unless (featurep 'autoload)
    (require 'autoload))

  (let ((file "contrib/lisp/org-contrib-install.el"))
    (with-current-buffer (find-file-noselect file)
      (when (equal (point-min) (point-max))
	(save-excursion (insert "\n(provide 'org-contrib-install)\n")))
      (goto-char (point-min))
      (call-interactively 'generate-file-autoloads)      
      (save-buffer)
      (kill-buffer))))
--8<---------------cut here---------------end--------------->8---

or 

If you look at the above org-contrib-install.el file it simply calls

(autoload ...) 

for the autoloaded things.

So if you often invoke a certain library through just a single command
then you can simply add the (autoload ...) for just that command to
.emacs.

>
> Thanks,

-- 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Generating autoloads for libraries in contrib
  2011-07-26 18:02 ` Jambunathan K
@ 2011-07-26 18:15   ` Achim Gratz
  0 siblings, 0 replies; 3+ messages in thread
From: Achim Gratz @ 2011-07-26 18:15 UTC (permalink / raw)
  To: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:
> suvayu ali <fatkasuvayu+linux@gmail.com> writes:
>> Does anyone know how to generate autoloads for libraries in the
>> contrib directory? I was hoping generating autoloads would let me
>> remove some of the (require 'library) from my setup.
>
> (To satisfy my own curiosity)
>
> IIRC, Achim has added support for the above. I am unable to find the
> link right now.

Indeed, it's http://permalink.gmane.org/gmane.emacs.orgmode/44567

If you copy (or link) additional lisp source files from contrib/ into
lisp/, they will be both byte-compiled and used when the autoloads are
generated, so that

(require 'org-install)

should be all you need.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-26 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-26 13:12 Generating autoloads for libraries in contrib suvayu ali
2011-07-26 18:02 ` Jambunathan K
2011-07-26 18:15   ` Achim Gratz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).