emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Something has happened such that I can't export to latex
Date: Thu, 28 Jul 2022 09:02:20 +1000	[thread overview]
Message-ID: <86y1wenn91.fsf@gmail.com> (raw)
In-Reply-To: <875yji1t1y.fsf@skimble09.plus.com>

Note that identifying when org is loaded is not always
straight-forward. There are lots of packages which include org support
which can result in org being loaded as a side effect when you load
them. This is especially true of non-core packages which will use
explicit require statements rather than relying on autoloads etc.

For this reason, I always ensure that anything relating to org source
paths etc is loaded as early as possible. 

Sharon Kimble <boudiccas@skimble09.plus.com> writes:

> So I've looked at my config file, and the first time that org is mentioned is -
> =====
> ** installation
> #+BEGIN_SRC emacs-lisp :tangle "~/.emacs.d/init.el" :exports code :results silent
> ;;; init.el --- sharon's config -*- eval: (read-only-mode 1) -*-
> (require 'package)
> (setq package-enable-at-startup nil)
> (package-initialize)
> (require 'ob-tangle)
> (org-babel-load-file "~/.emacs.d/config22.org")
This is when org is being loaded as ob-tangle is part of org. This will
mean the built-in/bundled version of org is loaded.

> =====
> and the first time that org-mode is mentioned is -                 
> =====
> ** set pathways
> #+begin_src emacs-lisp
> ;;(setq load-path (cons "~/.emacs.d/lisp" load-path))
> ;; This sets up the load path so that we can override it
> (package-initialize nil)
> ;; Override the packages with the git version of Org and other packages
> ;;(add-to-list 'load-path (expand-file-name "/home/boudiccas/git/org-mode/"))
> (add-to-list 'load-path (expand-file-name "/home/boudiccas/git/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name "/home/boudiccas/git/org-contrib/lisp"))
This isn't going to work as you hope. You have already loaded org mode
when you called (require 'ob-tangle),

so what this is doing is adding an additional path to a latter version
of org which is going to result in a 'mixed' version. This will cause
lots of issues.

You either  need to move the above lines *above* the require 'ob-tangle
or move the earlier lines to after these ones. I think earlier is better
when it comes to org as there are many packages which include org
support and which will load org as a hidden side effect. 

> ;; Load the rest of the packages
> (add-to-list 'load-path (expand-file-name "/home/boudiccas/.emacs.d/lisp"))
> ;; (add-to-list 'load-path "/home/boudiccas/.emacs.d/personal-elisp")
> ;; (add-to-list 'load-path "/home/boudiccas/.emacs.d/test")
> (add-to-list 'load-path (expand-file-name "/home/boudiccas/.emacs.d/elpa"))
> ;; (add-to-list 'load-path "/home/boudiccas/git")
> (setq custom-file "/home/boudiccas/.emacs.d/lisp/custom.el")
> (load custom-file)
> #+end_src
> =====
> So how can I load the correct org-mode please?            

I note your appear to be running both the development version of Emacs
as well as the git version of org mode. While this will give you the
most recent versions of both, it will also mean your working with the
most unstable versions of both. If you rely on org for your daily
workflow, I would recommend

1. Just running with the version of org bundled with Emacs. Being the
development version, it will stay reasonably up-to-date as you really
need to update and re-build Emacs every week or so anyway.


2. Just use the org from ELPA and org-contrib from non-GNU ELPA. These
are usually the most stable versions with bug fixes applied. This would
be my recommendation. 

I think few people actually need to run from the head of the git
repository. Your messages indicated that having a broken org
installation was a significant issue for you and getting the issues
resolved are quite urgent. Using the ELPA/non-GNU packages will ensure
you get important bug fixes while keeping your org version current with
the most recent stable version and is probably the best choice for
anyone who needs a reliable org for production/daily use. 

  parent reply	other threads:[~2022-07-27 23:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 15:32 Sharon Kimble
2022-07-26 15:37 ` Ihor Radchenko
2022-07-26 16:33   ` Sharon Kimble
2022-07-26 16:39   ` Sharon Kimble
2022-07-27  3:41     ` Ihor Radchenko
2022-07-27  6:30   ` Sharon Kimble
2022-07-27 14:03     ` Fraga, Eric
2022-07-27 14:16     ` Ihor Radchenko
2022-07-27 15:20       ` Sharon Kimble
2022-07-27 15:43         ` Fraga, Eric
2022-07-27 23:02         ` Tim Cross [this message]
2022-07-28  9:50       ` Sharon Kimble
2022-07-28 10:20         ` Ihor Radchenko
2022-07-28 13:29           ` Sharon Kimble
2022-07-29  1:10             ` Ihor Radchenko
2022-07-29  8:48               ` Sharon Kimble
2022-07-29 12:00                 ` Robert Pluim
2022-07-29 12:24                   ` Sharon Kimble
2022-07-29 12:37                     ` Robert Pluim
2022-07-29 13:24                 ` Ihor Radchenko
2022-07-30  7:25                   ` [SOLVED] " Sharon Kimble
2022-07-31 19:49                     ` Robert Pluim
2022-07-30  3:18                 ` Tim Cross

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:

  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=86y1wenn91.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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