* Bug: Org-drill defines advice causing infinite recursion [9.3.6 (release_9.3.6-465-g4fde1c @ /home/christoffer/.emacs.d/straight/build/org/)]
@ 2020-04-09 10:19 Christoffer Stjernlöf
2020-05-02 4:36 ` Kyle Meyer
0 siblings, 1 reply; 2+ messages in thread
From: Christoffer Stjernlöf @ 2020-04-09 10:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback
Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
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")
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?
Emacs : GNU Emacs 26.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.13)
of 2020-01-28
Package: Org mode version 9.3.6 (release_9.3.6-465-g4fde1c @
/home/christoffer/.emacs.d/straight/build/org/)
[-- Attachment #2: Type: text/html, Size: 1841 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* 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/)]
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
0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-05-02 4:36 UTC (permalink / raw)
To: Christoffer Stjernlöf, emacs-orgmode
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>.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-02 4:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.