From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sDpLJJ4HdWF/TwEAgWs5BA (envelope-from ) for ; Sun, 24 Oct 2021 09:13:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gNHjH54HdWFMSQAAB5/wlQ (envelope-from ) for ; Sun, 24 Oct 2021 07:13:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 073992EFD6 for ; Sun, 24 Oct 2021 09:13:34 +0200 (CEST) Received: from localhost ([::1]:35340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meXhE-0003Ma-SX for larch@yhetil.org; Sun, 24 Oct 2021 03:13:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meXgU-0003IC-Lg for emacs-orgmode@gnu.org; Sun, 24 Oct 2021 03:12:46 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:46056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meXgR-0004Kv-Ej for emacs-orgmode@gnu.org; Sun, 24 Oct 2021 03:12:46 -0400 Received: by mail-pg1-x534.google.com with SMTP id f5so7631861pgc.12 for ; Sun, 24 Oct 2021 00:12:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=jv4Cjs3l4kcfLD2nrL2S5cfXTlL7MuGS/8pjdH6pxl4=; b=WrQgRk6bD3r1U47/qVCjv8uwpKGN3I0hJ7qDOUDfMJSkoCNvwPtdW8pA1fdfMAehXI aXR5su/6Tp7Xop3leSf6tnMcIGW97S9wg4UyEw6RkkQCIcEx3pBBQeLX2ZuhchmEGvSK FuVhUIie24viwVwjWINTHqmLR2fxvAdb1GRaRxYKsmdPnmMnWzNhd3y0hh9rAD7WSP0g etReIoZzLWNVKt4nTnoRfqBHr4IdLzwMmP0ByF5hL3kkJKTJEBmM9Jmz4HrzSNdKUDCr yxCBIGbl3gd3cDThVZyp6nbcR1ESxHicJshoPPbZq8LkT0o2oTdr4VGhnR6bbcn3rsF2 Ez2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=jv4Cjs3l4kcfLD2nrL2S5cfXTlL7MuGS/8pjdH6pxl4=; b=MRIHCcR331pcgH6PNV3v8qooPR4gbkgQ2zYCNwzCGC6qJO+qw/rFt0ilBric/jS5B+ EJN7YUJN163TLQTk8kTX6jg46qLUhmAczrkr1uD3/wH02LLi/X5iW70FTZdfqsHvL+SB /fetQ2jn5XOdbwAqWA2HzhWkKbY2mv1iiK6HDPznteHvSBRxEf+jDVRkto8eQ9Z7Z/5h HwPXvorkWQtJcHnQEHGXx8cjI/Ya1Et+LhHrFYos5aPuZS8R1eEbHzQ8c7AWZ6HcmP1O lmMcL5r5IfzQtw+XoY0hOrwK9qHteMeTOqZdVr8mW2vAttk4hIxmYkxTyyD0K1uVCuDj 0blA== X-Gm-Message-State: AOAM533gc7OeeU9y7lMzSelFFsS87H5aE1rsvS1nuCaloBZRQ8kkhkLE S0vpjUJypaSoVp2HSMPkf4MWb4kg5/g= X-Google-Smtp-Source: ABdhPJyegZiLbzNrzNYxtxxmBUU2vrEk+VJRmnGm9FhMdyJyW/VWkP0U+fr/7AAEv+Ae3lXKx56nFw== X-Received: by 2002:a05:6a00:140c:b0:447:96be:2ade with SMTP id l12-20020a056a00140c00b0044796be2ademr10651500pfu.26.1635059561846; Sun, 24 Oct 2021 00:12:41 -0700 (PDT) Received: from blind-drunk.fritz.box (124-171-49-168.dyn.iinet.net.au. [124.171.49.168]) by smtp.gmail.com with ESMTPSA id d24sm14194763pfn.62.2021.10.24.00.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 00:12:41 -0700 (PDT) References: <733d6598-0efd-519d-ba13-08d127256b87@gmail.com> <3dd9032d-c18e-47ec-a26d-a3c2f1e3cbf7@gmail.com> <1366768.1634984772@apollo2.minshall.org> <1522775.1635051905@apollo2.minshall.org> User-agent: mu4e 1.6.7; emacs 27.2 From: Tim Cross To: Greg Minshall Subject: Re: Fwd: errors when using org-agenda Date: Sun, 24 Oct 2021 17:44:34 +1100 In-reply-to: <1522775.1635051905@apollo2.minshall.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635059614; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jv4Cjs3l4kcfLD2nrL2S5cfXTlL7MuGS/8pjdH6pxl4=; b=renYcdDGOd1VnzLAsMyTkND8G3DIOBzg4bDCudkn4MXGtoNDqxnzTn3BNMruU35msPB0v3 81fWJgDM+w0CdV9vYBPKG5OJkWRxsKBy+STCib8zMvaYW+l73OEqE6EguwrLvM0ApDnK76 D5v0nOEYNxMIT/AlX7rlRGaBIBIHf6XO4EzdbBPgDn9zT3pJm0FJptx4MET/ArEMwx79wo xcx0kEgs07dbngbzXvtIaJXuM9W54ohTuUJwK3r1Q4CMaCVvr67ZMnibTuJkqKiL13//3v kPvQC05e1E5bdL/KXf6TnIaNQZqZAFo0pxLgH6JDD1a1gZe9qV7/BXFIyDJItQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635059614; a=rsa-sha256; cv=none; b=lnO1PRmqa7gB5z8CwI/o51T9ncrq0E55J8B2DV79p/ZrL6jKjS1BS0oJONkROUC96cvq2l Y/+KqaUseG+yM25WMYhgxHRT7Vvz2dr8S9/ESNlNEk4DoGr5t5yW8K0L0mzG9DqvkiGZAu XBBQ+jm3Fya19BOTfV+VkRMyA05uXvRQOwhPdYlvyOlRXZOws1jZJiTCRcxr+60WZRHpI/ vSaCpOYy0hE0kvMz3Ppo67mdmpJSC/GYwo4va6J9EwdppnohEtpM4vcPmZcpv20WtaPyWP 3uNHWrGDaIFk1Ei4BpXemsjfXMDPaBqIazOZWxvH8L3sD1MaduaXQ2L4BFJtQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WrQgRk6b; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -4.02 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WrQgRk6b; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 073992EFD6 X-Spam-Score: -4.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: wT61pNKg9ZWK Greg Minshall 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). .