* HowTo: Upgrade org-mode installation from the command-line
@ 2024-04-24 19:50 Cook, Malcolm
2024-04-28 13:10 ` Ihor Radchenko
0 siblings, 1 reply; 6+ messages in thread
From: Cook, Malcolm @ 2024-04-24 19:50 UTC (permalink / raw)
To: Org-mode
The section on org-mode [[https://orgmode.org/org.html#Installation][Installation]] entitled "Using Emacs packaging
system" might be improved with the following advice:
** Upgrade org-mode installation from the command-line
The Emacs packaging system can be used to upgrade an org-mode
installation from linux command-line by running emacs in batch mode:
#+begin_src sh
EMACS=emacs # /usr/local/bin/emacs
EMACSQBE=${EMACS} -Q -batch -eval
${EMACSQBE} "(progn (require 'package) (package-initialize) (package-refresh-contents) (package-upgrade 'org))"
#+end_src
This approach has the advantage of isolating the upgrade process for
any other running emacs session, ensuring that version conflicts can
not arise.
Note: For the upgraded version to be loaded by emacs, you mush place
`package-initialize` early in your init.el. Failure to do so will
result in the old system version to be loaded, as can be seen:
#+begin_src sh :results output
${EMACSQBE} "(progn (print (org-version 'org)))"
${EMACSQBE} "(progn (package-initialize) (print (org-version 'org)))"
#+end_src
#+RESULTS:
:
: "9.6.15"
:
: "9.6.27"
Note further that if the above upgrade command was done in an emacs
shell buffer, you will need to restart emacs to pick up the updated
package. Failing to do so will result in `meta-x org-version`
reporting the old version:
#+begin_src src
Org mode version 9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)
#+end_src
but after restart with my init.el file it reports:
#+begin_src src
Org mode version 9.6.27 ( @ /home/mec/.dotfiles/emacs/.emacs.d/elpa/org-9.6.27/)
#+end_src
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: HowTo: Upgrade org-mode installation from the command-line
2024-04-24 19:50 HowTo: Upgrade org-mode installation from the command-line Cook, Malcolm
@ 2024-04-28 13:10 ` Ihor Radchenko
2024-05-02 20:46 ` Cook, Malcolm
2024-05-03 5:37 ` Samuel Wales
0 siblings, 2 replies; 6+ messages in thread
From: Ihor Radchenko @ 2024-04-28 13:10 UTC (permalink / raw)
To: Cook, Malcolm; +Cc: Org-mode
"Cook, Malcolm" <MEC@stowers.org> writes:
> The section on org-mode [[https://orgmode.org/org.html#Installation][Installation]] entitled "Using Emacs packaging
> system" might be improved with the following advice:
Thanks!
> Note: For the upgraded version to be loaded by emacs, you mush place
> `package-initialize` early in your init.el. Failure to do so will
> result in the old system version to be loaded, as can be seen:
This is only true when running emacs -Q or emacs -q.
For normal emacs invocation, since Emacs 27, by default, Emacs calls
(package-initialize) automatically on startup.
> Note further that if the above upgrade command was done in an emacs
> shell buffer, you will need to restart emacs to pick up the updated
> package. Failing to do so will result in `meta-x org-version`
> reporting the old version:
>
> #+begin_src src
> Org mode version 9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)
> #+end_src
>
> but after restart with my init.el file it reports:
>
> #+begin_src src
> Org mode version 9.6.27 ( @ /home/mec/.dotfiles/emacs/.emacs.d/elpa/org-9.6.27/)
> #+end_src
Examples are probably a bit too much for the manual.
It should be sufficient to ask to restart existing Emacs sessions, if
any.
May you prepare a patch modifying doc/org-manual.org with your suggestions?
See https://orgmode.org/worg/org-contribute.html
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: HowTo: Upgrade org-mode installation from the command-line
2024-04-28 13:10 ` Ihor Radchenko
@ 2024-05-02 20:46 ` Cook, Malcolm
2024-05-03 12:28 ` Ihor Radchenko
2024-05-03 5:37 ` Samuel Wales
1 sibling, 1 reply; 6+ messages in thread
From: Cook, Malcolm @ 2024-05-02 20:46 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
>"Cook, Malcolm" <mailto:MEC@stowers.org> writes:
>
>> The section on org-mode [[https://orgmode.org/org.html#Installation][Installation]] entitled "Using Emacs packaging
>> system" might be improved with the following advice:
>
>Thanks!
>
>> Note: For the upgraded version to be loaded by emacs, you mush place
>> `package-initialize` early in your init.el. Failure to do so will
>> result in the old system version to be loaded, as can be seen:
>
>This is only true when running emacs -Q or emacs -q.
>For normal emacs invocation, since Emacs 27, by default, Emacs calls
>(package-initialize) automatically on startup.
>
>> Note further that if the above upgrade command was done in an emacs
>> shell buffer, you will need to restart emacs to pick up the updated
>> package. Failing to do so will result in `meta-x org-version`
>> reporting the old version:
>>
>> #+begin_src src
>> Org mode version 9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)
>> #+end_src
>>
>> but after restart with my init.el file it reports:
>>
>> #+begin_src src
>> Org mode version 9.6.27 ( @ /home/mec/.dotfiles/emacs/.emacs.d/elpa/org-9.6.27/)
>> #+end_src
>
>Examples are probably a bit too much for the manual.
>It should be sufficient to ask to restart existing Emacs sessions, if
>any.
>
>May you prepare a patch modifying doc/org-manual.org with your suggestions?
>See https://orgmode.org/worg/org-contribute.html
Glad to try. How's this?
[-- Attachment #2: 0001-doc-command-line-upgrade.patch --]
[-- Type: application/octet-stream, Size: 1361 bytes --]
From 02d85bf632e808a54bbd6d06516d484a40587e7c Mon Sep 17 00:00:00 2001
From: "Cook, Malcolm" <MEC@stowers.org>
Date: Thu, 2 May 2024 15:43:05 -0500
Subject: [PATCH] doc-command-line-upgrade
---
doc/org-manual.org | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index d66d95a22..365017d3b 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -119,6 +119,23 @@ You need to do this in a session where no =.org= file has been
visited, i.e., where no Org built-in function have been loaded.
Otherwise autoload Org functions will mess up the installation.
#+end_quote
+*** Upgrading installed org-mode using Emacs packaging system from the command-line
+:PROPERTIES:
+:CUSTOM_ID: notoc
+:END:
+
+The Emacs packaging system can be used to upgrade an org-mode
+installation from linux command-line by running emacs in batch mode:
+
+#+begin_src sh
+EMACS=emacs # you may prefer to be more specific - e.g. /usr/local/bin/emacs
+EMACSQBE="${EMACS} -Q -batch -eval"
+${EMACSQBE} "(progn (require 'package) (package-initialize) (package-refresh-contents) (package-upgrade 'org))"
+#+end_src
+
+This approach has the advantage of isolating the upgrade process from
+a running emacs session, ensuring that version conflicts can not
+arise.
*** Using Org's git repository
:PROPERTIES:
--
2.39.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: HowTo: Upgrade org-mode installation from the command-line
2024-04-28 13:10 ` Ihor Radchenko
2024-05-02 20:46 ` Cook, Malcolm
@ 2024-05-03 5:37 ` Samuel Wales
2024-05-04 1:14 ` Samuel Wales
1 sibling, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2024-05-03 5:37 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Cook, Malcolm, Org-mode
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Sunday, April 28, 2024, Ihor Radchenko <yantar92@posteo.net> wrote:
> > Note: For the upgraded version to be loaded by emacs, you mush place
> > `package-initialize` early in your init.el. Failure to do so will
> > result in the old system version to be loaded, as can be seen:
>
> This is only true when running emacs -Q or emacs -q.
> For normal emacs invocation, since Emacs 27, by default, Emacs calls
> (package-initialize) automatically on startup.
>
> strangely in my 27, help on package-initialize does not say explicitly
whether it is called automatically.
it says "If ‘package-initialize’ is called twice during Emacs startup,
signal a warning, since this is a bad idea except in highly
advanced use cases. To suppress the warning, remove the
superfluous call to ‘package-initialize’ from your init-file. If
you have code which must run before ‘package-initialize’, put
that code in the early init-file."
i ran package-initialize in my .emacs and checked c-h e and did not find a
warning. however, without running it, it still seems to have been run.
--
The Kafka Pandemic
A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com
[-- Attachment #2: Type: text/html, Size: 1604 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: HowTo: Upgrade org-mode installation from the command-line
2024-05-02 20:46 ` Cook, Malcolm
@ 2024-05-03 12:28 ` Ihor Radchenko
0 siblings, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2024-05-03 12:28 UTC (permalink / raw)
To: Cook, Malcolm; +Cc: Org-mode
"Cook, Malcolm" <MEC@stowers.org> writes:
>>May you prepare a patch modifying doc/org-manual.org with your suggestions?
>>See https://orgmode.org/worg/org-contribute.html
>
> Glad to try. How's this?
Thanks!
Applied, onto main, with modifications.
I merged your new section into previous section explaining how to
install Org mode using package.el. I compressed the explanations to be
more in flow with the previous section and removed bash-specific code,
leaving an one-liner that has more chances to work with arbitrary
shells. I also added a TINYCHANGE cookie as you do not seem to have FSF
copyright assignment.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=09520a056
You are also listed as one of Org mode contributors now.
https://git.sr.ht/~bzg/worg/commit/d1d32137
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 6+ messages in thread
* HowTo: Upgrade org-mode installation from the command-line
2024-05-03 5:37 ` Samuel Wales
@ 2024-05-04 1:14 ` Samuel Wales
0 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2024-05-04 1:14 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Cook, Malcolm, Org-mode
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
never mind. package-initilalize if called in .emacs once will not repeat
or warn despite being not needed there normally. at least in 27.
--
The Kafka Pandemic
A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com
[-- Attachment #2: Type: text/html, Size: 370 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-04 1:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24 19:50 HowTo: Upgrade org-mode installation from the command-line Cook, Malcolm
2024-04-28 13:10 ` Ihor Radchenko
2024-05-02 20:46 ` Cook, Malcolm
2024-05-03 12:28 ` Ihor Radchenko
2024-05-03 5:37 ` Samuel Wales
2024-05-04 1:14 ` Samuel Wales
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.