emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Christoffer Stjernlöf" <christoffer@loop54.com>, emacs-orgmode@gnu.org
Subject: Re: Bug: Org-drill defines advice causing infinite recursion [9.3.6 (release_9.3.6-465-g4fde1c @ /home/christoffer/.emacs.d/straight/build/org/)]
Date: Sat, 02 May 2020 04:36:17 +0000	[thread overview]
Message-ID: <87r1w3kl6m.fsf@kyleam.com> (raw)
In-Reply-To: <CAGkrc4QC+awFg5abDiL40fN47KsTFTLivRR9z9LEO6wjDExzJw@mail.gmail.com>

Hi,

Sorry for the slow reply.

Christoffer Stjernlöf <christoffer@loop54.com> writes:

> Org-drill defines the following advice:
>
>     (when (version< org-version "9.2")
>      (advice-add 'org-get-tags :around #'org-drill-get-tags-advice))
>
>     (defun org-drill-get-tags-advice (orig-fun &rest args)
>      ;; the two arg call obsoletes get-local-tags
>       (if (= 2 (length args))
>          ;; and we don't want any byte compile errors
>          (if (fboundp 'org-get-local-tags) (org-get-local-tags))
>        ;; the non-arg version doesn't return inherited tags, but
>        ;; get-tags-at does.
>        (org-get-tags-at)))
>
> The function being called at the end, org-get-tags-at, has the unfortunate
> definition:
>
>     (define-obsolete-function-alias 'org-get-tags-at 'org-get-tags "Org
> 9.2")

Hmm, but the advice is being added only if the Org version is before
9.2, and in that case org-get-tags-at is a separate function, not an
alias.  So that seems like that should be fine.  However ...

> This results in the advice calling the function it advises, leading to
> infinite recursion.
>
> Is the version check around the advice addition accidentally inverted? Or
> is there anything else I'm missing?

... if you're actually hitting into an infinite recursion, then I of
course trust that more than my reasoning.  Because you don't explicitly
say that you are and based on your reported Org version being after 9.2,
I'm guessing your conclusion was based solely on reading the code.

If there is an issue, though, note that org-drill.el is no longer in the
Org tree as of 2c8e8b4a1 (contrib: Remove Org Drill, 2019-07-11).  I
believe it's maintained at <https://gitlab.com/phillord/org-drill>.


      reply	other threads:[~2020-05-02  4:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 10:19 Bug: Org-drill defines advice causing infinite recursion [9.3.6 (release_9.3.6-465-g4fde1c @ /home/christoffer/.emacs.d/straight/build/org/)] Christoffer Stjernlöf
2020-05-02  4:36 ` Kyle Meyer [this message]

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=87r1w3kl6m.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=christoffer@loop54.com \
    --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).