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: Solved: Can I share ~/.emacs.d/elpa with two machines? Date: Mon, 05 Oct 2015 17:21: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 1444058526 21919 80.91.229.3 (5 Oct 2015 15:22:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2015 15:22:06 +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 17:21:58 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 1Zj7aP-0007fV-Ut for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Oct 2015 17:21:58 +0200 Original-Received: from localhost ([::1]:46253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj7aP-00054o-Dh for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Oct 2015 11:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj7a8-00054J-8H for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 11:21:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj7a1-0004kn-SA for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 11:21:40 -0400 Original-Received: from mail-wi0-f169.google.com ([209.85.212.169]:35073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj7a1-0004kT-JQ for help-gnu-emacs@gnu.org; Mon, 05 Oct 2015 11:21:33 -0400 Original-Received: by wicge5 with SMTP id ge5so125756326wic.0 for ; Mon, 05 Oct 2015 08:21:33 -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=wWqdBxzmjISL83rhpfC9a5DjDhEUzAO1uTOENUBUoIg=; b=IaMjFMjDT6Evgh8Ep5d7HYQj2BRzyd5nSvx13pFCwdsyt2pgKrMpOQyuxFHeHZoBpy nEE2Xgz/6Pk6K5Fu8FicRrmKDo3fPyYmEmX1yHQRXCemQh2QKMmoqqyJED6+axjKfH/l j1o/gm5zn4YWjAEiPeDq70SLYtG4S3is1fp1xwq1DdiLW8K3WCXWhMCn9q1MTBqrK7nz 95/BlVlSFz730GInlO/GpWQVCWqmSQ424Pkotb4y56qyz06RdEII9ECZGrPQpWzTGE/F Nol82i9BA+JFCv+J4FyT+yQyJCwOiOCo++YhYAxCoG9Ww75gPJSPO6tH2bSGz2K3DQQu +/tg== X-Received: by 10.194.76.237 with SMTP id n13mr34095784wjw.128.1444058492862; Mon, 05 Oct 2015 08:21:32 -0700 (PDT) Original-Received: from Rainers-MacBook-Pro.local ([2a01:e35:8baa:b070:94b0:cd5:602f:b5d6]) by smtp.gmail.com with ESMTPSA id i7sm15169306wij.9.2015.10.05.08.21.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 08:21:31 -0700 (PDT) In-Reply-To: (Kaushal Modi's message of "Mon, 5 Oct 2015 08:46:33 -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.169 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:107519 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thanks everybody for your input. I an=3Dm using =3Dnow the following setup: I am using cask and pallet for all packages installed via the package manager (I am also using use-package) for org-mode and ess I use the uncompiled packages so using them from different versions does not cause any headaches and makes debugging easier. Thanks again, Rainer Kaushal Modi writes: >> My only question is the contrib directory. I assume I simply also have to > copy the files in the same version specific lisp dir? > > For contrib packages (well, only one package that I use from there), I use > the org-plus-contrib package from the Org Elpa > > (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) > > I have version-specific package-user-dir, so I have org-plus-contrib > installed and compiled for all emacs versions in their own elpa_ > directories. > > ;; Create the package install directory if it doesn't exist > (setq package-user-dir (concat user-emacs-directory "elpa_" > emacs-version-short "/")) ; default =3D > ~/.emacs.d/elpa/ > > I prefer to have both the dev version and stable version of org installed. > So that if needed, I can switch between the two by toggling a variable and > restarting emacs. As the package that I use from contrib does not need to > be cutting-edge, I just use it from the already installed stable > org-plus-contrib :) > > I use something like this for org version switching (if you are intereste= d): > > (when (bound-and-true-p org-load-version-dev) > ;; if `org-load-version-dev' is non-nil > (add-to-list 'load-path (concat user-emacs-directory > "elisp/org-mode/lisp_" > emacs-version-short "/"))) > > If I don't have the org-load-version-dev set to any value or if I have set > it to nil in my emacs config, the org-plus-contrib (stable version) > installed by the package manager will be used by default. > > > > -- > Kaushal Modi > > On Mon, Oct 5, 2015 at 3:54 AM, Rainer M Krug wrote: > >> 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 o= rg >> > dirs. >> > >> > Here's the full code gathered from various places in my config: >> > >> > Part 1: >> > >> https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872= dc65fb45515e6/init.el#L9-L13 >> > (setq user-home-directory (concat (getenv "HOME") "/")) ; must end >> with >> > / >> > (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 -> >> 25_0 >> > >> > Part 2: >> > >> https://github.com/kaushalmodi/.emacs.d/blob/56b84df6ff399ab65c040d4d872= dc65fb45515e6/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 >> for >> > 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 >> '"'"'Emacs >> > [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 g= it) >> > # I use something work proprietary like GNU Modules to do this >> > # >> > >> > echo "\nBuilding for emacs version: "`\emacs --version | \grep -E 'Ema= cs >> > [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 'Ema= cs >> > [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 >> the >> > org files in Part 3. The org stuff will work just fine as it would pick >> out >> > 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 t= hem >> >> >> as bugs. >> >> >> >> >> >> >> >> >> Stefan >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> -- >> >> Rainer M. Krug >> >> email: Rainerkrugsde >> >> PGP: 0x0F52F982 >> >> >> > >> >> -- >> Rainer M. Krug >> email: Rainerkrugsde >> PGP: 0x0F52F982 >> =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWEpV5AAoJENvXNx4PUvmCN4AH/1NKq4XidCezrMgob3I2Fzml LmeKDmVrDKew5ubtlJHWgug1ubkB50XqxRQvn/mFepkJDZ2kldKo75mN9+GP/9TV v4nulLGPFxc4IzSLINkqDYXFLjukjasfx4XwwonjWWhY8VGxiW6L7nNkm6yab6Ul 6LkRdCm7YaeK0kQ0dpC/WizXd3jrfX94pHrfMa7/xWFB/5pYMdtOa9YEBJZuhq7M k3t4xDL0h4akA4quU7VeAilp/oFta1ATNfAoBggA6sq+LlEqcliTHDCrXFrcM6ms BmGrdfGvYOeYjAs19OwK+/4OP2mwY/NzWY0LO6ogOcoOqFj7OYZ2SK3AIxmnV0o= =AQ34 -----END PGP SIGNATURE----- --=-=-=--