emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* using org from git
@ 2022-07-01  9:55 Roger Mason
  2022-07-01 10:33 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Roger Mason @ 2022-07-01  9:55 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I indvertently issued 'rm -rf *' in my home directory an lost some files
a couple of days ago.  I was able to restore most from backup, but
something is missing (or not working) in my org setup.

I have an org-git directory in .emacs.d that reports as 'org-version:
9.5.4 (release_9.5.4-602-g381a2a.dirty)' when I issue 'gmake'.  I have
this in my emacs init file (~/.emacs):

;;; Configuration Directory
(defconst ram:emacs-config-dir "~/.emacs.d/ModularConfigFiles/" "")

;; Utility to auto-load config files
  ;; utility function to auto-load my package configurations
  (defun ram:load-config-file (filelist)
    (dolist (file filelist)
      (load (expand-file-name 
             (concat ram:emacs-config-dir file)))
       (message "Loaded config file:%s" file)
       ))

  ;; load my configuration files
(ram:load-config-file '(
                        "elpa.el"	; Comment this if m(elpa) plays up.
			"console.el"
			"extra-paths.el"
			"templates.el"
			"org-config.el"
			"org-ox-koma-config.el"
....
snip

In ~/.emacs.d/ModularConfigFiles/org-config.el I have, at the top:

(add-to-list 'load-path "/home/rmason/.emacs.d/org-git/lisp")
(add-to-list 'load-path "/home/rmason/.emacs.d/org-git/contrib/lisp")

When I start emacs and run 'org-version' it reports: 'Org mode version
9.4.4 (release_9.4.4 @ /home/rmason/.emacs.d/org-git/lisp/)'.  Notice
that the version (9.4.4) does not match what I have in the org-git
directory.  Thinking that the org that comes with emacs (27.2 in my
case) was interfering with the git version I tried moving
/usr/local/share/emacs/27.2/lisp/org out of the way.  That then causes
this error at startup:

File is missing: Cannot open load file, No such file or directory, org

This is the backtrace from emacs --debug-init:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "org")
  require(org)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [require cl-lib dash f helm org s] 2)
  require(helm-org-rifle)
  (lambda (pkg) (if (package-installed-p pkg) nil (package-install pkg)) (require pkg))(helm-org-rifle)
  mapc((lambda (pkg) (if (package-installed-p pkg) nil (package-install pkg)) (require pkg)) (auto-complete caml slime scad-mode ess helm-org-rifle haskell-mode lua-mode wisp-mode gnuplot meson-mode yasnippet tuareg muse iedit google-c-style geiser flymake-cursor ecb bbdb auto-complete-c-headers lsp-mode lsp-ui yasnippet lsp-java lsp-python-ms lsp-haskell helm-lsp lsp-treemacs dap-mode lsp-origami lsp-dart company flycheck lsp-pyright rust-mode php-mode scala-mode dart-mode clojure-mode typescript-mode))
  (let* ((pkg-list '(auto-complete caml slime scad-mode ess helm-org-rifle haskell-mode lua-mode wisp-mode gnuplot meson-mode yasnippet tuareg muse iedit google-c-style geiser flymake-cursor ecb bbdb auto-complete-c-headers lsp-mode lsp-ui yasnippet lsp-java lsp-python-ms lsp-haskell helm-lsp lsp-treemacs dap-mode lsp-origami lsp-dart company flycheck lsp-pyright rust-mode php-mode scala-mode dart-mode clojure-mode typescript-mode))) (package-initialize) (package-refresh-contents) (mapc #'(lambda (pkg) (if (package-installed-p pkg) nil (package-install pkg)) (require pkg)) pkg-list) (yas-global-mode) (add-hook 'prog-mode-hook 'lsp))
  eval-buffer(#<buffer  *load*-714263> nil "/home/rmason/.emacs.d/ModularConfigFiles/elpa.el" nil t)  ; Reading at buffer position 2468
  load-with-code-conversion("/home/rmason/.emacs.d/ModularConfigFiles/elpa.el" "/home/rmason/.emacs.d/ModularConfigFiles/elpa.el" nil nil)
  load("/home/rmason/.emacs.d/ModularConfigFiles/elpa.el")
  (while --dolist-tail-- (setq file (car --dolist-tail--)) (load (expand-file-name (concat ram:emacs-config-dir file))) (message "Loaded config file:%s" file) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- filelist) file) (while --dolist-tail-- (setq file (car --dolist-tail--)) (load (expand-file-name (concat ram:emacs-config-dir file))) (message "Loaded config file:%s" file) (setq --dolist-tail-- (cdr --dolist-tail--))))
  ram:load-config-file(("elpa.el" "console.el" "extra-paths.el" "templates.el" "org-config.el" "org-ox-koma-config.el" "yasnippet.el" "utilities.el" "customisations.el" "haskell.el" "smtp.el" "kill-emacs.el" "science.el" "browser.el" "document-systems.el" "languages.el" "mu4e.el" "lsp-mode.el"))
  eval-buffer(#<buffer  *load*> nil "/home/rmason/.emacs" nil t)  ; Reading at buffer position 960
  load-with-code-conversion("/home/rmason/.emacs" "/home/rmason/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x2011d4ad5>) #f(compiled-function () #<bytecode 0x2011d4ae9>) t)
  command-line()
  normal-top-level()

Sorry for the long post, any help will be much appreciated.

Thanks,
Roger
emacs 27.2 on FreeBSD 12.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using org from git
  2022-07-01  9:55 using org from git Roger Mason
@ 2022-07-01 10:33 ` Ihor Radchenko
  2022-07-01 11:08   ` Roger Mason
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2022-07-01 10:33 UTC (permalink / raw)
  To: Roger Mason; +Cc: emacs-orgmode

Roger Mason <rmason@mun.ca> writes:

> File is missing: Cannot open load file, No such file or directory, org
>
> This is the backtrace from emacs --debug-init:
>
> Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "org")
>   require(org)
>   byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207" [require cl-lib dash f helm org s] 2)
>   require(helm-org-rifle)
> ...
>   load-with-code-conversion("/home/rmason/.emacs.d/ModularConfigFiles/elpa.el" "/home/rmason/.emacs.d/ModularConfigFiles/elpa.el" nil nil)

So, your elpa.el config file is loading helm-org-rifle, which loads org
before you set load-path to the new version of Org. You need to put
load-path setting somewhere before loading anything else.

Best,
Ihor


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using org from git
  2022-07-01 10:33 ` Ihor Radchenko
@ 2022-07-01 11:08   ` Roger Mason
  0 siblings, 0 replies; 3+ messages in thread
From: Roger Mason @ 2022-07-01 11:08 UTC (permalink / raw)
  To: emacs-orgmode

Hello Ihor,

Ihor Radchenko <yantar92@gmail.com> writes:

> Roger Mason <rmason@mun.ca> writes:
>
>> File is missing: Cannot open load file, No such file or directory, org
>
> So, your elpa.el config file is loading helm-org-rifle, which loads org
> before you set load-path to the new version of Org. You need to put
> load-path setting somewhere before loading anything else.

Bingo!  Fixed.

Many thanks,
Roger


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-01 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01  9:55 using org from git Roger Mason
2022-07-01 10:33 ` Ihor Radchenko
2022-07-01 11:08   ` Roger Mason

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