emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Gustav Wikström" <gustav@whil.se>
To: Tim Cross <theophilusx@gmail.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: trivial software engineering'ish question: switching org's
Date: Mon, 22 Mar 2021 01:43:29 +0000	[thread overview]
Message-ID: <HE1PR02MB3177E7DD75C19EC0F54DE09CDA659@HE1PR02MB3177.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <87mtuwkw3y.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]

Straight.el is worth looking into for this. Has served me well for similar use cases.


Get Outlook for iOS<https://aka.ms/o0ukef>
From: Emacs-orgmode <emacs-orgmode-bounces+gustav=whil.se@gnu.org> on behalf of Tim Cross <theophilusx@gmail.com>
Sent: Sunday, March 21, 2021 10:35:00 PM
To: emacs-orgmode@gnu.org <emacs-orgmode@gnu.org>
Subject: Re: trivial software engineering'ish question: switching org's

Greg Minshall <minshall@umich.edu> writes:

> hi.  i occasionally want to switch from the org package to a git
> version, then back again.  and, i want to avoid the dread "mixed
> installation".
> i'm wondering is there a way people do this other than simply
> installing/deleting the package version?

As I understand it, the critical part is when Emacs compiles the org
files to get the *.elc versions. Provided you do not have any org
functionality loaded during that compilation process, everything should
be OK. The 'mixed' versions problem arises because you go to compile a
different version and Emacs includes definitions already loaded from
another version, generating *.elc files with mixed versions.

Once org is compiled, the critical part is having the org version you
want show up first in the load-path, so the problem becomes one of just
managing the load-path entries appropriately. You could just ensure the
version you want is higher in the load-path or you could go the
'paranoid' route and have code which removes the version you don't want
from the load-path.

In the past, what I've done is have the git version of org in a specific
directory which I build with a separate process from the command line
using the make recipes in the repository - essentially just configuring
and running make. I then have some code in my init.el file which sets
that version at the start of my load-path when I want to run it and
which I comment out when I just want to run the version installed by
package.el. I also use the use-package macro to load my org
configuration and have two different blocks for that - one loading the
git repo version and one loading the org-plus-contrib  version I
normally use. I just comment out the one I don't want to use. I probably
could write some elisp to automate this, but to be honest, I switch
between org versions so rarely, commenting/uncommenting parts of my
init.el file is easy enough.

I don't do any of that at the moment as I've not needed to run from the
git repo since I switched to spacemacs and the spacemacs setup already
has the necessary workflow to ensure new versions of org are compiled in
a clean environment. Have not yet thought about how I will need to add
git based org when using spacemacs. Suspect All I'll need to do is
adjust the load-path as part of the init to reference the git sources
before any org functionality is loaded.

Tim Cross

[-- Attachment #2: Type: text/html, Size: 4134 bytes --]

  reply	other threads:[~2021-03-22  2:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 17:44 trivial software engineering'ish question: switching org's Greg Minshall
2021-03-21 21:35 ` Tim Cross
2021-03-22  1:43   ` Gustav Wikström [this message]
2021-03-22  7:41     ` Greg Minshall
2021-03-24  2:56     ` straight.el and org info pages? Greg Minshall
2021-03-24  4:49       ` Gustav Wikström
2021-03-24  6:25         ` Greg Minshall
2021-03-24  5:02       ` Richard Kim
2021-03-24  6:23         ` Greg Minshall
2021-03-22  0:40 ` trivial software engineering'ish question: switching org's Anthony Cowley
2021-03-22 12:06 ` Maxim Nikulin
2021-03-24  5:12   ` Greg Minshall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR02MB3177E7DD75C19EC0F54DE09CDA659@HE1PR02MB3177.eurprd02.prod.outlook.com \
    --to=gustav@whil.se \
    --cc=emacs-orgmode@gnu.org \
    --cc=theophilusx@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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