From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Re-installing org-mode packages due to annoying message
Date: Mon, 29 Nov 2021 08:18:04 +1100 [thread overview]
Message-ID: <87a6hn7vqu.fsf@gmail.com> (raw)
In-Reply-To: <CAF-1L2Q79F0sDVq_jiU3+3zXZWkG8+_4aYgVxOafBJhT0SrA=Q@mail.gmail.com>
"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.
next prev parent reply other threads:[~2021-11-28 22:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-28 20:19 Re-installing org-mode packages due to annoying message Alan E. Davis
2021-11-28 21:18 ` Tim Cross [this message]
2021-11-29 10:28 ` Alan E. Davis
2021-11-29 15:36 ` Thomas S. Dye
2021-12-01 8:15 ` Alan E. Davis
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=87a6hn7vqu.fsf@gmail.com \
--to=theophilusx@gmail.com \
--cc=emacs-orgmode@gnu.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).