From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QNjFHGnxCl8HDgAA0tVLHw (envelope-from ) for ; Sun, 12 Jul 2020 11:18:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cFuyGGnxCl9VSQAAB5/wlQ (envelope-from ) for ; Sun, 12 Jul 2020 11:18:01 +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 248ED940DA4 for ; Sun, 12 Jul 2020 11:18:01 +0000 (UTC) Received: from localhost ([::1]:48604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juZzc-0008VQ-4G for larch@yhetil.org; Sun, 12 Jul 2020 07:18:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtvn4-0001P0-Ht for emacs-orgmode@gnu.org; Fri, 10 Jul 2020 12:22:22 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:35854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtvn2-00064k-UN for emacs-orgmode@gnu.org; Fri, 10 Jul 2020 12:22:22 -0400 Received: by mail-qt1-x830.google.com with SMTP id x62so4874892qtd.3 for ; Fri, 10 Jul 2020 09:22:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=/SxvjllzbUx8HvPmvFLwGy5HPBg5Cmgbo16rQOHS9/U=; b=ttQ+y7FO2j3G8Y5i4HS4L5maKgH63SKViyYvWoRsWO17xbhcS7sUu7MDkWGql5690l Av2uhtrDRga7MqKA1LPgCHHW9KulecgqFsvvcgT00Ykq9Hsnr3pLX1nawmhZakMoGCnc oN3px13NYjdoTINhUNRAbVGiFm6fdXvo1dqXDq0t8jDjq8Rh2qpfKYyxCJ/p8Z/oTMxL kem422IYXc3UBmucDRwEbfhuALl6HEDllyagso8PEgvlYzXVTUjprf2o6MNAN3MnjJnN NBBc/b8pdtfBHc0lQ4Jh0UYldfxoM3zoZG2MrhqslcfObHOTvkf/QfkgAdkUrB+V+NPl 8cpg== 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:date:message-id:mime-version; bh=/SxvjllzbUx8HvPmvFLwGy5HPBg5Cmgbo16rQOHS9/U=; b=jdst6xSoHqSyrQKnuCdZuxN2aj+zkvg422tyjOX1TfalJljhJh0+MSlTSnL97k94Ua RtkUGxbwjxe6qvOATlnT5aG8/YPfoiv9ep592kAsNe536Y8PQ/NhTpkPCSWeJ+YLU0Mg nUfdFGM9fbqadgXKILXx70OJC3zapOpedgdQ6Q3TfXsSmuY+DPalFCqKHUngS5QgVKGo yu//UFaSZZlwQrb2tbpKmdvWDE61jLKL0ReJYKryMVJEJVaWYbj9+XJ0WhhYu+UC9fe3 6HKLmGq+55/HzSVTvVKh+dhHDANlUa6LjBrOlSjDo17qpLPY5g4jJZSHu1r2J3IGA0ww JIqA== X-Gm-Message-State: AOAM530I4s9E9hp/Po7gvt3lWm/4z3zlbVAvBz4RgR4YluLc/UNBq07n WYBlcxnCTKaeuhUGTEnykJzqG7mm+1bneg== X-Google-Smtp-Source: ABdhPJxhQEbcctdZmQpXv/D5VxS8pMktctBuvce6uuJbbV/ZPZvqv5FxGXz9D2ax+RvfgvhHprSicA== X-Received: by 2002:aed:2f26:: with SMTP id l35mr50137878qtd.79.1594398139624; Fri, 10 Jul 2020 09:22:19 -0700 (PDT) Received: from gonk ([2607:f2c0:e360:1126:4c8d:672:2f15:f132]) by smtp.gmail.com with ESMTPSA id 19sm7896993qke.44.2020.07.10.09.22.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jul 2020 09:22:19 -0700 (PDT) From: "James N. V. Cash" To: emacs-orgmode@gnu.org Cc: Subject: [PATCH] Make org-eldoc work with Emacs 28 Date: Fri, 10 Jul 2020 12:22:18 -0400 Message-ID: <878sfrnxvp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=james.nvc@gmail.com; helo=mail-qt1-x830.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 12 Jul 2020 07:17:25 -0400 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: , 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=gmail.com header.s=20161025 header.b=ttQ+y7FO; dmarc=pass (policy=none) header.from=gmail.com; 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.71 X-TUID: zIUwuLs9w/Mm In Emacs 28, eldoc now passes in a callback to the documentation functions. This breaks org-eldoc as it currently is, as org-eldoc-documentation-function gets called with the wrong number of arguments. This patch makes it continue to work by setting the new variable eldoc-documentation-strategy, which puts eldoc in "backwards-compatability" 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)) + (t (setq-local eldoc-documentation-function + #'org-eldoc-documentation-function)))) ;;;###autoload (add-hook 'org-mode-hook #'org-eldoc-load) -- 2.17.1