emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Cook, Malcolm" <MEC@stowers.org>
To: Loris Bennett <loris.bennett@fu-berlin.de>,
	Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: RE: Unable to get current or via use-package
Date: Thu, 10 Feb 2022 15:19:19 +0000	[thread overview]
Message-ID: <CH0PR20MB3947BBC6C34C82A07B334196BE2F9@CH0PR20MB3947.namprd20.prod.outlook.com> (raw)
In-Reply-To: <878rujkxkb.fsf@hornfels.zedat.fu-berlin.de>

Hi Loris,

> > I tend to use the org-mode from the package manager, but do not do it interactively from within emacs. Instead, which when I want to refresh org, I do from the command line:
> >
> > emacs -Q -batch -eval "(progn (require 'package) (package-initialize) (package-refresh-contents) (package-install 'org))"
> 
> Is that necessary? Can't I just use the package manager to update Org
> along with any other packages? Or does the issue about not visiting and
> .org file before installing via the package manager apply to updates
> too?

AFAIK, what is necessary (though for reasons somewhat beyond my ken) is that org updates be installed in an environment in which no version of org has been loaded.  You need some approach to ensure that.  This is one such.  Agreed it is heavy handed, but it suffices the need.  I wish I could express the order dependencies in a reliable fashion with `use-package`.

It *might* be the case that execution of the following snippet early enough in your init file is enough for `use-package` to "get it right"(tm).  If you try this, let us know the outcome.

> > Also, early in my init.el, as extra level of precaution against getting the built-in org-mode, I ensure it never gets loaded:
> > (require 'cl-seq) (delete (car (cl-member "lisp/org" load-path :test #'string-match)) load-path)
> 
> Interesting, although I would generally want at least some version of
> Org even if a more recent version is installed but somehow broken.

If you can code that logic in lisp, you can conditionally execute the provided snipped.

/joke

But I get your point.  In my case, sometimes I want to run with a git pull from head of org repos rather than a package install.  At such times I wind up editing my init file and use the `use-package`'s :load-path and :pin directives:

   :pin manual 
   :load-path "~/.emacs.d/org-mode/lisp"
  ;; which was installed with: `cd ~/emacs.d && git clone https://git.savannah.gnu.org/git/emacs/org-mode.git &&   cd org-mode && make autoloads && make` 
  ;; and can be updated with: `cd ~/emacs.d/org-mode && git pull && make autoloads && make`

Point being that I have found that expressing the logic  to cover every use case requires me to edit my init.el and interact with the command line "out of band", as it were.

YMMV

~Malcolm

      parent reply	other threads:[~2022-02-10 18:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 13:25 Unable to get current or via use-package Loris Bennett
2022-02-09 14:02 ` Eric S Fraga
2022-02-09 15:51   ` Loris Bennett
2022-02-09 17:18     ` Greg Minshall
2022-02-10 20:57     ` João Pedro de Amorim Paula
2022-02-10 21:01       ` João Pedro de Amorim Paula
2022-02-17 15:00       ` Loris Bennett
2022-02-18 21:32         ` João Pedro de Amorim Paula
2022-02-18 21:36           ` João Pedro de Amorim Paula
2022-02-21  6:40             ` Loris Bennett
2022-02-09 16:28 ` Cook, Malcolm
2022-02-10  7:09   ` Loris Bennett
2022-02-10  8:12     ` Tim Cross
2022-02-10  9:01       ` Ihor Radchenko
2022-02-10 18:39         ` Tim Cross
2022-02-10 15:19     ` Cook, Malcolm [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=CH0PR20MB3947BBC6C34C82A07B334196BE2F9@CH0PR20MB3947.namprd20.prod.outlook.com \
    --to=mec@stowers.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=loris.bennett@fu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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