emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* trivial software engineering'ish question: switching org's
@ 2021-03-21 17:44 Greg Minshall
  2021-03-21 21:35 ` Tim Cross
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-21 17:44 UTC (permalink / raw)
  To: Org Mode Mailing List

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?

cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  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
  2021-03-22  0:40 ` trivial software engineering'ish question: switching org's Anthony Cowley
  2021-03-22 12:06 ` Maxim Nikulin
  2 siblings, 1 reply; 12+ messages in thread
From: Tim Cross @ 2021-03-21 21:35 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  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  0:40 ` Anthony Cowley
  2021-03-22 12:06 ` Maxim Nikulin
  2 siblings, 0 replies; 12+ messages in thread
From: Anthony Cowley @ 2021-03-22  0:40 UTC (permalink / raw)
  To: Greg Minshall; +Cc: Org Mode Mailing List



> On Mar 21, 2021, at 1:46 PM, Greg Minshall <minshall@umich.edu> wrote:
> 
> 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?
> 
> cheers, Greg
> 

The nix package manager is outstanding for these uses. You can have two versions of emacs — each with a different version of org — side by side, or switch between them without needing to re-byte compile anything.

Anthony



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  2021-03-21 21:35 ` Tim Cross
@ 2021-03-22  1:43   ` Gustav Wikström
  2021-03-22  7:41     ` Greg Minshall
  2021-03-24  2:56     ` straight.el and org info pages? Greg Minshall
  0 siblings, 2 replies; 12+ messages in thread
From: Gustav Wikström @ 2021-03-22  1:43 UTC (permalink / raw)
  To: Tim Cross, emacs-orgmode@gnu.org

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

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

BR
Gustav

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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  2021-03-22  1:43   ` Gustav Wikström
@ 2021-03-22  7:41     ` Greg Minshall
  2021-03-24  2:56     ` straight.el and org info pages? Greg Minshall
  1 sibling, 0 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-22  7:41 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: Tim Cross, emacs-orgmode@gnu.org

Tim and Gustav, thanks for your answers.  in particular, straight.el
does seem promising.  i'll set it up, use it with Tim's "switching
use-package blocks", and see how it goes.  cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  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  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
  2 siblings, 1 reply; 12+ messages in thread
From: Maxim Nikulin @ 2021-03-22 12:06 UTC (permalink / raw)
  To: emacs-orgmode

On 22/03/2021 00:44, Greg Minshall wrote:
> 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".

Do you really need to switch or just to launch it a couple of times? Is 
it required to run namely compiled version?

Actually I am unsure if the following way is reliable or it has some 
problems that I have not discovered yet.

emacs -q -L ~/src/org-mode/lisp -L ~/src/org-mode/contrib/lisp file.org

Unfortunately -L (--directory) options are processed after 
~/.emacs.d/init.el, that is why -q (--no-init-file) is added. I had 
(require 'org-protocol) in init.el file and a part of org bundled with 
emacs were loaded before processing of -L. If there is no setup for 
alternative org version, the file could be loaded after -L options using 
-l ~/emacs.d/init.el (--load), alternatively a bit cleaned variant of 
init.el from another directory could be specified.

I do not recommend to skip contrib directory. I noticed that due to 
system-wide configs some files could be loaded from older org contrib.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* straight.el and org info pages?
  2021-03-22  1:43   ` Gustav Wikström
  2021-03-22  7:41     ` Greg Minshall
@ 2021-03-24  2:56     ` Greg Minshall
  2021-03-24  4:49       ` Gustav Wikström
  2021-03-24  5:02       ` Richard Kim
  1 sibling, 2 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-24  2:56 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: emacs-orgmode@gnu.org

Gustav,

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

have you (or anyone else?) had problems getting straight.el to build and
install the info pages for Org mode?

cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: straight.el and org info pages?
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Gustav Wikström @ 2021-03-24  4:49 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode@gnu.org

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

Hmm, I've had problems getting straight.el to install org-mode itself. That was on windows though. And that issue was fixed recently (https://github.com/raxod502/straight.el/issues/707)

I do recall some discussions on building docs long ago and that it wasn't possible due to some design issues. Not sure if that problem remains, or if I recall correctly even.

/G

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Greg Minshall <minshall@umich.edu>
Sent: Wednesday, March 24, 2021 3:56:36 AM
To: Gustav Wikström <gustav@whil.se>
Cc: emacs-orgmode@gnu.org <emacs-orgmode@gnu.org>
Subject: straight.el and org info pages?

Gustav,

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

have you (or anyone else?) had problems getting straight.el to build and
install the info pages for Org mode?

cheers, Greg

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: straight.el and org info pages?
  2021-03-24  2:56     ` straight.el and org info pages? Greg Minshall
  2021-03-24  4:49       ` Gustav Wikström
@ 2021-03-24  5:02       ` Richard Kim
  2021-03-24  6:23         ` Greg Minshall
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Kim @ 2021-03-24  5:02 UTC (permalink / raw)
  To: emacs-orgmode

Greg Minshall <minshall@umich.edu> writes:

> Gustav,
>
>> Straight.el is worth looking into for this. Has served me well for
>> similar use cases.
>
> have you (or anyone else?) had problems getting straight.el to build and
> install the info pages for Org mode?
>
> cheers, Greg

For me (info "(org)") brings up org mode info page located in
org-plus-contrib package installed by straight.el. Thus it appears that
straight.el has no problem building info pages for org mode.

I use straight.el along with spacemacs.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: trivial software engineering'ish question: switching org's
  2021-03-22 12:06 ` Maxim Nikulin
@ 2021-03-24  5:12   ` Greg Minshall
  0 siblings, 0 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-24  5:12 UTC (permalink / raw)
  To: Maxim Nikulin; +Cc: emacs-orgmode

Maxim,

also, thanks.  i do use (something like) your suggestion when i just
want to try once or twice.

: emacs -Q -L /path/to/your/org-mode/folder/lisp -l org

(from Ihor R, last December.)

cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: straight.el and org info pages?
  2021-03-24  5:02       ` Richard Kim
@ 2021-03-24  6:23         ` Greg Minshall
  0 siblings, 0 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-24  6:23 UTC (permalink / raw)
  To: emacs18; +Cc: emacs-orgmode

Richard,

thanks.  for ess, i see your results.  for org, or org-plus-contrib, i
see info pages from /usr/share/info.  a mystery.  (which shall be, for
the moment, let be.)

cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: straight.el and org info pages?
  2021-03-24  4:49       ` Gustav Wikström
@ 2021-03-24  6:25         ` Greg Minshall
  0 siblings, 0 replies; 12+ messages in thread
From: Greg Minshall @ 2021-03-24  6:25 UTC (permalink / raw)
  To: Gustav Wikström; +Cc: emacs-orgmode@gnu.org

Gustav,

thanks.  installing org went very well.  and, i'm pleased with
straight.el.  (package.el didn't seem to install the info pages,
either.)

cheers, Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-24  6:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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