From 216f33974928f2c4ddf31eef8dd8c2d2062f0422 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Sat, 23 Apr 2022 22:50:07 -0400
Subject: [PATCH 2/2] lisp/org-eldoc.el: Fix inf-loop when point in org src
 blocks

(org-eldoc-documentation-function): Return nil when src block lang is
"org".  Without this, the `org-eldoc-documentation-function' is
repeated called and causes an inf-loop.

Fixes the issue reported in
<https://lists.gnu.org/r/emacs-orgmode/2022-04/msg00373.html>.
---
 lisp/org-eldoc.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/org-eldoc.el b/lisp/org-eldoc.el
index 4febac1..3435745 100644
--- a/lisp/org-eldoc.el
+++ b/lisp/org-eldoc.el
@@ -142,6 +142,8 @@
    (org-eldoc-get-src-header)
    (let ((lang (org-eldoc-get-src-lang)))
      (cond
+      ((string= lang "org")       ;Prevent inf-loop for Org src blocks
+       nil)
       ((or
         (string= lang "emacs-lisp")
         (string= lang "elisp"))
-- 
2.34.0

