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 yPXVIAPYD18PYQAA0tVLHw (envelope-from ) for ; Thu, 16 Jul 2020 04:30:59 +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 mGrHHAPYD1+YfAAAbx9fmQ (envelope-from ) for ; Thu, 16 Jul 2020 04:30:59 +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 DE27C9401CB for ; Thu, 16 Jul 2020 04:30:58 +0000 (UTC) Received: from localhost ([::1]:58080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvvXt-00074f-Sw for larch@yhetil.org; Thu, 16 Jul 2020 00:30:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvvXQ-00073d-RW for emacs-orgmode@gnu.org; Thu, 16 Jul 2020 00:30:28 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:59304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvvXL-0000Av-Q5 for emacs-orgmode@gnu.org; Thu, 16 Jul 2020 00:30:28 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8ABF2E3157; Thu, 16 Jul 2020 00:29:55 -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=DM2BRMdOilf3mXivSWr/Z8Q8NRk=; b=ZFdIQY NXGKSyKDrkQP/2dEr34p6fnUh6GwnH7nkogKv27Cwk3Ic/6K9nH1KaPfhReNp67H rMhBnoEFd8tlZysfwJ94EhMDpMO1iGV2c3ofEKqpuARzhpBmFeNnC6xg+j6cS0YO W8xb6kOkA0EI7NfKtqROWvbTFaD0BGe3PWKFQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 84939E3156; Thu, 16 Jul 2020 00:29:55 -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=F07+BWhl2fyxpmvmS2V7Rp6r0I/Io5wEWWXAL1xCHG8=; b=oJFpSTSrBTFgaJGJ/YADUjANtDJA1oxapRQOmikFPiHrj6Thhs1UyZWjAmyhMSWzVRWLaB3hqmMO+dyBruLZZljr4I04t6yJJUxj6tWew9x02t/SwHjyWmMVFyQyaq9GpZvLYRwMCOLgeiquCFA31DOB/jRNZvEk4XM4eiAtSNY= 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-smtp21.pobox.com (Postfix) with ESMTPSA id E7797E3155; Thu, 16 Jul 2020 00:29:52 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: "Basil L. Contovounesios" Subject: Re: [PATCH] Make org-eldoc work with Emacs 28 In-Reply-To: <87o8ogntmm.fsf@tcd.ie> References: <878sfrnxvp.fsf@gmail.com> <87o8ogntmm.fsf@tcd.ie> Date: Thu, 16 Jul 2020 00:29:51 -0400 Message-ID: <87mu40ulog.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: FE6ADB86-C71C-11EA-98DE-843F439F7C89-24757444!pb-smtp21.pobox.com Received-SPF: pass client-ip=173.228.157.53; envelope-from=kyle@kyleam.com; helo=pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/16 00:29:55 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: "James N. V. Cash" , 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=fail (rsa verify failed) header.d=pobox.com header.s=sasl header.b=ZFdIQY N; dkim=fail (rsa verify failed) header.d=kyleam.com header.s=mesmtp header.b=oJFpSTSr; 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.49 X-TUID: 0qju/ybbJb47 Basil L. Contovounesios writes: > "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? I think we can do that, while still supporting Org's minimum Emacs version, by following python.el. Here's what it does: (with-no-warnings ;; supress warnings about eldoc-documentation-function being obsolete (if (null eldoc-documentation-function) ;; Emacs<25 (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) (if (boundp 'eldoc-documentation-functions) (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) (add-function :before-until (local 'eldoc-documentation-function) #'python-eldoc-function)))) And then... >> - (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. ... org-eldoc-documentation-function's signature could be changed to (&rest _ignored), like python-eldoc-function's.