Tim:

I appreciate your thoughtful response.  You went to a great deal of trouble, and answered, I think, most of the important questions I have with this issue.

I use Arch Linux, and have been installing the AUR emacs-git package.  Sure, I don't need to go beyond the current stable package.  For now, I do.  I have a few org-mode ancillary packages installed, some I am still uncertain of, and some of which are more essential. 

I have indeed installed some packages and also some code into my init file, without understanding what they do, because I want to test whether they will work for my needs.  I plan to steal your initialization for use of packages, because mine is out of date, and I think this may solve the problem of the annoying message I refer to.  The message is to the effect that one needs to install Org-mode from a different repo, because after version 9.5 (I think) the existing elpa repo will not be updated.  I hope your simple code will solve that. I may just follow your advice and declare emac init bankruptcy (If I understand that correctly), and start by copying over the functions I have written and the configurations I have found essential.  I have actually done that in the past. 

I appreciate that Emacs exists.  I cannot overstate my appreciation for the work that Richard Stallman and the multitudes of programmers have put into making this tool and making it better.  I see the need for cleaning out the garage once in a while, and I understand that Org-mode will be better served by consolidating the repositories.  I have just not been able to understand the shop talk, I guess.  Your example is really helpful. 

It is interesting that an old timer like yourself would reach for Spacemacs.  I haven't, mostly because I don't think I need the modal model of Vi.  The keybindings of Emacs or so convenient and intelligent I find them to be enough.  Here's where I might have spent more time in the early days learning the basics better.  One of the things I like about Emacs is that I can dance around a page of text, in a manner that the commercially produced text editors and word processors I know have not dared to implement.  We are locked in to a dumbed down interface in all the software we encounter.  I cannot think of one example just now, but maybe the way one can move back and forth over characters and words.  I never learned Vi, except to be able to edit a simple config file if need be.

I know I am over my head, and I have been so for the 30-ish years I have been using Emacs and for the time I have used Org-mode.  It is more than I can do to keep up with the newer complexities that are cropping up.  Yet, just like the plain text files, and the LaTeX source for my one publication, a lexicon of animal names, they live on while documents using the high priced tools are not longer readable or editable.  And through all the changes, my little utilities for editing things that only I could probably care about, and I would not expect anyone to care to learn---they still work today.  I love it!

I appreciate your help. 

Alan Davis

On Sun, Nov 28, 2021 at 2:38 PM Tim Cross <theophilusx@gmail.com> wrote:

"Alan E. Davis" <lngndvs@gmail.com> writes:

> I have just spent an hour trying to figure out what's going on with ELPA, GNU ELPA, NONGNU ELPA packages.  I am lost.
>
> A plethora of methods exist for installing org-mode and other packages; it is unnecessary to list them, even if I could.
>
> I've been using Emacs and Org-mode for many years.  I am not interested in spending an hour of my time to learn a new way to install
> something that has been working well for me.  I may not use org-mode with the facility of a programmer who can whip off a quick utility
> in emacs lisp, but I have come to depend on the basic tools as a core of my work flow.
>
> I have tried "use package",  but I would prefer something straightforward, like just list-packages then install.  I don't understand how to
> set up my init file (dot emacs) for various package repos.  It was working, that's all I needed.  Now I get a 5 second delay each time I use
> org-mode.  I cannot seem to find the information I need to fix this.  On reddit, on emacs wiki, on this list, I cannot find the magic search
> term.  I see advice like "the maintainer has written a very clear explanation of the issue" but,this very clear explanation does not help
> me understand what I need to do.
>
> I guess I need a formula, but I have cut and pasted two or three different things into the top of my .init file.  Perhaps I need to start
> again, but my .init file has been taking root for nearly 30 years; it's burned into my muscle memory.
>
> I hope I will never have to write another email like this to get help for something that should be simple.  Maybe I will now have to install
> from git.  I think I am already too far out at sea to abandon the packages approach.  I guess it serves me right for stepping off the
> beach.
>

Hi Alan,

sorry your feeling so frustrated. Unfortunately, in order to be able to
maintain org mode with the limited resources available, it has been
necessary to make some changes and as with most transitions, there can
be some rough bits to get through initially. In the long term, things
should actually be simpler with respect to org mode as there will be
no need to add any repositories to use org mode or the org contgrib
packages as they will be available in the default package.el
configuration (Emacs 28 has both GNU ELPA and the new NONGNU
repositories defined by default).

It is difficult to provide you with any concrete help as you did not
include some important information in your message. Things which would
help include

- What Emacs version are you using? Emacs comes with org built-in, so if
  your running a reasonably recent version of Emacs, perhaps you don't
  actually need to install org at all?

- Do you use any org mode extensions or add on packages (those which are
  not part of org mode or the org mode contrib packages)?

- Is there a reason you need the latest version of org mode rather than
  just using the version which comes bundled in Emacs? Many people just
  stick with the version which is bundled with Emacs as it is stable and
  requires no additional installation steps.

- What is the annoying message you reference in the subject but failed
  to include in the body of your message?

The good news is that while there are many different ways of installing
packages, you really don't need any of them except those that come with
Emacs. I don't use straight, eget, or any of the many other package
management solutions for Emacs. I use just package.el and use-package,
which works on top of package.el (it can use straight and other package
managers, but your not required to). This gives you exactly what you
want - M-x list-packages, from where you can just select the packages
you want to install and install them.

I would not advise installing from git. This will likely just make
things even more complicated as then you also need to make sure your
building from the right branch/tag - you don't want to run org from the
head of the main branch as this is the development branch, which is
likely not as stable as you want.

Assuming you are running the current Emacs stable release (Emacs 27.2),
the only repository you have to add in your init file is the new nongnu
repository. You no longer require the orgmode.org/elpa repository. As
the GNU ELPA repository has been standard in Emacs for the last few
releases, you don't need to add anything in order to get the current org
mode. If you use some of the contrib packages, then you now need to
install the nongnu repository. This repository will be configured by
default for the next Emacs release (Emacs 28), but for versions prior to
that, you need to add https://elpa.nongnu.org/nongnu/ to the package
archives list. I have the following in my init.el file

    (require 'package)

    (setq package-archives '(("nongnu" . "https://elpa.nongnu.org/nongnu/")
                             ("elpa" . "https://elpa.gnu.org/packages/")
                             ("melpa" . "https://melpa.org/packages/")))

    (package-initialize)
    (unless package-archive-contents
      (package-refresh-contents))

    (unless (package-installed-p 'use-package)
      (package-install 'use-package))

    (require 'use-package)
    (setq use-package-always-ensure t)

In the above, I have added the nongnu repository as well as the melpa
repository. You will also note I'm installing the use-package package,
which I find useful, but it is not required. The benefit of use package
is that to just do a basic package install with no additional
configuration, you can run

(use-package package-name)

and Emacs will ensure the package is installed at startup. Of course,
for many of my packages, the use-package form has additional sections
for :config, :init, :bindings etc, none of which are necessary for a
basic default installation.

I add the MELPA repository because there are some packages I use which
are not in the main GNU ELPA or NONGNU repositories. As I'm not running
Emacs 28, I now only need to add MELPA as GNU ELPA and NONGNU are
already configured by default in Emacs 28.

With the above configuration, I can install any of the packages I need
just by doing M-x list-packages and selecting what I want from the list
and then installing them.

From your message, it sounds like you have a bit of code in your init
file you have copied from various sources, but which you are not 100%
clear about what it does. This is a bad position to be in because when
things stop working you don't know where to start to fix them. My advice
would be to either start with a clean init.el file and only add back the
bits you understand or go through your current init.el file and comment
out everything you don't understand and then uncomment bits if and when
you need them and only after you understand them. While
various forums like stackoverflow, readdit and mailing lists can be
valuable, the information they provide can easily be out of date and I
find is often just plain wrong. If your maintaining your own init.el
file, my rule of thumb is that nothing goes into the init.el file if I
don't understand it, regardless of how useful it might seem.

The other thing you can try is to just use one of the pre-canned Emacs
configuration setups. This is actually what I do these days. After 30
years of Emacs, I actually got tired of tweaking and fiddling with my
emacs configuration. I just want to use the editor to get things done.
Currently, I use spacemacs, which I really enjoy. I was a vi user for
many years and now realise I really like the modal editing model.
However, I also used Purcell's emacs.d and prelude, which I think are
both good setups. The disadvantage of this approach is that you do then
have to work within the confides of how these predefined setups work
rather than configure Emacs to follow your own bespoke workflow setup.
It is a balancing act and the approach which suits you will depend on
where you like to spend your time. For me, I've spent just a little time
getting familiar with spacemacs, a little more to work out how to tweak
the configuration and now, it all just works.

I do also have a very basic standard installation of GNU Linux as a
virtual with a bare bones Eamcs setup (not using spacemacs), which I use
for testing purposes and sometimes to try and reproduce bugs reported by
others. This is another useful tool for testing and experimenting as ti
means I don't break my main Emacs setup when I want to try something
out. It also provides a convenient way to determine if some problem I'm
trying to diagnose is part of the canned setup I'm using (i.e.
spacemacs), part of my personal tweaks or a problem with the underlying
package. This is where the config for package.el I posted above comes
from.



--
      "As we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously."   ---Benjamin Franklin

      "This ignorance about the limits of the earth's ability to absorb
       pollutants should be reason enough for caution in the release
       of polluting substances."
                   ---Meadows et al.   1972.  Limits to Growth.      (p. 81)