emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Pankaj Jangid <pankaj@codeisgreat.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Ignored bugs
Date: Wed, 18 Nov 2020 18:32:09 +1100	[thread overview]
Message-ID: <87o8jv9l3a.fsf@gmail.com> (raw)
In-Reply-To: <m2ima35flw.fsf@codeisgreat.org>


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


  parent reply	other threads:[~2020-11-18  7:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 18:41 Ignored bugs Boruch Baum
2020-11-17 19:51 ` Daniele Nicolodi
2020-11-17 20:15   ` Boruch Baum
2020-11-17 20:27     ` Daniele Nicolodi
2020-11-17 20:54       ` Boruch Baum
2020-11-17 21:36         ` Jean Louis
2020-11-17 23:42           ` Tim Cross
2020-11-18  4:04           ` Ihor Radchenko
2020-12-14  6:55         ` Bastien
2020-11-18  2:50   ` Pankaj Jangid
2020-11-18  3:59     ` Tim Cross
2020-11-18  6:44       ` Pankaj Jangid
2020-11-18  6:50         ` Jean Louis
2020-11-18  7:32         ` Tim Cross [this message]
2020-11-18  6:03     ` Jean Louis
2020-11-18  6:50       ` Pankaj Jangid
2020-12-14  7:14 ` Bastien

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=87o8jv9l3a.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=pankaj@codeisgreat.org \
    /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).