From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Moving my init.el to Org Date: Wed, 03 Sep 2014 08:49:36 +0200 Message-ID: References: <20140831103706.549dc45b@aga-netbook> <87y4u25h2r.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4O4-0007Zr-Mo for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP4O0-0000rg-FJ for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:49:48 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:43484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP4O0-0000rc-9T for emacs-orgmode@gnu.org; Wed, 03 Sep 2014 02:49:44 -0400 Received: by mail-we0-f174.google.com with SMTP id u57so8085167wes.33 for ; Tue, 02 Sep 2014 23:49:43 -0700 (PDT) In-Reply-To: (Jonathan Leech-Pepin's message of "Tue, 2 Sep 2014 08:52:28 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jonathan Leech-Pepin Cc: Org Mode Mailing List , Rasmus --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jonathan Leech-Pepin writes: > Hello, > > On 2 September 2014 08:42, Rasmus wrote: > >> Rainer M Krug writes: >> >> > Oleh writes: >> > >> >>> I know that I could use org-babel-load-file, or outshine. What are >> >>> other possibilities? What are the caveats (and advantages) of both >> >>> (other?) ways? >> >> >> >> I'm using a one .el file per mode approach, with around 4000 lines >> >> split into 40 files. >> >> >> >> This approach simplifies things a lot: for instance I haven't touched >> >> Javascript in ages, but all my customizations for it are sitting in >> >> javascript.el without getting in the way of the stuff that I'm using >> >> now. They aren't even loaded unless I open a js file. >> > >> > Interesting - is your configuration online, so that one could take a >> > look at it? I did not find them on your github page? >> > >> > Or how do you do it, that the e.g. javascript.el is only loaded when a >> > js file is opened? Because this is exactly what I would like to have. >> >> How about something like this: >> >> (with-eval-after-load 'js-mode (load "javascript.el")) >> >> Use eval-after-load if you are using an older Emacs. Note I don't >> know if there's anything called js-mode. . . >> > > I've been using use-package (https://github.com/jwiegley/use-package) for > only loading the various package-specific configurations when needed. > > For that example it would be: > > (use-package js-mode > :mode ("\\.js\\'" . js-mode) > :config (require 'javascript) ;; or (load "javascript.el") if not provi= ded > ) That is what I was looking for - I'll try it out soon - step by step - one package at a time. > > In my case it's still all in my init.el (with Outshine headings for each > mode that use-package manages), but could easily extract the portions into > their own files (especially for larger configurations like org) I think it makes sense to extract these into different files, and have them in one org file which is then tangled. Thanks, Rainer > > Regards, > Jon =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJUBroEAAoJENvXNx4PUvmCHeEIANJ77jTk8micb51vUkhehAx/ jSUBWVrBimT6OW59ugWBrSrAwDedttLDJjDlm5AOOsFu+bsRSUX/Q2egQUMxqLvK ZzUSbAjkkt5edDkN0s+nKNlkx1/1mQZ9YxTBGLjcVYBXcfMd2kwzyhjvFrNklDS0 9EIGAbgUVuf5v+tTtyxKjvxpZU7FnqwhtcZzb7C+Rdwl9iShisimJt9TAG+Hd94w qumSMvjx6IZ+8t6dETOhGIoS4qGsxHbsB7pLheClQ6gGpsk02ANSkkrucnJIWudy xOVOK91eY7c/xcN8rlgP9EHXzSyOWCxE5QWz/ApXELjqySGEt+yQ1++ZmxZAo7U= =lHbI -----END PGP SIGNATURE----- --=-=-=--