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 mAcVMl6rD18ccwAA0tVLHw (envelope-from ) for ; Thu, 16 Jul 2020 01:20:30 +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 T3KvLV6rD19zdgAAbx9fmQ (envelope-from ) for ; Thu, 16 Jul 2020 01:20:30 +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 39B419400EF for ; Thu, 16 Jul 2020 01:20:30 +0000 (UTC) Received: from localhost ([::1]:55620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvsZY-0004Oz-Je for larch@yhetil.org; Wed, 15 Jul 2020 21:20:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvsZD-0004Oe-4D for emacs-orgmode@gnu.org; Wed, 15 Jul 2020 21:20:07 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:52834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvsZB-0000D6-DQ for emacs-orgmode@gnu.org; Wed, 15 Jul 2020 21:20:06 -0400 Received: by mail-wm1-x343.google.com with SMTP id q15so7939377wmj.2 for ; Wed, 15 Jul 2020 18:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=WMYiGCr+Aucsdu410oSBugL9TU630B2QFNDESYiiwP8=; b=Xz/+HVcKLhHebzYzWpdk+nn+faWIBiMbIV9wY/B6gszkFtCFX3xL9HLQy+98OM/HHS r3Cu4tbgbSfGv70jizTfmV3Eo+FsMgqNS82tHkoPZ9Pgc1ORsH+R6ovgPqTkzg9+NgV9 BzSCZoIapYKY7egoDZrXVXp0wmTBaTreeNt2vIV+c2k6WrbeXPx7DitZCGVOTsOq5gzl 5YIq5wQ4axm3hmK7ZO2fkW9AxdkIyo5aBYiTbZYxmhWUofjB5PdJcfHAbkl8eJSS7Zmz yJm9e0g6oZBcK5F64C+He0NOMo9YC4bYLiXS/ww224H53QvZ/J7VxzXYqMG0y5o/A9oK o3QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=WMYiGCr+Aucsdu410oSBugL9TU630B2QFNDESYiiwP8=; b=SHfveWEeDJvkcSrbZSyUTgG8tgFxlxqiB0dx6Rqn0uDwM3k7Lyb+/2pHk0j9l6ZG1e qVo9RCwmH6QCJA+hLZNjQ4Z2hUfVTGh8uk6viouvLD6jnYLDH/nmJZIVQ3QqIT/yeAiS SGymh7CFO4BRX8zwca3yIxXPRqAPPJMfC7kCZWL9tu2Coha5Zh+18k/AOqThYoFDd9QV Va9SNP0s9mQchWhQ2nkU2f08t43TsAdE3/r646LWBCgGGBp018nGe7DQ8pq+PK3EabWM L6S060dTv1pYlbFAERj3oE/VynjD/U943EGenIrqpuTXSEJFD0SJQl3C5wntcrBY0Nxc 0xYg== X-Gm-Message-State: AOAM530OgMcajZr+GWiAghomRj/9cRZo0AahICILZg6h3ontIKjt7T4L K40kpWvXkHT5ZZxR29ibMcrtzw== X-Google-Smtp-Source: ABdhPJz0JSmZ6qWa8W1CNRLliVdmuMVf0RDZ948qUu3lnK/eRP7y1aEGSnp53y1x3lz+7hqos6VHwA== X-Received: by 2002:a1c:19c5:: with SMTP id 188mr2046026wmz.124.1594862403429; Wed, 15 Jul 2020 18:20:03 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id q7sm6214302wra.56.2020.07.15.18.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 18:20:02 -0700 (PDT) From: "Basil L. Contovounesios" To: "James N. V. Cash" Subject: Re: [PATCH] Make org-eldoc work with Emacs 28 References: <878sfrnxvp.fsf@gmail.com> Date: Thu, 16 Jul 2020 02:20:01 +0100 In-Reply-To: <878sfrnxvp.fsf@gmail.com> (James N. V. Cash's message of "Fri, 10 Jul 2020 12:22:18 -0400") Message-ID: <87o8ogntmm.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::343; envelope-from=contovob@tcd.ie; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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=tcd-ie.20150623.gappssmtp.com header.s=20150623 header.b=Xz/+HVcK; 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: 0.29 X-TUID: GeTiHMGI5tU7 "James N. V. Cash" writes: > This patch makes it continue to work by setting the new variable > eldoc-documentation-strategy, which puts eldoc in > "backwards-compatability" mode. How involved would it be to make org-eldoc work in non-"backwards-compatibility" mode? > From 5c04048c0d1ed3f80c7dd3e6477e12fc8e760675 Mon Sep 17 00:00:00 2001 > From: "James N. V. Cash" > Date: Fri, 10 Jul 2020 11:56:23 -0400 > Subject: [PATCH] Make org-eldoc work with Emacs 28's new eldoc API > > Still using backward-compatability to use the old style of > function. The new way is to make the documentation function take a > callback, but this approach means the fewest changes. > --- > contrib/lisp/org-eldoc.el | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) > > diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el > index 72b10a1fb..060674b24 100644 > --- a/contrib/lisp/org-eldoc.el > +++ b/contrib/lisp/org-eldoc.el > @@ -161,11 +161,15 @@ > (defun org-eldoc-load () > "Set up org-eldoc documentation function." > (interactive) > - (if (boundp 'eldoc-documentation-functions) > - (add-hook 'eldoc-documentation-functions > - #'org-eldoc-documentation-function nil t) > - (setq-local eldoc-documentation-function > - #'org-eldoc-documentation-function))) > + (cond > + ((boundp 'eldoc-documentation-strategy) > + (setq-local eldoc-documentation-strategy > + #'org-eldoc-documentation-function)) > + ((boundp 'eldoc-documentation-functions) > + (add-hook 'eldoc-documentation-functions > + #'org-eldoc-documentation-function nil t)) Both eldoc-documentation-strategy and eldoc-documentation-functions are new in Emacs 28, so if one is defined, then so is the other. More importantly, functions added to eldoc-documentation-functions must take at least one argument, so org-eldoc-documentation-function is not a suitable function in its current state. > + (t (setq-local eldoc-documentation-function > + #'org-eldoc-documentation-function)))) Thanks, -- Basil