emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Ignored bugs


From: Tim Cross
Subject: Re: Ignored bugs
Date: Wed, 18 Nov 2020 18:32:09 +1100
User-agent: mu4e 1.5.7; emacs 27.1.50

Pankaj Jangid <pankaj@codeisgreat.org> writes:

> Tim Cross <theophilusx@gmail.com> writes:
>
>>> I am trying to use `use-package' for package management via the init
>>> file. And when I do (use-package org :ensure t) it doesn't install the
>>> latest. It uses the builtin package only. Is this a bug in emacs,
>>> use-package or elpa?
>>
>> Not a bug at all. You have to configure your emacs to obtain the latest
>> version from the org (or MELPA?) repository.
>>
>> If you really want the most recent org version, you need to add the org
>> ELPA repository to your packages.el repository list. I have the
>> following in my setup -
>>
>> (add-to-list 'package-archives `("melpa" . "https://melpa.org/packages/";))
>> (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/";))
>
> Okay. I don't have org-elpa in my list. But Org 9.4 is visible in the
> `gnu' archive. I have this in my configuration
>
> (custom-set-variables
>  '(package-archives '(("melpa" . "https://melpa.org/packages/";)
>                       ("gnu"   . "https://elpa.gnu.org/packages/";))))
>
> When I install it manually via package-install it gets installed. But
> (use-package org :ensure t) doesn't install it. Probably the order is
> affecting it.

Have a look at the package.el docs. You can 'pin' a package to a
specific repository and version and you can set repository priorities. I
would also check to see when the custom section is actually loaded. It
could be that your customization is not loaded until after your call to
use-package. As I call add-to-lis and that adds entries to the start of
the list, I know both melpa and the org repositories are before the gnu
one and as I do this in my init file, I know it is processed before the
call to use-package, but I also set repository priorities to help
protect against reliance on order in the list.

My full package config is below. Note that things changed in Emacs 27
and I'm not 100% sure it is correct (actually, I recently switched to
using spacemacs, so I don't use that setup anymore!)

#+begin_src emacs-lisp :tangle tangle-init.el
  (require 'package)

  (setq package-enable-at-startup nil
        package-archive-priorities '(("org" . 2) ("melpa" . 1) ("gnu" . 0)))

  (add-to-list 'package-archives `("melpa" . "https://melpa.org/packages/";))
  (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/";))
  (when (< emacs-major-version 27)
    (package-initialize))

#+end_src

--
Tim Cross



reply via email to

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