From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rainer M Krug Newsgroups: gmane.emacs.help Subject: Re: Can I share ~/.emacs.d/elpa with two machines? Date: Mon, 05 Oct 2015 09:54:24 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1444032521 20077 80.91.229.3 (5 Oct 2015 08:08:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2015 08:08:41 +0000 (UTC) Cc: Help Gnu Emacs mailing list , Stefan Monnier To: Kaushal Modi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 05 10:08:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zj0ou-0006Vq-71 for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Oct 2015 10:08:28 +0200 Original-Received: from localhost ([::1]:44694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj0ca-0001GK-LJ for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Oct 2015 03:55:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj0bU-0001E8-PA for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 03:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj0bQ-0006hS-Mm for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 03:54:36 -0400 Original-Received: from mail-wi0-f182.google.com ([209.85.212.182]:33975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj0bQ-0006hA-DV for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 03:54:32 -0400 Original-Received: by wicfx3 with SMTP id fx3so106750606wic.1 for ; Mon, 05 Oct 2015 00:54:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WtcGdBo9YJWiIb15p2Fr6iDefPrGxwdZGV1o1QVcaGQ=; b=I9OkuZtrlgu5OZ/wG0/BKN450uhfyLpfiM7EmJmM+sRYPUxw8gy8kq09YnUfVAxooM CkIEAY6D+T+JskoP388fXgdAYuuq01kTpakWXfpqOxFzFajItfBwqTQUn8IdbrAQ/bRE n0Itk/viVdYgOhKmc1Ut3AjfndF/F+9XI78UydPoqn3yuySkhOJHNkdPyqobjRKKuTVT 5KDOqqsEk1YCRyBe0kKjpGt1Ep7N9qJAbWf+mGYoCPBNrskP2tZQaMqyw03Mw2RlBV9F /SquRbwy3BKnWb/bJ6q4rEEx04piBcJ3eT9/CrClNIWdTNkF5mc0PE/wZFneMNNrUt/A 2+XQ== X-Received: by 10.194.52.67 with SMTP id r3mr34379359wjo.51.1444031671494; Mon, 05 Oct 2015 00:54:31 -0700 (PDT) Original-Received: from Rainers-MacBook-Pro.local (arn78-1-88-186-171-7.fbx.proxad.net. [88.186.171.7]) by smtp.gmail.com with ESMTPSA id bf8sm25484498wjc.22.2015.10.05.00.54.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 00:54:30 -0700 (PDT) In-Reply-To: (Kaushal Modi's message of "Fri, 2 Oct 2015 15:23:53 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.212.182 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107510 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Kaushal Modi writes: > I also update org via git and faced the compiled code incompatibility > issue. I resolved it the same way .. using version specific compiled org > dirs. > > Here's the full code gathered from various places in my config: > > Part 1: > https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872d= c65fb45515e6/init.el#L9-L13 > (setq user-home-directory (concat (getenv "HOME") "/")) ; must end wi= th > / > (setq user-emacs-directory (concat user-home-directory ".emacs.d/")) ; > must end with / > (setq emacs-version-short (replace-regexp-in-string > "\\([0-9]+\\)\\.\\([0-9]+\\).*" > "\\1_\\2" emacs-version)) ; 25.0.50.1 -> 2= 5_0 > > Part 2: > https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872d= c65fb45515e6/setup-files/setup-org.el#L32-L34 > (add-to-list 'load-path (concat user-emacs-directory > "elisp/org-mode/lisp_" > emacs-version-short "/")) > > Part 3: The nasty part. > Use a shell script or script of your preferred flavor to build org-mode f= or > each of the emacs versions you are using and copy the built lisp/ dir to > the version specific lisp dir. > > #!/bin/tcsh -f > # Build script to compile org mode lisp for different emacs versions > > > # > # Back up your $PATH > # > > alias get_org_mode_lisp_dir_suffix '\emacs --version | \grep -oE '"'"'Ema= cs > [0-9]+\.[0-9]+'"'"' | \awk '"'"'{print $2}'"'"' | \tr "." "_"' > > #** Build for emacs master > > # > # Set the $PATH *here* to use the emacs master (built from latest in git) > # I use something work proprietary like GNU Modules to do this > # > > echo "\nBuilding for emacs version: "`\emacs --version | \grep -E 'Emacs > [0-9]+\.[0-9]+'`"\n" > make clean > make > set org_mode_lisp_dir =3D "lisp_"`get_org_mode_lisp_dir_suffix` > if ( -d "${org_mode_lisp_dir}" ) then > \rm -rf ${org_mode_lisp_dir} > endif > \cp -rf lisp ${org_mode_lisp_dir} > > #** Build for emacs 24.5 > > # > # Set the $PATH *here* to use emacs 24.5 > # I use something work proprietary like GNU Modules to do this > # > > echo "\nBuilding for emacs version: "`\emacs --version | \grep -E 'Emacs > [0-9]+\.[0-9]+'`"\n" > make clean > make > set org_mode_lisp_dir =3D "lisp_"`get_org_mode_lisp_dir_suffix` > if ( -d "${org_mode_lisp_dir}" ) then > \rm -rf ${org_mode_lisp_dir} > endif > \cp -rf lisp ${org_mode_lisp_dir} > > unalias get_org_mode_lisp_dir_suffix > unset {org_mode_lisp_dir} > > # > # Restore your $PATH to point to your default emacs version > # > > Part 4: Restart any one of the versions of emacs for which you compiled t= he > org files in Part 3. The org stuff will work just fine as it would pick o= ut > the org files from the correct lisp_<>/ directory. > > I hope all of this makes sense. Thanks - makes perfect sense. My only question is the contrib directory. I assume I simply also have to copy the files in the same version specific lisp dir? Rainer > > > > -- > Kaushal Modi > > On Fri, Oct 2, 2015 at 3:05 PM, Rainer M Krug wrote: > >> Kaushal Modi writes: >> >> > @Stefan, sharing elpa/ between at least emacs 24.5 and emacs 25.x (git >> > master) does not work as the complied .elc files are not compatible >> between >> > the two versions. >> >> Just jumping in as I have the two version problem. >> >> I am fine with most of my stuff managed by cask, therefore aware of >> versions. But how can I manage org, which is via git? Any smart >> suggestion how I can use this between two versions on one machine? >> >> Rainer >> >> >> > >> > >> > -- >> > Kaushal Modi >> > >> > On Fri, Oct 2, 2015 at 11:54 AM, Stefan Monnier < >> monnier@iro.umontreal.ca> >> > wrote: >> > >> >> Yes, of course. >> >> >> >> Just like you can share it over NFS or any other file system. >> >> You can share them even between different systems using different >> >> Emacs versions, different processor architectures, and/or different >> OSes. >> >> >> >> At least, if that leads to problems, then I'd recommend you file them >> >> as bugs. >> >> >> >> >> >> Stefan >> >> >> >> >> >> >> > >> >> -- >> Rainer M. Krug >> email: Rainerkrugsde >> PGP: 0x0F52F982 >> > =2D-=20 Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWEiy0AAoJENvXNx4PUvmCrUIIANdyvIQ3z9lbl1Uvg5l4F8HS nOgkVTPHtfOBuajkLn+z3z3qPDr+DyQ/EO3NI1yFDG9Kiw5F7lN2QvfD0+YtCmGm hHxXyYVqseisawWDodmS4e0JyC4Ski3UUFz3VbjCSUCGQIonSgMHCmky7rhRsxYx boZ1qqM/MPMUCxVs9wOzB+pmJKgT5YfeUMHzyiyVMYIJsBXC+pfa5jbmA0RoKuXU i/uX9yDGC25OAlO5KTVifAxGou12oAHxuDeDesrRB1/RP9KvfV1rkg5OT+qgoGhS CJdPH2GvjUl0i4xaNE0B0ukNimvLYi24qE87TiAHlzuih1aQnU6+kuoTop4rSFA= =TmZs -----END PGP SIGNATURE----- --=-=-=--