all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* errors when using org-agenda
@ 2021-10-22 20:35 William McCoy
  2021-10-23  0:46 ` Fwd: " William McCoy
  0 siblings, 1 reply; 18+ messages in thread
From: William McCoy @ 2021-10-22 20:35 UTC (permalink / raw)
  To: orgmode

[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]

I have been having some strange errors when using org-agenda.  The 
errors seem to have begun about the time I upgraded to org 9.5 from the 
elpa repo a couple of weeks ago.  When I activate org-agenda, I get the 
usual menu.  When I press 'm' to search for a tag and then enter a known 
tag name, I get an empty *Org Agenda* buffer and an error in the minibuffer:


Symbol’s value as variable is void: timestamp-up


With debug-on-error set, I get the following backtrace:


Debugger entered--Lisp error: (void-variable timestamp-up)
   org-entries-lessp(#("  ubuntu:     Updated Pop_OS (Ubuntu) ..." 0 14 
(type "tagsmatch" priority 1000 ts-date nil todo-state$
   sort((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) 
org-entries-lessp)
   org-agenda-finalize-entries((... ... ... ... ... ... ... ... ... ... 
... ... ... ... ...) tags)
   org-tags-view(nil)
   funcall-interactively(org-tags-view nil)
   call-interactively(org-tags-view)
   org-agenda(nil)
   funcall-interactively(org-agenda nil)
   call-interactively(org-agenda nil nil)
   command-execute(org-agenda)

When I enter org-agenda and use 'a' for my agenda, I get the following 
error:


Invalid function: (date date)


And the backtrace is:


Debugger entered--Lisp error: (invalid-function (date date))
   (date date)()
org-agenda-get-day-entries("/home/wdmccoy/orgfiles/C/C-examples.org" (10 
18 2021) :deadline :scheduled :timestamp :sexp)
   apply(org-agenda-get-day-entries 
"/home/wdmccoy/orgfiles/C/C-examples.org" (10 18 2021) (:deadline 
:scheduled :timestamp :s$
   org-agenda-list(nil)
   funcall-interactively(org-agenda-list nil)
   call-interactively(org-agenda-list)
   org-agenda(nil)
   funcall-interactively(org-agenda nil)
   call-interactively(org-agenda nil nil)
   command-execute(org-agenda)


If I start  emacs with the -Q switch and then execute my 
org-agenda-files setting command in the *scratch* buffer:


(setq org-agenda-files (directory-files-recursively "~/orgfiles/" 
"\\.org$"))


then org-agenda appears to work fine without errors.  So I have made a 
minimal init.el file and trimmed virtually everything from my 
emacs-custom.el file (file attached), but the error returns.  I just 
can't figure out what's causing it.  Any ideas?


Thanks, Bill



[-- Attachment #2: init.el --]
[-- Type: text/x-emacs-lisp, Size: 833 bytes --]

;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file: emacs-init.org
;; You should make any changes there and regenerate it from Emacs org-mode using C-c C-v t

(package-initialize)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)

(require 'org)
(require 'ob)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-switchb)
; (global-set-key "\C-c \C-," 'org-insert-structure-template)
; (add-hook 'org-mode-hook 'auto-fill-mode)
; (setq org-agenda-include-diary t)
(setq org-directory "~/orgfiles/")
(setq org-agenda-files (directory-files-recursively "~/orgfiles/" "\\.org$"))

(setq custom-file "~/.emacs.d/emacs-custom.el")
(load custom-file)

[-- Attachment #3: emacs-custom.el --]
[-- Type: text/x-emacs-lisp, Size: 1564 bytes --]

;; These are the custom-set variables for emacs on aeolus.
;; These were originally copied here form my .emacs init file on
;; 30 July 2018

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
 '(case-fold-search t)
 '(column-number-mode t)
 '(current-language-environment "English")
 '(default-input-method "rfc1345")
 '(diary-file "~/.emacs.d/diary")
 '(display-time-mode t)
 '(package-selected-packages
   '(org websocket use-package test-simple selectrum-prescient request pylint ob-translate ob-reticulate markdown-mode map magit julia-mode irony helm-org-rifle helm-org helm-descbinds go-translate gnuplot flycheck-julia flycheck-checkbashisms eval-in-repl ess enlive emacsql-sqlite3 emacsql-psql emacsql-mysql elpl deft citeproc-org charmap auctex arduino-mode arduino-cli-mode)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:size "10pt" :family "Courier 10 Pitch" :foundry "bitstream" :slant normal :weight normal :height 120 :width normal)))))

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

* Fwd: errors when using org-agenda
  2021-10-22 20:35 errors when using org-agenda William McCoy
@ 2021-10-23  0:46 ` William McCoy
  2021-10-23  1:57   ` Tim Cross
  0 siblings, 1 reply; 18+ messages in thread
From: William McCoy @ 2021-10-23  0:46 UTC (permalink / raw)
  To: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 3144 bytes --]

I am modifying my previous message (that has not yet appeared on this 
list) with some additional information regarding this issue:


I have been having some strange errors when using org-agenda.  The 
errors seem to have begun about the time I upgraded to org 9.5 from the 
elpa repo a couple of weeks ago.  When I activate org-agenda, I get the 
usual menu.  When I press 'm' to search for a tag and then enter a known 
tag name, I get an empty *Org Agenda* buffer and an error in the minibuffer:



Symbol’s value as variable is void: timestamp-up


With debug-on-error set, I get the following backtrace:


Debugger entered--Lisp error: (void-variable timestamp-up)
   org-entries-lessp(#("  ubuntu:     Updated Pop_OS (Ubuntu) ..." 0 14 
(type "tagsmatch" priority 1000 ts-date nil todo-state$
   sort((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) 
org-entries-lessp)
   org-agenda-finalize-entries((... ... ... ... ... ... ... ... ... ... 
... ... ... ... ...) tags)
   org-tags-view(nil)
   funcall-interactively(org-tags-view nil)
   call-interactively(org-tags-view)
   org-agenda(nil)
   funcall-interactively(org-agenda nil)
   call-interactively(org-agenda nil nil)
   command-execute(org-agenda)

When I enter org-agenda and use 'a' for my agenda, I get the following 
error:


Invalid function: (date date)


And the backtrace is:


Debugger entered--Lisp error: (invalid-function (date date))
   (date date)()
org-agenda-get-day-entries("/home/wdmccoy/orgfiles/C/C-examples.org" (10 
18 2021) :deadline :scheduled :timestamp :sexp)
   apply(org-agenda-get-day-entries 
"/home/wdmccoy/orgfiles/C/C-examples.org" (10 18 2021) (:deadline 
:scheduled :timestamp :s$
   org-agenda-list(nil)
   funcall-interactively(org-agenda-list nil)
   call-interactively(org-agenda-list)
   org-agenda(nil)
   funcall-interactively(org-agenda nil)
   call-interactively(org-agenda nil nil)
   command-execute(org-agenda)


Disregard the following comments between the dashed lines.  I just 
realized that when I start emacs with the -Q switch, an older built-in 
version of org-mode (9.4.4) is used.  So I do think this is related to 
changes in version 9.5.

--------------------------------------------------------------------------
If I start  emacs with the -Q switch and then execute my 
org-agenda-files setting command in the *scratch* buffer:


(setq org-agenda-files (directory-files-recursively "~/orgfiles/" 
"\\.org$"))


then org-agenda appears to work fine without errors.
--------------------------------------------------------------------------


I have made a minimal init.el file and trimmed virtually everything from 
my emacs-custom.el file (file attached), but the error still occurs.  I 
just can't figure out what's causing it.  Any ideas?

Also I forgot to add:

emacs-version: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ 
Version 3.24.20, cairo version 1.16.0) of 2021-06-04

org-version: Org mode version 9.5 (9.5-g0a86ad @ 
/home/wdmccoy/.emacs.d/elpa/org-9.5/)

OS:  Linux pop-os 5.13.0-7614-generic 
#14~1631647151~21.04~930e87c-Ubuntu SMP


Thanks, Bill




[-- Attachment #2: init.el --]
[-- Type: text/x-emacs-lisp, Size: 834 bytes --]

;; DO NOT EDIT THIS FILE DIRECTLY
;; This is a file generated from a literate programing source file: emacs-init.org
;; You should make any changes there and regenerate it from Emacs org-mode using C-c C-v t

(package-initialize)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)

(require 'org)
(require 'ob)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-switchb)
; (global-set-key "\C-c \C-," 'org-insert-structure-template)
; (add-hook 'org-mode-hook 'auto-fill-mode)
; (setq org-agenda-include-diary t)
(setq org-directory "~/orgfiles/")
(setq org-agenda-files (directory-files-recursively "~/orgfiles/" "\\.org$"))

(setq custom-file "~/.emacs.d/emacs-custom.el")
(load custom-file)


[-- Attachment #3: emacs-custom.el --]
[-- Type: text/x-emacs-lisp, Size: 1565 bytes --]

;; These are the custom-set variables for emacs on aeolus.
;; These were originally copied here form my .emacs init file on
;; 30 July 2018

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-faces-vector
   [default default default italic underline success warning error])
 '(ansi-color-names-vector
   ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
 '(case-fold-search t)
 '(column-number-mode t)
 '(current-language-environment "English")
 '(default-input-method "rfc1345")
 '(diary-file "~/.emacs.d/diary")
 '(display-time-mode t)
 '(package-selected-packages
   '(org websocket use-package test-simple selectrum-prescient request pylint ob-translate ob-reticulate markdown-mode map magit julia-mode irony helm-org-rifle helm-org helm-descbinds go-translate gnuplot flycheck-julia flycheck-checkbashisms eval-in-repl ess enlive emacsql-sqlite3 emacsql-psql emacsql-mysql elpl deft citeproc-org charmap auctex arduino-mode arduino-cli-mode)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:size "10pt" :family "Courier 10 Pitch" :foundry "bitstream" :slant normal :weight normal :height 120 :width normal)))))


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

* Re: Fwd: errors when using org-agenda
  2021-10-23  0:46 ` Fwd: " William McCoy
@ 2021-10-23  1:57   ` Tim Cross
  2021-10-23 10:26     ` Greg Minshall
  2021-10-23 14:49     ` William McCoy
  0 siblings, 2 replies; 18+ messages in thread
From: Tim Cross @ 2021-10-23  1:57 UTC (permalink / raw)
  To: emacs-orgmode


William McCoy <wdm8588@gmail.com> writes:

> I am modifying my previous message (that has not yet appeared on this list) with
> some additional information regarding this issue:
>
>
> I have been having some strange errors when using org-agenda.  The errors seem
> to have begun about the time I upgraded to org 9.5 from the elpa repo a couple
> of weeks ago.  When I activate org-agenda, I get the usual menu.  When I press
> 'm' to search for a tag and then enter a known tag name, I get an empty *Org
> Agenda* buffer and an error in the minibuffer:
>
>
>
> Symbol’s value as variable is void: timestamp-up
>
>
> With debug-on-error set, I get the following backtrace:
>
>
> Debugger entered--Lisp error: (void-variable timestamp-up)
>   org-entries-lessp(#("  ubuntu:     Updated Pop_OS (Ubuntu) ..." 0 14 (type
> "tagsmatch" priority 1000 ts-date nil todo-state$
>   sort((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)
> org-entries-lessp)
>   org-agenda-finalize-entries((... ... ... ... ... ... ... ... ... ... ... ...
> ... ... ...) tags)
>   org-tags-view(nil)
>   funcall-interactively(org-tags-view nil)
>   call-interactively(org-tags-view)
>   org-agenda(nil)
>   funcall-interactively(org-agenda nil)
>   call-interactively(org-agenda nil nil)
>   command-execute(org-agenda)
>
> When I enter org-agenda and use 'a' for my agenda, I get the following error:
>
>
> Invalid function: (date date)
>
>
> And the backtrace is:
>
>
> Debugger entered--Lisp error: (invalid-function (date date))
>   (date date)()
> org-agenda-get-day-entries("/home/wdmccoy/orgfiles/C/C-examples.org" (10 18
> 2021) :deadline :scheduled :timestamp :sexp)
>   apply(org-agenda-get-day-entries "/home/wdmccoy/orgfiles/C/C-examples.org" (10
> 18 2021) (:deadline :scheduled :timestamp :s$
>   org-agenda-list(nil)
>   funcall-interactively(org-agenda-list nil)
>   call-interactively(org-agenda-list)
>   org-agenda(nil)
>   funcall-interactively(org-agenda nil)
>   call-interactively(org-agenda nil nil)
>   command-execute(org-agenda)
>
>
> Disregard the following comments between the dashed lines.  I just realized that
> when I start emacs with the -Q switch, an older built-in version of org-mode
> (9.4.4) is used.  So I do think this is related to changes in version 9.5.
>
> --------------------------------------------------------------------------
> If I start  emacs with the -Q switch and then execute my org-agenda-files
> setting command in the *scratch* buffer:
>
>
> (setq org-agenda-files (directory-files-recursively "~/orgfiles/" "\\.org$"))
>
>
> then org-agenda appears to work fine without errors.
> --------------------------------------------------------------------------
>
>
> I have made a minimal init.el file and trimmed virtually everything from my
> emacs-custom.el file (file attached), but the error still occurs.  I just can't
> figure out what's causing it.  Any ideas?
>
> Also I forgot to add:
>
> emacs-version: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.20, cairo version 1.16.0) of 2021-06-04
>
> org-version: Org mode version 9.5 (9.5-g0a86ad @
> /home/wdmccoy/.emacs.d/elpa/org-9.5/)
>
> OS:  Linux pop-os 5.13.0-7614-generic #14~1631647151~21.04~930e87c-Ubuntu SMP
>
>
> Thanks, Bill
>
>
>
> [2. text/x-emacs-lisp; init.el]...
>
> [3. text/x-emacs-lisp; emacs-custom.el]...

These types of errors are frequently caused by a 'mixed' installation of
org versions. This will happen if you upgrade org when org is already
loaded in the instance of emacs used to perform the upgrade.

It is critically important when upgrading org that org is not already
loaded. Highly recommend you remove the version of org you have
installed, restart emacs (ensuring nothing in your init.el loads org -
comment out if there is), install org 9.5, uncomment anything in your
init.el you commented to ensure org was not loaded, restart emacs and
see if the problem is resolved.

Note that if your installing other org extensions, make sure these are
not loaded as well as it is probable they will load org as well. 


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

* Re: Fwd: errors when using org-agenda
  2021-10-23  1:57   ` Tim Cross
@ 2021-10-23 10:26     ` Greg Minshall
  2021-10-23 11:34       ` Tim Cross
  2021-10-24  8:16       ` Max Nikulin
  2021-10-23 14:49     ` William McCoy
  1 sibling, 2 replies; 18+ messages in thread
From: Greg Minshall @ 2021-10-23 10:26 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

Tim, et al.,

> These types of errors are frequently caused by a 'mixed' installation
> of org versions. This will happen if you upgrade org when org is
> already loaded in the instance of emacs used to perform the upgrade.

a question: is there any way that we can, as org starts up, detect
either the actuality, or possibility, of a mixed installation?
maybe something like
----
(assert (eq 1
            (length
             (seq-filter
              (lambda (d) (file-exists-p (concat d "/" "org.el")))
              load-path))))
----
or some such?  (well, maybe fail in a more user-friendly way... :)

cheers, Greg


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

* Re: Fwd: errors when using org-agenda
  2021-10-23 10:26     ` Greg Minshall
@ 2021-10-23 11:34       ` Tim Cross
  2021-10-23 18:07         ` Greg Minshall
                           ` (2 more replies)
  2021-10-24  8:16       ` Max Nikulin
  1 sibling, 3 replies; 18+ messages in thread
From: Tim Cross @ 2021-10-23 11:34 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode


Greg Minshall <minshall@umich.edu> writes:

> Tim, et al.,
>
>> These types of errors are frequently caused by a 'mixed' installation
>> of org versions. This will happen if you upgrade org when org is
>> already loaded in the instance of emacs used to perform the upgrade.
>
> a question: is there any way that we can, as org starts up, detect
> either the actuality, or possibility, of a mixed installation?
> maybe something like
> ----
> (assert (eq 1
>             (length
>              (seq-filter
>               (lambda (d) (file-exists-p (concat d "/" "org.el")))
>               load-path))))
> ----
> or some such?  (well, maybe fail in a more user-friendly way... :)
>
I'm not sure auto detecting is possible. It isn't so much about what
files exist, but what functions are already defined and/or what
libraries are already loaded when the upgrade process tries to compile
the new version. The 'mixed' refers to the resulting *.elc files, which
havbe been compiled with definitions from two different org versions.
With package.el for example, once the upgrade has been completed, the
old ELPA version doesn't exist anymore, so it isn't as simple as just
checking for multiple references to org source files in the load path
and at different locations.

What would really be needed is some way to check when org is going to be
compiled that no existing org functionality is loaded. Doubt this can be
easily done within org itself because of a chicken and egg problem - you
would have to load org to run the code to check if org is loaded.

It could be possible to add something to the package installer, but that
would mean doing something with all the package installers e.g.
package.el, straight.el, etc.

Some distributions, like spacemacs, manage this by separating marking of
packages to be upgraded and doing the upgrade into separate sessions.
You check for updates, write the list of packages to be updated, move
the existing packages to a recovery area and then you have to restart
Emacs. On restart, the list of packages to be upgraded (it is really an
install because the previous versions have been moved out into a
separate 'recovery' area) and if org is in the list, move it to the
front of the list so that it is installed before any other packages (to
protect against other packages loading org as part of their
installation).

All this means, with spacemacs, you can be pretty confident an upgrade
will work without the mixed install issue. Even better, if the upgraded
package has problems and you want to downgrade back to the previous
version, that is supported as well.

The bad aspect of spacemacs is that after you have used it for a while,
your pretty much ruined when it comes to running vanilla Emacs. You get
very use to the VI style modal editing and find it hard to use emacs
without evil mode installed.





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

* Re: Fwd: errors when using org-agenda
  2021-10-23  1:57   ` Tim Cross
  2021-10-23 10:26     ` Greg Minshall
@ 2021-10-23 14:49     ` William McCoy
  1 sibling, 0 replies; 18+ messages in thread
From: William McCoy @ 2021-10-23 14:49 UTC (permalink / raw)
  To: emacs-orgmode

Ok, great -- that fixed it!  I thought I had been careful to get rid of 
my old org from org elpa before I installed 9.5.  However, I hadn't 
considered that there was an older org still installed that had been 
packaged with my emacs 27.2 installation.

So thanks very much for your quick advice.  It's very nice to have that 
functionality back.


Bill


On 10/22/21 9:57 PM, Tim Cross wrote:
> William McCoy <wdm8588@gmail.com> writes:
>
>> I am modifying my previous message (that has not yet appeared on this list) with
>> some additional information regarding this issue:
>>
>>
>> I have been having some strange errors when using org-agenda.  The errors seem
>> to have begun about the time I upgraded to org 9.5 from the elpa repo a couple
>> of weeks ago.  When I activate org-agenda, I get the usual menu.  When I press
>> 'm' to search for a tag and then enter a known tag name, I get an empty *Org
>> Agenda* buffer and an error in the minibuffer:
>>
>>
>>
>> Symbol’s value as variable is void: timestamp-up
>>
>>
>> With debug-on-error set, I get the following backtrace:
>>
>>
>> Debugger entered--Lisp error: (void-variable timestamp-up)
>>    org-entries-lessp(#("  ubuntu:     Updated Pop_OS (Ubuntu) ..." 0 14 (type
>> "tagsmatch" priority 1000 ts-date nil todo-state$
>>    sort((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)
>> org-entries-lessp)
>>    org-agenda-finalize-entries((... ... ... ... ... ... ... ... ... ... ... ...
>> ... ... ...) tags)
>>    org-tags-view(nil)
>>    funcall-interactively(org-tags-view nil)
>>    call-interactively(org-tags-view)
>>    org-agenda(nil)
>>    funcall-interactively(org-agenda nil)
>>    call-interactively(org-agenda nil nil)
>>    command-execute(org-agenda)
>>
>> When I enter org-agenda and use 'a' for my agenda, I get the following error:
>>
>>
>> Invalid function: (date date)
>>
>>
>> And the backtrace is:
>>
>>
>> Debugger entered--Lisp error: (invalid-function (date date))
>>    (date date)()
>> org-agenda-get-day-entries("/home/wdmccoy/orgfiles/C/C-examples.org" (10 18
>> 2021) :deadline :scheduled :timestamp :sexp)
>>    apply(org-agenda-get-day-entries "/home/wdmccoy/orgfiles/C/C-examples.org" (10
>> 18 2021) (:deadline :scheduled :timestamp :s$
>>    org-agenda-list(nil)
>>    funcall-interactively(org-agenda-list nil)
>>    call-interactively(org-agenda-list)
>>    org-agenda(nil)
>>    funcall-interactively(org-agenda nil)
>>    call-interactively(org-agenda nil nil)
>>    command-execute(org-agenda)
>>
>>
>> Disregard the following comments between the dashed lines.  I just realized that
>> when I start emacs with the -Q switch, an older built-in version of org-mode
>> (9.4.4) is used.  So I do think this is related to changes in version 9.5.
>>
>> --------------------------------------------------------------------------
>> If I start  emacs with the -Q switch and then execute my org-agenda-files
>> setting command in the *scratch* buffer:
>>
>>
>> (setq org-agenda-files (directory-files-recursively "~/orgfiles/" "\\.org$"))
>>
>>
>> then org-agenda appears to work fine without errors.
>> --------------------------------------------------------------------------
>>
>>
>> I have made a minimal init.el file and trimmed virtually everything from my
>> emacs-custom.el file (file attached), but the error still occurs.  I just can't
>> figure out what's causing it.  Any ideas?
>>
>> Also I forgot to add:
>>
>> emacs-version: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
>> 3.24.20, cairo version 1.16.0) of 2021-06-04
>>
>> org-version: Org mode version 9.5 (9.5-g0a86ad @
>> /home/wdmccoy/.emacs.d/elpa/org-9.5/)
>>
>> OS:  Linux pop-os 5.13.0-7614-generic #14~1631647151~21.04~930e87c-Ubuntu SMP
>>
>>
>> Thanks, Bill
>>
>>
>>
>> [2. text/x-emacs-lisp; init.el]...
>>
>> [3. text/x-emacs-lisp; emacs-custom.el]...
> These types of errors are frequently caused by a 'mixed' installation of
> org versions. This will happen if you upgrade org when org is already
> loaded in the instance of emacs used to perform the upgrade.
>
> It is critically important when upgrading org that org is not already
> loaded. Highly recommend you remove the version of org you have
> installed, restart emacs (ensuring nothing in your init.el loads org -
> comment out if there is), install org 9.5, uncomment anything in your
> init.el you commented to ensure org was not loaded, restart emacs and
> see if the problem is resolved.
>
> Note that if your installing other org extensions, make sure these are
> not loaded as well as it is probable they will load org as well.
>


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

* Re: Fwd: errors when using org-agenda
  2021-10-23 11:34       ` Tim Cross
@ 2021-10-23 18:07         ` Greg Minshall
  2021-10-23 18:21           ` Tim Cross
  2021-10-24  5:05         ` Greg Minshall
  2021-10-24  5:12         ` [PATCH] " Ihor Radchenko
  2 siblings, 1 reply; 18+ messages in thread
From: Greg Minshall @ 2021-10-23 18:07 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

Tim,

thanks.  i see that it is more complicated.

(and, after fifteen years of vi, and now 25 of emacs, i guess i'll skip
the spacemacs experience.  :)

cheers, Greg


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

* Re: Fwd: errors when using org-agenda
  2021-10-23 18:07         ` Greg Minshall
@ 2021-10-23 18:21           ` Tim Cross
  2021-10-24  0:45             ` Thomas S. Dye
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Cross @ 2021-10-23 18:21 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode


Greg Minshall <minshall@umich.edu> writes:

> (and, after fifteen years of vi, and now 25 of emacs, i guess i'll skip
> the spacemacs experience.  :)
>

Similar past for me as well. I used vi from early/mid 80x until mid 90s
and then switched to Emacs and used standard Emacs bindings until a
couple of years ago, then decided to give spacemacs a go.

I realised when I did I had very much missed the vi modal editing
approach. I know it isn't for everyone, but I find using it pushes my
productivity through the roof. I always tried to use keyboard navigation
and avoid the mouse. Being able to use simple keys rather than complex
bindings involving ctl, alt, shift, is just so much faster and easier on
my aging and stiffining fingers, I think I'm now a devout member of the
evil-mode cult.



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

* Re: Fwd: errors when using org-agenda
  2021-10-23 18:21           ` Tim Cross
@ 2021-10-24  0:45             ` Thomas S. Dye
  0 siblings, 0 replies; 18+ messages in thread
From: Thomas S. Dye @ 2021-10-24  0:45 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Greg Minshall


Tim Cross <theophilusx@gmail.com> writes:

> Greg Minshall <minshall@umich.edu> writes:
>
>> (and, after fifteen years of vi, and now 25 of emacs, i guess 
>> i'll skip
>> the spacemacs experience.  :)
>>
>
> Similar past for me as well. I used vi from early/mid 80x until 
> mid 90s
> and then switched to Emacs and used standard Emacs bindings 
> until a
> couple of years ago, then decided to give spacemacs a go.
>
> I realised when I did I had very much missed the vi modal 
> editing
> approach. I know it isn't for everyone, but I find using it 
> pushes my
> productivity through the roof. I always tried to use keyboard 
> navigation
> and avoid the mouse. Being able to use simple keys rather than 
> complex
> bindings involving ctl, alt, shift, is just so much faster and 
> easier on
> my aging and stiffining fingers, I think I'm now a devout member 
> of the
> evil-mode cult.

Same here, though Spacemacs introduced me to modal editing.

Spacemacs also helped eliminate many of my rookie errors 
configuring Emacs.

All the best,
Tom
-- 
Thomas S. Dye
https://tsdye.online/tsdye


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

* Re: Fwd: errors when using org-agenda
  2021-10-23 11:34       ` Tim Cross
  2021-10-23 18:07         ` Greg Minshall
@ 2021-10-24  5:05         ` Greg Minshall
  2021-10-24  6:44           ` Tim Cross
  2021-10-24  5:12         ` [PATCH] " Ihor Radchenko
  2 siblings, 1 reply; 18+ messages in thread
From: Greg Minshall @ 2021-10-24  5:05 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

Tim,

i wonder if the emacs variable `load-history` might be of (approximate)
help?  i submit a starter routine below.  as the comments say: caveat,
caveat, caveat.

i don't think something as uncertain as this would be a candidate for
normal run-time checking (and, i'm not even sure when one would want to
run such a thing -- maybe as each module is loaded, if it were faster).
but, maybe it could be run as part of `M-x org-submit-bug-report`?
either to notify the user, or to include with the bug report?

wdyt?  (such a nice acronym!)

cheers, Greg

----
notice the canned list of files.  one could, i suspect, go find where
org.el came from, then use all the .el files there.  (or the union of
all the files in *all* the directories that loaded an org.el.)
----

(defun org--check-load-history (&optional where)
  "check to see if there *appears* to *maybe* have be a \"mixed
  installation\" of org-mode running.  if there appear to be more than
  one directory holding org package(-like) files, the names of those
  directories, along with the relevant files in each, are returned as
  a vector of explanatory strings.  

  this routine is subject to both type I and type II errors (false
  positives, false negatives).  we have a canned list of org .el file
  names, and we look to see if those files exist in more than one
  directory that has been loaded (using the `load-list` variable).

  if there does not appear to be the possibility of a \"mixed
  installation\", the if the optional argument WHERE is non-nil, and
  there is only one directory containing org package(-like) files,
  that directory name is returned.  if WHERE is nil, nil is returned."
  (require 'seq)
  (require 's)

  (let* ((org-files
          '("ob-lob.el" "oc-bibtex.el" "org-crypt.el" "org-persist.el"
            "ob-C.el" "ob-lua.el" "oc-csl.el" "org-ctags.el" "org-plot.el"
            "ob-R.el" "ob-makefile.el" "oc-natbib.el" "org-datetree.el" "org-protocol.el"
            "ob-awk.el" "ob-matlab.el" "oc.el" "org-duration.el" "org-refile.el"
            "ob-calc.el" "ob-maxima.el" "ol-bbdb.el" "org-element.el" "org-src.el"
            "ob-clojure.el" "ob-ocaml.el" "ol-bibtex.el" "org-entities.el" "org-table.el"
            "ob-comint.el" "ob-octave.el" "ol-docview.el" "org-faces.el" "org-tempo.el"
            "ob-core.el" "ob-org.el" "ol-doi.el" "org-feed.el" "org-timer.el"
            "ob-css.el" "ob-perl.el" "ol-eshell.el" "org-footnote.el" "org-version.el"
            "ob-ditaa.el" "ob-plantuml.el" "ol-eww.el" "org-goto.el" "org-version.el~"
            "ob-dot.el" "ob-processing.el" "ol-gnus.el" "org-habit.el" "org.el"
            "ob-emacs-lisp.el" "ob-python.el" "ol-info.el" "org-id.el" "ox-ascii.el"
            "ob-eshell.el" "ob-ref.el" "ol-irc.el" "org-indent.el" "ox-beamer.el"
            "ob-eval.el" "ob-ruby.el" "ol-man.el" "org-inlinetask.el" "ox-html.el"
            "ob-exp.el" "ob-sass.el" "ol-mhe.el" "org-install.el" "ox-icalendar.el"
            "ob-forth.el" "ob-scheme.el" "ol-rmail.el" "org-keys.el" "ox-koma-letter.el"
            "ob-fortran.el" "ob-screen.el" "ol-w3m.el" "org-lint.el" "ox-latex.el"
            "ob-gnuplot.el" "ob-sed.el" "ol.el" "org-list.el" "ox-man.el"
            "ob-groovy.el" "ob-shell.el" "org-agenda.el" "org-loaddefs.el" "ox-md.el"
            "ob-haskell.el" "ob-sql.el" "org-archive.el" "org-loaddefs.el~" "ox-odt.el"
            "ob-java.el" "ob-sqlite.el" "org-attach-git.el" "org-macro.el" "ox-org.el"
            "ob-js.el" "ob-table.el" "org-attach.el" "org-macs.el" "ox-publish.el"
            "ob-julia.el" "ob-tangle.el" "org-capture.el" "org-mobile.el" "ox-texinfo.el"
            "ob-latex.el" "ob.el" "org-clock.el" "org-mouse.el" "ox.el"
            "ob-lilypond.el" "oc-basic.el" "org-colview.el" "org-num.el"
            "ob-lisp.el" "oc-biblatex.el" "org-compat.el" "org-pcomplete.el"))
         (possibles
          (seq-map (lambda (x)
                     (cons (file-name-directory (car x))
                           (list (file-name-base (car x)))))
                   (seq-filter
                    (lambda (x)
                      (let ((bn (file-name-nondirectory (car x))))
                        (seq-contains-p org-files bn
                                        (lambda (e elt) (s-match (concat "^" e "$") elt)))))
                    load-history))))
    (let ((uniques (seq-uniq (seq-map 'car possibles))))
      (if (eq 1 (length uniques))
          (if where                             ; this is the good outcome
              (car uniques))
        (seq-map
         (lambda (dir)
           (let ((joined
                  (s-join " "
                          (seq-map 'cadr
                                   (seq-filter
                                    (lambda (e)
                                      (progn
                                        (equal (car e) dir)))
                                    possibles)))))
             (s-lex-format "from ${dir} have: ${joined}")))
         uniques)))))


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

* [PATCH] Re: Fwd: errors when using org-agenda
  2021-10-23 11:34       ` Tim Cross
  2021-10-23 18:07         ` Greg Minshall
  2021-10-24  5:05         ` Greg Minshall
@ 2021-10-24  5:12         ` Ihor Radchenko
  2021-10-24  6:59           ` Tim Cross
  2 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2021-10-24  5:12 UTC (permalink / raw)
  To: Tim Cross; +Cc: Greg Minshall, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

Tim Cross <theophilusx@gmail.com> writes:

> What would really be needed is some way to check when org is going to be
> compiled that no existing org functionality is loaded. Doubt this can be
> easily done within org itself because of a chicken and egg problem - you
> would have to load org to run the code to check if org is loaded.

I attached a tentative patch checking if org is loaded.  It is not
ideal, but it can capture some scenarios.

The patch will not work if older org.el is loaded before newer version
of Org.  Though we may put extra checks in other lisp files.

WDYT?

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-Check-for-mixed-installation.patch --]
[-- Type: text/x-diff, Size: 4863 bytes --]

From 2e987d60e47da0a7da8ded32bc5c2cc6bf11db04 Mon Sep 17 00:00:00 2001
Message-Id: <2e987d60e47da0a7da8ded32bc5c2cc6bf11db04.1635052126.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Sun, 24 Oct 2021 13:06:47 +0800
Subject: [PATCH] org.el: Check for mixed installation

* lisp/org.el (org-check-mixed-installation): New macro checking all
the loaded org libraries to be from the same directory and to have the
same extension (no mixing of .el and .elc).
(org-mode): Call `org-check-mixed-installation' before and after
`org-mode' loading.
---
 lisp/org.el | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 53 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 90c645625..0d009ccb5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -90,6 +90,55 @@ (or (eq this-command 'eval-buffer)
        (message "You need to run \"make\" or \"make autoloads\" from Org lisp directory")
        (sit-for 3))))
 
+(defmacro org-check-mixed-installation ()
+  "Detect mixed installation."
+  `(let* ((org-feature-list '( ob-C ob-R ob-awk ob-clojure ob-comint
+			    ob-core ob-css ob-ditaa ob-dot ob-emacs-lisp
+                            ob-eshell ob-eval ob-exp ob-forth ob-fortran
+                            ob-gnuplot ob-groovy ob-haskell ob-java
+                            ob-js ob-julia ob-latex ob-lilypond
+                            ob-lisp ob-lob ob-lua ob-makefile
+                            ob-matlab ob-maxima ob-ocaml ob-octave
+                            ob-org ob-perl ob-plantuml ob-processing
+                            ob-python ob-ref ob-ruby ob-sass ob-scheme
+                            ob-screen ob-sed ob-shell ob-sql ob-sqlite
+                            ob-table ob-tangle ob oc-basic oc-biblatex
+                            oc-bibtex oc-csl oc-natbib oc ol-bbdb ol-bibtex
+                            ol-docview ol-doi ol-eshell ol-eww ol-gnus
+                            ol-info ol-irc ol-man ol-mhe ol-rmail
+                            ol-w3m ol org-agenda org-archive org-attach-git
+                            org-attach org-capture org-clock org-colview
+                            ;; org-compat
+                            org-crypt org-ctags org-datetree
+                            org-duration org-element org-entities
+                            org-faces org-feed org-footnote org-goto
+                            org-habit org-id org-indent org-inlinetask
+                            org-install org-keys org-lint org-list
+                            org-macro org-macs org-mobile org-mouse
+                            org-num org-pcomplete org-persist org-plot
+                            org-protocol org-refile org-src org-table
+                            org-tempo org-timer org ox-ascii ox-beamer
+                            ox-html ox-icalendar ox-koma-letter ox-latex
+                            ox-man ox-md ox-odt ox-org ox-publish
+                            ox-texinfo ox))
+          (loaded-features (seq-filter
+			    (lambda (f) (memq (alist-get 'provide f)
+				         org-feature-list))
+                            load-history))
+          (loaded-files (mapcar #'car loaded-features)))
+     (unless (and (= 1 (length (cl-remove-duplicates
+			        (mapcar (lambda (path) (file-name-directory path))
+				        loaded-files)
+			        :test #'equal)))
+                  (= 1 (length (cl-remove-duplicates
+			        (mapcar (lambda (path) (file-name-extension path))
+				        loaded-files)
+			        :test #'equal))))
+       (warn "Mixed Org mode installation detected.
+Please make sure that you deleted old Org files after upgrade and do
+not load Org/external packages depending on Org before setting the
+correct `load-path' in your init.el."))))
+
 (eval-and-compile (require 'org-macs))
 (require 'org-compat)
 (require 'org-keys)
@@ -4840,6 +4889,7 @@ (define-derived-mode org-mode outline-mode "Org"
 The following commands are available:
 
 \\{org-mode-map}"
+  (org-check-mixed-installation)
   (org-load-modules-maybe)
   (org-install-agenda-files-menu)
   (when org-link-descriptive (add-to-invisibility-spec '(org-link)))
@@ -4978,8 +5028,9 @@ (define-derived-mode org-mode outline-mode "Org"
       (set-face-foreground 'org-hide foreground)))
   ;; Set face extension as requested.
   (org--set-faces-extend '(org-block-begin-line org-block-end-line)
-                         org-fontify-whole-block-delimiter-line)
-  (org--set-faces-extend org-level-faces org-fontify-whole-heading-line))
+                      org-fontify-whole-block-delimiter-line)
+  (org--set-faces-extend org-level-faces org-fontify-whole-heading-line)
+  (org-check-mixed-installation))
 
 ;; Update `customize-package-emacs-version-alist'
 (add-to-list 'customize-package-emacs-version-alist
-- 
2.32.0


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

* Re: Fwd: errors when using org-agenda
  2021-10-24  5:05         ` Greg Minshall
@ 2021-10-24  6:44           ` Tim Cross
  2021-10-24 10:55             ` Greg Minshall
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Cross @ 2021-10-24  6:44 UTC (permalink / raw)
  To: Greg Minshall; +Cc: emacs-orgmode


Greg Minshall <minshall@umich.edu> writes:

> Tim,
>
> i wonder if the emacs variable `load-history` might be of (approximate)
> help?  i submit a starter routine below.  as the comments say: caveat,
> caveat, caveat.
>
> i don't think something as uncertain as this would be a candidate for
> normal run-time checking (and, i'm not even sure when one would want to
> run such a thing -- maybe as each module is loaded, if it were faster).
> but, maybe it could be run as part of `M-x org-submit-bug-report`?
> either to notify the user, or to include with the bug report?
>
> wdyt?  (such a nice acronym!)
>
> cheers, Greg
>
> ----
> notice the canned list of files.  one could, i suspect, go find where
> org.el came from, then use all the .el files there.  (or the union of
> all the files in *all* the directories that loaded an org.el.)
> ----
>
> (defun org--check-load-history (&optional where)
>   "check to see if there *appears* to *maybe* have be a \"mixed
>   installation\" of org-mode running.  if there appear to be more than
>   one directory holding org package(-like) files, the names of those
>   directories, along with the relevant files in each, are returned as
>   a vector of explanatory strings.  
>
>   this routine is subject to both type I and type II errors (false
>   positives, false negatives).  we have a canned list of org .el file
>   names, and we look to see if those files exist in more than one
>   directory that has been loaded (using the `load-list` variable).
>
>   if there does not appear to be the possibility of a \"mixed
>   installation\", the if the optional argument WHERE is non-nil, and
>   there is only one directory containing org package(-like) files,
>   that directory name is returned.  if WHERE is nil, nil is returned."
>   (require 'seq)
>   (require 's)
>
>   (let* ((org-files
>           '("ob-lob.el" "oc-bibtex.el" "org-crypt.el" "org-persist.el"
>             "ob-C.el" "ob-lua.el" "oc-csl.el" "org-ctags.el" "org-plot.el"
>             "ob-R.el" "ob-makefile.el" "oc-natbib.el" "org-datetree.el" "org-protocol.el"
>             "ob-awk.el" "ob-matlab.el" "oc.el" "org-duration.el" "org-refile.el"
>             "ob-calc.el" "ob-maxima.el" "ol-bbdb.el" "org-element.el" "org-src.el"
>             "ob-clojure.el" "ob-ocaml.el" "ol-bibtex.el" "org-entities.el" "org-table.el"
>             "ob-comint.el" "ob-octave.el" "ol-docview.el" "org-faces.el" "org-tempo.el"
>             "ob-core.el" "ob-org.el" "ol-doi.el" "org-feed.el" "org-timer.el"
>             "ob-css.el" "ob-perl.el" "ol-eshell.el" "org-footnote.el" "org-version.el"
>             "ob-ditaa.el" "ob-plantuml.el" "ol-eww.el" "org-goto.el" "org-version.el~"
>             "ob-dot.el" "ob-processing.el" "ol-gnus.el" "org-habit.el" "org.el"
>             "ob-emacs-lisp.el" "ob-python.el" "ol-info.el" "org-id.el" "ox-ascii.el"
>             "ob-eshell.el" "ob-ref.el" "ol-irc.el" "org-indent.el" "ox-beamer.el"
>             "ob-eval.el" "ob-ruby.el" "ol-man.el" "org-inlinetask.el" "ox-html.el"
>             "ob-exp.el" "ob-sass.el" "ol-mhe.el" "org-install.el" "ox-icalendar.el"
>             "ob-forth.el" "ob-scheme.el" "ol-rmail.el" "org-keys.el" "ox-koma-letter.el"
>             "ob-fortran.el" "ob-screen.el" "ol-w3m.el" "org-lint.el" "ox-latex.el"
>             "ob-gnuplot.el" "ob-sed.el" "ol.el" "org-list.el" "ox-man.el"
>             "ob-groovy.el" "ob-shell.el" "org-agenda.el" "org-loaddefs.el" "ox-md.el"
>             "ob-haskell.el" "ob-sql.el" "org-archive.el" "org-loaddefs.el~" "ox-odt.el"
>             "ob-java.el" "ob-sqlite.el" "org-attach-git.el" "org-macro.el" "ox-org.el"
>             "ob-js.el" "ob-table.el" "org-attach.el" "org-macs.el" "ox-publish.el"
>             "ob-julia.el" "ob-tangle.el" "org-capture.el" "org-mobile.el" "ox-texinfo.el"
>             "ob-latex.el" "ob.el" "org-clock.el" "org-mouse.el" "ox.el"
>             "ob-lilypond.el" "oc-basic.el" "org-colview.el" "org-num.el"
>             "ob-lisp.el" "oc-biblatex.el" "org-compat.el" "org-pcomplete.el"))
>          (possibles
>           (seq-map (lambda (x)
>                      (cons (file-name-directory (car x))
>                            (list (file-name-base (car x)))))
>                    (seq-filter
>                     (lambda (x)
>                       (let ((bn (file-name-nondirectory (car x))))
>                         (seq-contains-p org-files bn
>                                         (lambda (e elt) (s-match (concat "^" e "$") elt)))))
>                     load-history))))
>     (let ((uniques (seq-uniq (seq-map 'car possibles))))
>       (if (eq 1 (length uniques))
>           (if where                             ; this is the good outcome
>               (car uniques))
>         (seq-map
>          (lambda (dir)
>            (let ((joined
>                   (s-join " "
>                           (seq-map 'cadr
>                                    (seq-filter
>                                     (lambda (e)
>                                       (progn
>                                         (equal (car e) dir)))
>                                     possibles)))))
>              (s-lex-format "from ${dir} have: ${joined}")))
>          uniques)))))


Iff you could run this function as part of the actual upgrade process
i.e. it runs just before package.el or straight.el or ... tries to
upgrade org mode, I guess it could provide a warning that org is already
loaded and that continuing will run the risk of a mixed installation.

The key point to remember is that a mized installation is not about
loading org sources from two different org versions. The problem is
about compilation of org where some of the source definitions are
already loaded (from existing installation) and result in output which
is a combination of some of the source from the new version mixed with
definitions from the old version. This approach wouldn't be useful, for
example, when you have a mixed installation and encounter the problem in
a later session, because by that time, you are only loading a single
version, only the elc files which make up that version are corrupted
(and load-history is only for the current session). . 


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

* Re: [PATCH] Re: Fwd: errors when using org-agenda
  2021-10-24  5:12         ` [PATCH] " Ihor Radchenko
@ 2021-10-24  6:59           ` Tim Cross
  0 siblings, 0 replies; 18+ messages in thread
From: Tim Cross @ 2021-10-24  6:59 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Greg Minshall, emacs-orgmode


Ihor Radchenko <yantar92@gmail.com> writes:

> Tim Cross <theophilusx@gmail.com> writes:
>
>> What would really be needed is some way to check when org is going to be
>> compiled that no existing org functionality is loaded. Doubt this can be
>> easily done within org itself because of a chicken and egg problem - you
>> would have to load org to run the code to check if org is loaded.
>
> I attached a tentative patch checking if org is loaded.  It is not
> ideal, but it can capture some scenarios.
>
> The patch will not work if older org.el is loaded before newer version
> of Org.  Though we may put extra checks in other lisp files.
>
> WDYT?
>
>
This is along the lines of what I was thinking. Of course, the big
limitation is requirement org.el is not loaded. I would imagine it is
rare for org to be loaded and org.el not to be? However, I think this
sort of approach i.e. warning if there is an attempt to upgrade org when
org is already loaded, is the way to go.  Achieving this in a clean and
reliable manner is the challenge. False positives are an issue as that
would likely prevent legitimate upgrades.  


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

* Re: Fwd: errors when using org-agenda
  2021-10-23 10:26     ` Greg Minshall
  2021-10-23 11:34       ` Tim Cross
@ 2021-10-24  8:16       ` Max Nikulin
  2021-10-24  8:34         ` Ihor Radchenko
  1 sibling, 1 reply; 18+ messages in thread
From: Max Nikulin @ 2021-10-24  8:16 UTC (permalink / raw)
  To: emacs-orgmode

On 23/10/2021 17:26, Greg Minshall wrote:
> 
> a question: is there any way that we can, as org starts up, detect
> either the actuality, or possibility, of a mixed installation?
> maybe something like

`org-version' with FULL argument checks whether org and org-loaddedfs 
are loaded from the same directory and adds "mixed installation!" to the 
version string. `org-submit-bug-report' puts full version to the message 
subject but it is easily to miss this warning since it is in the middle 
of the long string.



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

* Re: Fwd: errors when using org-agenda
  2021-10-24  8:16       ` Max Nikulin
@ 2021-10-24  8:34         ` Ihor Radchenko
  2021-10-27 16:46           ` Max Nikulin
  0 siblings, 1 reply; 18+ messages in thread
From: Ihor Radchenko @ 2021-10-24  8:34 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

> `org-version' with FULL argument checks whether org and org-loaddedfs 
> are loaded from the same directory and adds "mixed installation!" to the 
> version string. `org-submit-bug-report' puts full version to the message 
> subject but it is easily to miss this warning since it is in the middle 
> of the long string.

Yes, but unfortunately it does not handle early Org loading correctly.

Try the following init.el:

(require 'org)
(add-to-list 'load-path (expand-file-name "/path/to/newest/org-mode/lisp"))

Then run emacs -Q -l /path/to/init.el

M-x org-version does not report anything suspicious even though
M-x org-mode will error on current main because old 'org is trying to
load files from the new load-path.

Best,
Ihor


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

* Re: Fwd: errors when using org-agenda
  2021-10-24  6:44           ` Tim Cross
@ 2021-10-24 10:55             ` Greg Minshall
  0 siblings, 0 replies; 18+ messages in thread
From: Greg Minshall @ 2021-10-24 10:55 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

Tim,

> The key point to remember is that a mized installation is not about
> loading org sources from two different org versions. The problem is
> about compilation of org where some of the source definitions are
> already loaded (from existing installation) and result in output which
> is a combination of some of the source from the new version mixed with
> definitions from the old version.

hah.  i think you or others have mentioned this before, but i hadn't
understood until now (albeit still vaguely).

thanks!

cheers, Greg


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

* Re: Fwd: errors when using org-agenda
  2021-10-24  8:34         ` Ihor Radchenko
@ 2021-10-27 16:46           ` Max Nikulin
  2022-09-11  9:22             ` Ihor Radchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Max Nikulin @ 2021-10-27 16:46 UTC (permalink / raw)
  To: emacs-orgmode

On 24/10/2021 15:34, Ihor Radchenko wrote:
> Max Nikulin writes:
> 
>> `org-version' with FULL argument checks whether org and org-loaddedfs
>> are loaded from the same directory and adds "mixed installation!" to the
>> version string. `org-submit-bug-report' puts full version to the message
>> subject but it is easily to miss this warning since it is in the middle
>> of the long string.
> 
> Yes, but unfortunately it does not handle early Org loading correctly.
> 
> Try the following init.el:
> 
> (require 'org)
> (add-to-list 'load-path (expand-file-name "/path/to/newest/org-mode/lisp"))
> 
> Then run emacs -Q -l /path/to/init.el
> 
> M-x org-version does not report anything suspicious even though
> M-x org-mode will error on current main because old 'org is trying to
> load files from the new load-path.

You are right, `org-version' can not catch such case. However 
improvements of mixed install detection should be incorporated into 
`org-submit-bug-report'. I would not mind to have more prominent warning 
in the message body, maybe even with the link to the FAQ entry.

> +          (loaded-features (seq-filter
> +			    (lambda (f) (memq (alist-get 'provide f)
> +				         org-feature-list))
> +                            load-history))

Some time ago I found `featurep' function, so I am curious if there are 
reasons why it should not be used here.

If earlier loaded org modules is a problem during update and compiling 
of new sources, couldn't it be solved by `eval-when-compile'? E.g. by 
new `org-require' macro that wraps `require' and checks that the file is 
loaded from the same directory (e.g. org-loaddefs, the required file, 
and the compiled file)? The idea is that such code should not depend on 
particular package manager.



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

* Re: Fwd: errors when using org-agenda
  2021-10-27 16:46           ` Max Nikulin
@ 2022-09-11  9:22             ` Ihor Radchenko
  0 siblings, 0 replies; 18+ messages in thread
From: Ihor Radchenko @ 2022-09-11  9:22 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

Max Nikulin <manikulin@gmail.com> writes:

>> Yes, but unfortunately it does not handle early Org loading correctly.
>> 
>> Try the following init.el:
>> 
>> (require 'org)
>> (add-to-list 'load-path (expand-file-name "/path/to/newest/org-mode/lisp"))
>> 
>> Then run emacs -Q -l /path/to/init.el
>> 
>> M-x org-version does not report anything suspicious even though
>> M-x org-mode will error on current main because old 'org is trying to
>> load files from the new load-path.
>
> You are right, `org-version' can not catch such case. However 
> improvements of mixed install detection should be incorporated into 
> `org-submit-bug-report'. I would not mind to have more prominent warning 
> in the message body, maybe even with the link to the FAQ entry.

I think that after
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e81a094383a2e06a80e6dfb5ed0ca1ece44026f2
we do not need to do anything about `org-submit-bug-report'. Org will
simply refuse to load and show warning if user tries to load mixed Org
files.

I consider this thread completed.

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92


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

end of thread, other threads:[~2022-09-11  9:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-22 20:35 errors when using org-agenda William McCoy
2021-10-23  0:46 ` Fwd: " William McCoy
2021-10-23  1:57   ` Tim Cross
2021-10-23 10:26     ` Greg Minshall
2021-10-23 11:34       ` Tim Cross
2021-10-23 18:07         ` Greg Minshall
2021-10-23 18:21           ` Tim Cross
2021-10-24  0:45             ` Thomas S. Dye
2021-10-24  5:05         ` Greg Minshall
2021-10-24  6:44           ` Tim Cross
2021-10-24 10:55             ` Greg Minshall
2021-10-24  5:12         ` [PATCH] " Ihor Radchenko
2021-10-24  6:59           ` Tim Cross
2021-10-24  8:16       ` Max Nikulin
2021-10-24  8:34         ` Ihor Radchenko
2021-10-27 16:46           ` Max Nikulin
2022-09-11  9:22             ` Ihor Radchenko
2021-10-23 14:49     ` William McCoy

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.