* Can I share ~/.emacs.d/elpa with two machines? @ 2015-10-02 14:03 Jorge 2015-10-02 15:54 ` Stefan Monnier 2015-10-02 15:59 ` Kaushal Modi 0 siblings, 2 replies; 18+ messages in thread From: Jorge @ 2015-10-02 14:03 UTC (permalink / raw) To: help-gnu-emacs I use a cloud synchronization service, which provides the folder ~/$cloud_folder/ both in my personal notebook and in my work desktop. My personal notebook's ~/.emacs.d is synchronized with the cloud synchronization service through a symlink: ~/.emacs.d -> ~/$cloud_folder/.emacs.d In my work desktop, I have a separate ~/.emacs.d - it is not completely synchronized with the cloud - but I do symlink init.el to the cloud via a symlink: ~/.emacs.d/init.el -> ~/$cloud_folder/.emacs.d/init.el Therefore, both machines share the same init.el. Can I also symlink ~/.emacs.d/elpa to the cloud, so that both machines would share the same ~/.emacs.d/elpa ? They both run emacs 24.5 (compiled from source) on Ubuntu 15.04 on AMD64. Regards -- - Prefira formatos abertos como PDF, ODF, TeX, Vorbis, Opus, WebM e 7z. - Software livre, gratuito e de qualidade: - www.cyanogenmod.org - www.libreoffice.org - www.ubuntu.com - http://www.gnu.org/software/emacs/ (para programadores) - https://www.telegram.org/ ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 14:03 Can I share ~/.emacs.d/elpa with two machines? Jorge @ 2015-10-02 15:54 ` Stefan Monnier 2015-10-02 17:05 ` Kaushal Modi 2015-10-02 15:59 ` Kaushal Modi 1 sibling, 1 reply; 18+ messages in thread From: Stefan Monnier @ 2015-10-02 15:54 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 15:54 ` Stefan Monnier @ 2015-10-02 17:05 ` Kaushal Modi 2015-10-02 19:05 ` Rainer M Krug 2015-10-02 19:35 ` Stefan Monnier 0 siblings, 2 replies; 18+ messages in thread From: Kaushal Modi @ 2015-10-02 17:05 UTC (permalink / raw) To: Stefan Monnier; +Cc: Help Gnu Emacs mailing list @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. -- 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 > > > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 17:05 ` Kaushal Modi @ 2015-10-02 19:05 ` Rainer M Krug 2015-10-02 19:23 ` Kaushal Modi 2015-10-03 20:04 ` Phillip Lord 2015-10-02 19:35 ` Stefan Monnier 1 sibling, 2 replies; 18+ messages in thread From: Rainer M Krug @ 2015-10-02 19:05 UTC (permalink / raw) To: Kaushal Modi; +Cc: Help Gnu Emacs mailing list, Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 1059 bytes --] Kaushal Modi <kaushal.modi@gmail.com> 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: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 19:05 ` Rainer M Krug @ 2015-10-02 19:23 ` Kaushal Modi 2015-10-05 7:54 ` Rainer M Krug 2015-10-03 20:04 ` Phillip Lord 1 sibling, 1 reply; 18+ messages in thread From: Kaushal Modi @ 2015-10-02 19:23 UTC (permalink / raw) To: Rainer M Krug; +Cc: Help Gnu Emacs mailing list, Stefan Monnier 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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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 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 = "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 = "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_<<emacs-version-short>>/ directory. I hope all of this makes sense. -- Kaushal Modi On Fri, Oct 2, 2015 at 3:05 PM, Rainer M Krug <Rainer@krugs.de> wrote: > Kaushal Modi <kaushal.modi@gmail.com> 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: Rainer<at>krugs<dot>de > PGP: 0x0F52F982 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 19:23 ` Kaushal Modi @ 2015-10-05 7:54 ` Rainer M Krug 2015-10-05 10:19 ` Suvayu Ali 2015-10-05 12:46 ` Kaushal Modi 0 siblings, 2 replies; 18+ messages in thread From: Rainer M Krug @ 2015-10-05 7:54 UTC (permalink / raw) To: Kaushal Modi; +Cc: Help Gnu Emacs mailing list, Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 4553 bytes --] Kaushal Modi <kaushal.modi@gmail.com> 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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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 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 = "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 = "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_<<emacs-version-short>>/ 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 <Rainer@krugs.de> wrote: > >> Kaushal Modi <kaushal.modi@gmail.com> 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: Rainer<at>krugs<dot>de >> PGP: 0x0F52F982 >> > -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 7:54 ` Rainer M Krug @ 2015-10-05 10:19 ` Suvayu Ali 2015-10-05 11:34 ` Rainer M Krug 2015-10-05 12:55 ` Kaushal Modi 2015-10-05 12:46 ` Kaushal Modi 1 sibling, 2 replies; 18+ messages in thread From: Suvayu Ali @ 2015-10-05 10:19 UTC (permalink / raw) To: help-gnu-emacs On Mon, Oct 05, 2015 at 09:54:24AM +0200, Rainer M Krug wrote: > > 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? Add something like this to local.mk (if non-existent, create one) ORG_ADD_CONTRIB = org-notmuch ox-groff ox-koma-letter Also, I would recommend running uncompiled rather than deal with versions. $ make autoloads and that's it. Cheers, -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 10:19 ` Suvayu Ali @ 2015-10-05 11:34 ` Rainer M Krug 2015-10-05 13:13 ` Suvayu Ali 2015-10-05 12:55 ` Kaushal Modi 1 sibling, 1 reply; 18+ messages in thread From: Rainer M Krug @ 2015-10-05 11:34 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 1264 bytes --] Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > On Mon, Oct 05, 2015 at 09:54:24AM +0200, Rainer M Krug wrote: >> >> 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? > > Add something like this to local.mk (if non-existent, create one) > > ORG_ADD_CONTRIB = org-notmuch ox-groff ox-koma-letter Thanks - haven't looked at that file yet. So than the specified files would be compiled and put in the contrib directory or copied in the lisp directory? > > Also, I would recommend running uncompiled rather than deal with > versions. Makes sense. > > $ make autoloads > Ok - so the sequence : make clean make autoloads make doc make info would build all needed files incl documentation? At the moment I was using make update Would compiling have any advantages over un-compiled, besides of speed? But as org-mode does not do any exorbitant calculations, I would assume that the only workflows where the speed issue comes in is tangling and publishing and org-lint? Thanks, Rainer > and that's it. > > Cheers, -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 11:34 ` Rainer M Krug @ 2015-10-05 13:13 ` Suvayu Ali 2015-10-05 13:45 ` Rainer M Krug 0 siblings, 1 reply; 18+ messages in thread From: Suvayu Ali @ 2015-10-05 13:13 UTC (permalink / raw) To: help-gnu-emacs On Mon, Oct 05, 2015 at 01:34:15PM +0200, Rainer M Krug wrote: > Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > > > On Mon, Oct 05, 2015 at 09:54:24AM +0200, Rainer M Krug wrote: > >> > >> 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? > > > > Add something like this to local.mk (if non-existent, create one) > > > > ORG_ADD_CONTRIB = org-notmuch ox-groff ox-koma-letter > > Thanks - haven't looked at that file yet. So than the specified files > would be compiled and put in the contrib directory or copied in the lisp directory? Yes, see the documentation on worg for details. http://orgmode.org/worg/dev/org-build-system.html#sec-4-1-2 > Ok - so the sequence : > > make clean When running uncompiled, this might not be needed; not sure. > make autoloads > make doc > make info If you do `make doc', the above is redundant. See the build system page I linked above. > would build all needed files incl documentation? Yes. AFAIU, building pdf docs, or info pages have no connection with compiling Org. > Would compiling have any advantages over un-compiled, besides of speed? Not that I know of. In fact, it would be easier to debug in case you hit bugs. Given that you follow master, that's probably not uncommon. > But as org-mode does not do any exorbitant calculations, I would assume > that the only workflows where the speed issue comes in is tangling and > publishing and org-lint? I don't know. Nicolas, and maybe Rasmus are better equipped to answer these questions. You might want to ask on the Org list. Cheers, -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 13:13 ` Suvayu Ali @ 2015-10-05 13:45 ` Rainer M Krug 0 siblings, 0 replies; 18+ messages in thread From: Rainer M Krug @ 2015-10-05 13:45 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 2039 bytes --] Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: > On Mon, Oct 05, 2015 at 01:34:15PM +0200, Rainer M Krug wrote: >> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes: >> >> > On Mon, Oct 05, 2015 at 09:54:24AM +0200, Rainer M Krug wrote: >> >> >> >> 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? >> > >> > Add something like this to local.mk (if non-existent, create one) >> > >> > ORG_ADD_CONTRIB = org-notmuch ox-groff ox-koma-letter >> >> Thanks - haven't looked at that file yet. So than the specified files >> would be compiled and put in the contrib directory or copied in the lisp directory? > > Yes, see the documentation on worg for details. > > http://orgmode.org/worg/dev/org-build-system.html#sec-4-1-2 > >> Ok - so the sequence : >> >> make clean > > When running uncompiled, this might not be needed; not sure. > >> make autoloads >> make doc >> make info > > If you do `make doc', the above is redundant. See the build system page > I linked above. > >> would build all needed files incl documentation? > > Yes. AFAIU, building pdf docs, or info pages have no connection with > compiling Org. > >> Would compiling have any advantages over un-compiled, besides of speed? > > Not that I know of. In fact, it would be easier to debug in case you > hit bugs. Given that you follow master, that's probably not uncommon. > >> But as org-mode does not do any exorbitant calculations, I would assume >> that the only workflows where the speed issue comes in is tangling and >> publishing and org-lint? > > I don't know. Nicolas, and maybe Rasmus are better equipped to answer > these questions. You might want to ask on the Org list. OK - thanks a lot for all your valuable info - I will use org uncompiled then and see how it goes, Cheers, Rainer > > Cheers, -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 10:19 ` Suvayu Ali 2015-10-05 11:34 ` Rainer M Krug @ 2015-10-05 12:55 ` Kaushal Modi 1 sibling, 0 replies; 18+ messages in thread From: Kaushal Modi @ 2015-10-05 12:55 UTC (permalink / raw) To: Help Gnu Emacs mailing list, Suvayu Ali > Add something like this to local.mk (if non-existent, create one) Thanks Suvayu, that was good to know. I wasn't aware of that. -- Kaushal Modi On Mon, Oct 5, 2015 at 6:19 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote: > On Mon, Oct 05, 2015 at 09:54:24AM +0200, Rainer M Krug wrote: > > > > 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? > > Add something like this to local.mk (if non-existent, create one) > > ORG_ADD_CONTRIB = org-notmuch ox-groff ox-koma-letter > > Also, I would recommend running uncompiled rather than deal with > versions. > > $ make autoloads > > and that's it. > > Cheers, > > -- > Suvayu > > Open source is the future. It sets us free. > > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 7:54 ` Rainer M Krug 2015-10-05 10:19 ` Suvayu Ali @ 2015-10-05 12:46 ` Kaushal Modi 2015-10-05 13:16 ` Suvayu Ali 2015-10-05 15:21 ` Solved: " Rainer M Krug 1 sibling, 2 replies; 18+ messages in thread From: Kaushal Modi @ 2015-10-05 12:46 UTC (permalink / raw) To: Rainer M Krug; +Cc: Help Gnu Emacs mailing list, Stefan Monnier > 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_<version> directories. ;; Create the package install directory if it doesn't exist (setq package-user-dir (concat user-emacs-directory "elpa_" emacs-version-short "/")) ; default = ~/.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 interested): (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 <Rainer@krugs.de> wrote: > Kaushal Modi <kaushal.modi@gmail.com> 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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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 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 = "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 = "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_<<emacs-version-short>>/ 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 <Rainer@krugs.de> wrote: > > > >> Kaushal Modi <kaushal.modi@gmail.com> 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: Rainer<at>krugs<dot>de > >> PGP: 0x0F52F982 > >> > > > > -- > Rainer M. Krug > email: Rainer<at>krugs<dot>de > PGP: 0x0F52F982 > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 12:46 ` Kaushal Modi @ 2015-10-05 13:16 ` Suvayu Ali 2015-10-05 13:56 ` Kaushal Modi 2015-10-05 15:21 ` Solved: " Rainer M Krug 1 sibling, 1 reply; 18+ messages in thread From: Suvayu Ali @ 2015-10-05 13:16 UTC (permalink / raw) To: help-gnu-emacs On Mon, Oct 05, 2015 at 08:46:33AM -0400, Kaushal Modi wrote: > > 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 I don't think it's a good idea to mix the git version of Org with elpa. It needlessly complicates the setup, and you are more likely fall foul to the infamous mixed install issue. http://orgmode.org/worg/org-faq.html#mixed-install -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 13:16 ` Suvayu Ali @ 2015-10-05 13:56 ` Kaushal Modi 0 siblings, 0 replies; 18+ messages in thread From: Kaushal Modi @ 2015-10-05 13:56 UTC (permalink / raw) To: Help Gnu Emacs mailing list > I don't think it's a good idea to mix the git version of Org with elpa. It needlessly complicates the setup, and you are more likely fall foul to the infamous mixed install issue. Yes, I am aware of the risk factor. I add the dev version org-mode lisp/ dir to the very top in the `load-path` array. So as long as a package is found in the dev version lisp/ dir, emacs will not try to hunt for those in the package manager installed org-plus-contrib dir. So only the contrib/ area packages end up being picked from the org-plus-contrib. I am using this mixed installation for few months now without any problem. That said, now that I know of local.mk, I know what to do if this setup starts giving me trouble! -- Kaushal Modi On Mon, Oct 5, 2015 at 9:16 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote: > On Mon, Oct 05, 2015 at 08:46:33AM -0400, Kaushal Modi wrote: > > > 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 > > I don't think it's a good idea to mix the git version of Org with elpa. > It needlessly complicates the setup, and you are more likely fall foul > to the infamous mixed install issue. > > http://orgmode.org/worg/org-faq.html#mixed-install > > -- > Suvayu > > Open source is the future. It sets us free. > > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Solved: Can I share ~/.emacs.d/elpa with two machines? 2015-10-05 12:46 ` Kaushal Modi 2015-10-05 13:16 ` Suvayu Ali @ 2015-10-05 15:21 ` Rainer M Krug 1 sibling, 0 replies; 18+ messages in thread From: Rainer M Krug @ 2015-10-05 15:21 UTC (permalink / raw) To: Kaushal Modi; +Cc: Help Gnu Emacs mailing list, Stefan Monnier [-- Attachment #1: Type: text/plain, Size: 7634 bytes --] Thanks everybody for your input. I an=m using =now 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 <kaushal.modi@gmail.com> 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_<version> > directories. > > ;; Create the package install directory if it doesn't exist > (setq package-user-dir (concat user-emacs-directory "elpa_" > emacs-version-short "/")) ; default = > ~/.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 interested): > > (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 <Rainer@krugs.de> wrote: > >> Kaushal Modi <kaushal.modi@gmail.com> 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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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/56b84df6ff399ab65c040d4d872dc65fb45515e6/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 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 = "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 = "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_<<emacs-version-short>>/ 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 <Rainer@krugs.de> wrote: >> > >> >> Kaushal Modi <kaushal.modi@gmail.com> 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: Rainer<at>krugs<dot>de >> >> PGP: 0x0F52F982 >> >> >> > >> >> -- >> Rainer M. Krug >> email: Rainer<at>krugs<dot>de >> PGP: 0x0F52F982 >> -- 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 19:05 ` Rainer M Krug 2015-10-02 19:23 ` Kaushal Modi @ 2015-10-03 20:04 ` Phillip Lord 1 sibling, 0 replies; 18+ messages in thread From: Phillip Lord @ 2015-10-03 20:04 UTC (permalink / raw) To: Rainer M Krug; +Cc: Help Gnu Emacs mailing list, Stefan Monnier, Kaushal Modi Rainer M Krug <Rainer@krugs.de> writes: > Kaushal Modi <kaushal.modi@gmail.com> 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? I use "use-package" and ":ensure" which pulls down everything from ELPA. So I share my .emacs between machines but not my elpa directory. In terms of supporting multiple versions of Emacs, I use this.... (setq package-user-dir (concat "~/.emacs.d/elpa/" ;; if we use emacs-version we get a ;; LOT of pre-release directories. (int-to-string emacs-major-version) "." (int-to-string emacs-minor-version))) With org, not sure what the problem is? You want to run this directly off a git clone? I wrote "git-update.el" for use with use-package -- you should just be able to clone org twice. Phil ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 17:05 ` Kaushal Modi 2015-10-02 19:05 ` Rainer M Krug @ 2015-10-02 19:35 ` Stefan Monnier 1 sibling, 0 replies; 18+ messages in thread From: Stefan Monnier @ 2015-10-02 19:35 UTC (permalink / raw) To: help-gnu-emacs > @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. Indeed, I realize just after I hit "send" that there is already a known bug in that area: if you share that directory between different Emacs versions, you have to be careful to always install the packages with the *older* Emacs version: a package installed with Emacs-NN will should work fine on Emacs≥NN, but the reverse is not necessarily true. Stefan ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Can I share ~/.emacs.d/elpa with two machines? 2015-10-02 14:03 Can I share ~/.emacs.d/elpa with two machines? Jorge 2015-10-02 15:54 ` Stefan Monnier @ 2015-10-02 15:59 ` Kaushal Modi 1 sibling, 0 replies; 18+ messages in thread From: Kaushal Modi @ 2015-10-02 15:59 UTC (permalink / raw) To: Jorge; +Cc: Help Gnu Emacs mailing list Sharing init.el and elpa/ should be fine as long as it is shared by emacscen of the same version. -- Kaushal Modi On Fri, Oct 2, 2015 at 10:03 AM, Jorge <jorge13515@gmail.com> wrote: > I use a cloud synchronization service, which provides the folder > ~/$cloud_folder/ > both in my personal notebook and in my work desktop. > My personal notebook's ~/.emacs.d is synchronized with the cloud > synchronization service through a symlink: > ~/.emacs.d -> ~/$cloud_folder/.emacs.d > In my work desktop, I have a separate ~/.emacs.d - it is not > completely synchronized with the cloud - but I do symlink init.el to > the cloud via a symlink: > ~/.emacs.d/init.el -> ~/$cloud_folder/.emacs.d/init.el > Therefore, both machines share the same init.el. > > Can I also symlink ~/.emacs.d/elpa to the cloud, so that both machines > would share the same ~/.emacs.d/elpa ? They both run emacs 24.5 > (compiled from source) on Ubuntu 15.04 on AMD64. > > Regards > > -- > - Prefira formatos abertos como PDF, ODF, TeX, Vorbis, Opus, WebM e 7z. > - Software livre, gratuito e de qualidade: > - www.cyanogenmod.org > - www.libreoffice.org > - www.ubuntu.com > - http://www.gnu.org/software/emacs/ (para programadores) > - https://www.telegram.org/ > > ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2015-10-05 15:21 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-02 14:03 Can I share ~/.emacs.d/elpa with two machines? Jorge 2015-10-02 15:54 ` Stefan Monnier 2015-10-02 17:05 ` Kaushal Modi 2015-10-02 19:05 ` Rainer M Krug 2015-10-02 19:23 ` Kaushal Modi 2015-10-05 7:54 ` Rainer M Krug 2015-10-05 10:19 ` Suvayu Ali 2015-10-05 11:34 ` Rainer M Krug 2015-10-05 13:13 ` Suvayu Ali 2015-10-05 13:45 ` Rainer M Krug 2015-10-05 12:55 ` Kaushal Modi 2015-10-05 12:46 ` Kaushal Modi 2015-10-05 13:16 ` Suvayu Ali 2015-10-05 13:56 ` Kaushal Modi 2015-10-05 15:21 ` Solved: " Rainer M Krug 2015-10-03 20:04 ` Phillip Lord 2015-10-02 19:35 ` Stefan Monnier 2015-10-02 15:59 ` Kaushal Modi
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).