emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: "James N. V. Cash" <james.nvc@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Make org-eldoc work with Emacs 28
Date: Thu, 16 Jul 2020 00:29:51 -0400	[thread overview]
Message-ID: <87mu40ulog.fsf@kyleam.com> (raw)
In-Reply-To: <87o8ogntmm.fsf@tcd.ie>

Basil L. Contovounesios writes:

> "James N. V. Cash" <james.nvc@gmail.com> 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:

    ;; supress warnings about eldoc-documentation-function being obsolete
    (if (null eldoc-documentation-function)
        ;; Emacs<25
        (set (make-local-variable 'eldoc-documentation-function)
      (if (boundp 'eldoc-documentation-functions)
          (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t)
        (add-function :before-until (local 'eldoc-documentation-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.

  reply	other threads:[~2020-07-16  4:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 16:22 [PATCH] Make org-eldoc work with Emacs 28 James N. V. Cash
2020-07-13 16:23 ` Nicolas Goaziou
     [not found]   ` <87zh83l66q.fsf@gmail.com>
2020-07-13 16:41     ` James N. V. Cash
2020-07-16  1:20 ` Basil L. Contovounesios
2020-07-16  4:29   ` Kyle Meyer [this message]
2020-07-16 14:34     ` James N. V. Cash
2020-07-17  5:41       ` [PATCH] org-eldoc: Fix compatibility " Kyle Meyer
2020-07-17 10:12         ` Basil L. Contovounesios
2020-07-17 16:13           ` Eric Abrahamsen
2020-07-17 22:11           ` Kyle Meyer
2020-07-17 11:24         ` Joseph Mingrone
2020-07-19  0:20           ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mu40ulog.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=contovob@tcd.ie \
    --cc=emacs-orgmode@gnu.org \
    --cc=james.nvc@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).