From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QDYyOaL4N1/2fAAA0tVLHw (envelope-from ) for ; Sat, 15 Aug 2020 15:00:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qEfqNKL4N1/sCAAAbx9fmQ (envelope-from ) for ; Sat, 15 Aug 2020 15:00:50 +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 C4CE49402C8 for ; Sat, 15 Aug 2020 15:00:49 +0000 (UTC) Received: from localhost ([::1]:54408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6xfs-0002lF-7b for larch@yhetil.org; Sat, 15 Aug 2020 11:00:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6xd6-0008Tu-Ie for emacs-orgmode@gnu.org; Sat, 15 Aug 2020 10:57:57 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:54149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6xcz-0005GD-Lr for emacs-orgmode@gnu.org; Sat, 15 Aug 2020 10:57:55 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 207E8837DD; Sat, 15 Aug 2020 02:21:25 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=QMNqQ2v9/W1IPi8R5I6lVOd1lf4=; b=gD9YJl KPyKvrpIXjcHp3k83KjyNXgtyRDF0cZ2dsdNfon6wD6vRwNzAGo49ArEbTNeVYEC X1tfu7yvMIwvuGyYABpGX+TobGAn6Av8Ag9Zq7uBOBEFfTX4VL5tRKt5XbHGCH4R Qf+5k8PhXo/EqSmIjUne8hMnTdbNipKygLXHA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 18937837DC; Sat, 15 Aug 2020 02:21:25 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=srqaInpVE/z3AY+YIjffDos8LINVTqB+qQj/vStAVlg=; b=HtPz9msizHEiEDLfhLv1WPV0CW8UY63oQWoyu85yRQqB1guBzvQ/MKvJTlfrNOm3cHS5e/sfYUFJ93KRQmwi8tlIpYYOGYnnl6B8mjEfpFX7EIh1B6moWv95rodcl1378riB549hrK5D33tc+FhydOvUemCJ2csZmxo8FciXifc= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id D12FB837DB; Sat, 15 Aug 2020 02:21:22 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: No Wayman Subject: Re: Bug: eldoc error: (void-function nil) [9.3.7 (release_9.3.7-708-g5417e3 @ /home/n/.emacs.d/straight/build/org/)] In-Reply-To: <871rkas8o1.fsf@gmail.com> References: <871rkas8o1.fsf@gmail.com> Date: Sat, 15 Aug 2020 02:21:21 -0400 Message-ID: <87pn7sa0pq.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 8A4E59B6-DEBF-11EA-B72B-01D9BED8090B-24757444!pb-smtp1.pobox.com Received-SPF: pass client-ip=64.147.108.70; envelope-from=kyle@kyleam.com; helo=pb-smtp1.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/15 02:21:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=gD9YJl K; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=HtPz9msi; dmarc=none; 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-Spam-Score: -1.21 X-TUID: SoP974wB8/11 No Wayman writes: > Subject: [PATCH] org-eldoc: (org-eldoc-documentation-function): set > `eldoc-documentation-functions' > > * contrib/lisp/org-eldoc.el (org-eldoc-documentation-function): > > b2b587387 did not set eldoc-documentation-functions, resulting in > `eldoc--invoke-strategy' throwing a void-fucntion error. I'll plan to drop the unconventional blank line in the changelog entry and s/fucntion/function/ when applying. > --- > contrib/lisp/org-eldoc.el | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el > index aa1dcb41b..ce0b7ddc2 100644 > --- a/contrib/lisp/org-eldoc.el > +++ b/contrib/lisp/org-eldoc.el > @@ -138,7 +138,8 @@ > (string= lang "emacs-lisp") > (string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function) > (elisp-eldoc-documentation-function) > - (let (eldoc-documentation-function) > + (let ((eldoc-documentation-functions > + '(elisp-eldoc-var-docstring elisp-eldoc-funcall))) > (eldoc-print-current-symbol-info)))) > ((or > (string= lang "c") ;; http://github.com/nflath/c-eldoc This works on my end testing with Emacs 26.3 and the Emacs master branch. For example #+begin_src elisp (message "ok") #+end_src shows "message: (FORMAT-STRING &rest ARGS)" when point is positioned after "message". I don't have Emacs 24 at hand, but the eldoc-documentation-function let-binding you're dropping should be retained for it, I think. Assuming it's fine with you, I'll squash this into your patch. diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el index ce0b7ddc2..3b0999340 100644 --- a/contrib/lisp/org-eldoc.el +++ b/contrib/lisp/org-eldoc.el @@ -136,11 +136,16 @@ (defun org-eldoc-documentation-function (&rest _ignored) (let ((lang (org-eldoc-get-src-lang))) (cond ((or (string= lang "emacs-lisp") - (string= lang "elisp")) (if (fboundp 'elisp-eldoc-documentation-function) - (elisp-eldoc-documentation-function) - (let ((eldoc-documentation-functions - '(elisp-eldoc-var-docstring elisp-eldoc-funcall))) - (eldoc-print-current-symbol-info)))) + (string= lang "elisp")) + (cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28 + (let ((eldoc-documentation-functions + '(elisp-eldoc-var-docstring elisp-eldoc-funcall))) + (eldoc-print-current-symbol-info))) + ((fboundp 'elisp-eldoc-documentation-function) + (elisp-eldoc-documentation-function)) + (t ; Emacs<25 + (let (eldoc-documentation-function) + (eldoc-print-current-symbol-info))))) ((or (string= lang "c") ;; http://github.com/nflath/c-eldoc (string= lang "C")) (when (require 'c-eldoc nil t)