emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recommended way to work on main without upgrading Org?


From: Richard Kim
Subject: Re: Recommended way to work on main without upgrading Org?
Date: Fri, 23 Dec 2022 09:07:46 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Richard Kim <emacs18@gmail.com> writes:

> Richard Kim <emacs18@gmail.com> writes:
>
>> Karthik Chikmagalur <karthikchikmagalur@gmail.com> writes:
>>
>>> I can get it to work with emacs -Q as well, and this is good for testing, 
>>> thank you.
>>>
>>> But I'm looking for a way to retain the rest of my configuration and swap 
>>> out
>>> Org as required. Otherwise I can't do any interactive development. Another
>>> alternative is to set up a completely different init directory and run Emacs
>>> with a chemacs2 profile or with the new --init-directory flag, but 
>>> considering
>>> the complexity/size of my configuration this would be onerous.
>>
>> How about specifying org version of your choice on command line like this?
>>
>>     emacs --eval "(add-to-list 'load-path \"/path/to/org\")"
>>
>> So long as you don't activate another org mode package within your
>> start-up files, above should work I think.
>
> If you want to better control where your org path end up in load-path,
> then you can use one of several hooks, e.g., following delays updating
> load-path till almost the very end of emacs startup process
>
>     emacs --eval "(add-hook 'emacs-startup-hook (lambda () (add-to-list 
> 'load-path \"/path/to/org\")) 100)"
>
> See [[info:elisp#Startup Summary]] for emacs startup details.

An alternative is to use --init-directory with thin wrapper around your normal 
config, e.g.,
you can create arbitrary configuration which makes small tweaks to your
normal configuration with something like the following:

$ cat /tmp/e1/early-init.el
(add-to-list 'load-path "/path/to/org")
(setq user-emacs-directory "~/.emacs.d/")
(load-library (expand-file-name "early-init.el" user-emacs-directory))

$ cat /tmp/e1/init.el
(load-library (expand-file-name "init.el" user-emacs-directory))

$ emacs --init-directory /tmp/e1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]