emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el
Date: Thu, 01 Dec 2022 22:38:03 -0500	[thread overview]
Message-ID: <874juewk4k.fsf@kyleam.com> (raw)
In-Reply-To: <87bkonzisl.fsf@gnu.org>

Bastien writes:

> Some users reported an (invalid-function org-assert-version) error
> when installing Org from ELPA:
>
> https://lists.sr.ht/~bzg/emacsfr/%3Cd091463e1615422eb00070727d6a094ec0ae3c73.camel%40adocentyn.io%3E
> https://www.reddit.com/r/emacs/comments/z7qulo/comment/iyd9vam/?context=3
>
> This patch autoloads `org-assert-version'.

I don't understand the rationale behind this.  Every spot that calls
org-assert-version is preceded by a line that requires org-macs, so
isn't this error likely due to a mixed installation/load-path issue
where the wrong/older org-macs is taking precedence?

> It also removes the ;; generated-autoload-file: "org-loaddefs.el"
> footer in all files and let Make create org-autoloads.el instead.

I'm worried with how this will play with the Org bundled with Emacs.
The autoloads that are now written to lisp/org/org-loaddefs.el will
instead pollute the top-level lisp/loaddefs.el.

When I tested this out in the Emacs repo, running `make` shows many
lines of

    WARNING: No org-autoloads.el file could be found from where org.el
    is loaded.

and

    You need to run "make" or "make autoloads" from Org lisp directory

during the build.  And loading/using Org shows the same.

> Before the patch, installing from ELPA creates both org-loaddefs.el
> and org-autoloads.el, which is confusing.

Hmm, isn't this in line with the lisp/org-loaddefs.el and
lisp/loaddefs.el split that happens for the Emacs repo?

A similar split is used other packages in the Emacs repo as well:

    $ find lisp | grep '\-loaddefs.el' | head
    lisp/ps-print-loaddefs.elc
    lisp/org/org-loaddefs.el
    lisp/org/org-loaddefs.elc
    lisp/net/tramp-loaddefs.el
    lisp/net/tramp-loaddefs.elc
    lisp/calc/calc-loaddefs.el
    lisp/calc/calc-loaddefs.elc
    lisp/textmodes/reftex-loaddefs.el
    lisp/textmodes/reftex-loaddefs.elc
    lisp/textmodes/texinfo-loaddefs.elc

    $ find lisp | grep -c '\-loaddefs.el'
    29
    $ find lisp | grep -c '\-autoloads.el'
    0

And with the port of Emacs's 2682ea1b3 (Org commit 19c3969e7,
2022-10-04), there's also one spot that uses ;;;###org-autoload, which
tells loaddefs-gen.el to direct the autoload to org-loaddefs.el.

> Unless anyone objects, I'll install this patch in the bugfix branch
> tomorrow and release 9.6.1.

I think as is the patch would cause issues, and more generally I'm not
convinced we should be moving away from having an org-loaddefs.el file.
I'm also concerned about this sort of tree-wide change in a patch
release that will be synced to the emacs-29 branch.

Thanks for posting this for discussion, and please let me know if I'm
mistaken about the interaction with the Emacs repo.


  reply	other threads:[~2022-12-02  3:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  7:26 [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el Bastien
2022-12-02  3:38 ` Kyle Meyer [this message]
2022-12-02  7:44   ` Bastien
2022-12-03  4:18     ` Kyle Meyer
2022-12-06  3:54       ` David Masterson
2022-12-06  5:44         ` tomas
2022-12-06  7:13           ` David Masterson
2022-12-07 11:43     ` Ihor Radchenko
2022-12-07 14:08       ` Max Nikulin
2023-03-29 13:38     ` Ihor Radchenko
2023-03-29 16:04       ` Max Nikulin
2023-03-29 16:52         ` Ihor Radchenko
2023-04-01 14:44           ` Max Nikulin
2023-04-02  8:35             ` Ihor Radchenko
2023-04-02 15:59               ` Max Nikulin
2023-04-02 16:44                 ` Ihor Radchenko
2023-04-04 12:08                   ` Max Nikulin
2023-04-04 13:29                     ` Ihor Radchenko
2023-04-05 11:41                       ` Max Nikulin
2023-04-08 16:47           ` Max Nikulin
2023-04-09  8:29             ` Ihor Radchenko
2023-04-10  6:13               ` Max Nikulin
2023-04-10 16:58                 ` Ihor Radchenko
2023-06-04 10:58                   ` Max Nikulin
2022-12-06  3:00   ` David Masterson

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=874juewk4k.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=bzg@gnu.org \
    --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).