From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: Problem with eldoc and Python Date: Thu, 7 Jul 2016 11:33:51 +0200 Message-ID: References: <8760sih53f.fsf@saiph.selenimh> <87shvmfoek.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=94eb2c04f87874ea3805370863b3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL5hG-0007vK-3i for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 05:34:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL5hE-0004YI-8q for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 05:34:13 -0400 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:36839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL5hE-0004Xr-1N for emacs-orgmode@gnu.org; Thu, 07 Jul 2016 05:34:12 -0400 Received: by mail-oi0-x22f.google.com with SMTP id f189so15790061oig.3 for ; Thu, 07 Jul 2016 02:34:11 -0700 (PDT) In-Reply-To: <87shvmfoek.fsf@saiph.selenimh> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Fabrice Popineau , "emacs-orgmode@gnu.org" --94eb2c04f87874ea3805370863b3 Content-Type: multipart/alternative; boundary=94eb2c04f87874ea3205370863b1 --94eb2c04f87874ea3205370863b1 Content-Type: text/plain; charset=UTF-8 Here a 2 very small patches for contrib/lisp/org-eldoc.el Regards, Fabrice 2016-07-06 23:27 GMT+02:00 Nicolas Goaziou : > Fabrice Popineau writes: > > > The problem is that the byte code comes from Python mode. > > I solved the problem with this: > > > > $ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el > > --- contrib/lisp/org-eldoc.el 2016-02-29 11:13:22.330099500 +0100 > > +++ contrib/lisp/org-eldoc.el 2016-07-04 07:11:10.466144400 +0200 > > @@ -155,7 +155,8 @@ > > (string= lang "golang")) (when (require 'go-eldoc nil t) > > > > (go-eldoc--documentation-function))) > > (t (let ((doc-fun > > (org-eldoc-get-mode-local-documentation-function lang))) > > - (when (fboundp doc-fun) (funcall doc-fun)))))))) > > + (when (or (and (symbolp doc-fun) (fboundp doc-fun)) > > + (functionp doc-fun)) (funcall doc-fun)))))))) > > Wouldn't > > (when (functionp doc-fun) (funcall doc-fun)) > > be enough? > > Also, would you provide a patch for this? > > Thank you. > > Regards, > --94eb2c04f87874ea3205370863b1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here a 2 very small patches for contrib/lisp/org-eldoc.el<= div>
Regards,

Fabrice

=


2016-07-06 23:27 GMT+02:00 Nicolas Goaziou <= mail@nicolasgoa= ziou.fr>:
= Fabrice Popineau <fabrice.= popineau@gmail.com> writes:

> The problem is that the byte code comes from Python mode.
> I solved the problem with this:
>
> $ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el
> --- contrib/lisp/org-eldoc.el=C2=A0 =C2=A02016-02-29 11:13:22.33009950= 0 +0100
> +++ contrib/lisp/org-eldoc.el=C2=A0 =C2=A02016-07-04 07:11:10.46614440= 0 +0200
> @@ -155,7 +155,8 @@
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(string=3D lang = "golang")) (when (require 'go-eldoc nil t)
>
>=C2=A0 (go-eldoc--documentation-function)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(t (let ((doc-fun
> (org-eldoc-get-mode-local-documentation-function lang)))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (fbound= p doc-fun) (funcall doc-fun))))))))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (or (an= d (symbolp doc-fun) (fboundp doc-fun))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(functionp doc-fun)) (funcall doc-fun))))))))

Wouldn't

=C2=A0 (when (functionp doc-fun) (funcall doc-fun))

be enough?

Also, would you provide a patch for this?

Thank you.

Regards,

--94eb2c04f87874ea3205370863b1-- --94eb2c04f87874ea3805370863b3 Content-Type: application/octet-stream; name="0001-The-doc-fun-object-may-be-a-function-object-and-not-.patch" Content-Disposition: attachment; filename="0001-The-doc-fun-object-may-be-a-function-object-and-not-.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iqc48u9b0 RnJvbSAyM2EyMGU3MGQ4MTQ5NWJkZWE5M2Y5MDJkMWQ2NzRjMWYzNjVhYWIzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGYWJyaWNlIFBvcGluZWF1IDxmYWJyaWNlLnBvcGluZWF1QGdt YWlsLmNvbT4KRGF0ZTogVGh1LCA3IEp1bCAyMDE2IDExOjI2OjUwICswMjAwClN1YmplY3Q6IFtQ QVRDSF0gVGhlIGRvYy1mdW4gb2JqZWN0IG1heSBiZSBhIGZ1bmN0aW9uIG9iamVjdCBhbmQgbm90 IGEgc3ltYm9sLgoKLS0tCiBjb250cmliL2xpc3Avb3JnLWVsZG9jLmVsIHwgMiArLQogMSBmaWxl IGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvY29u dHJpYi9saXNwL29yZy1lbGRvYy5lbCBiL2NvbnRyaWIvbGlzcC9vcmctZWxkb2MuZWwKaW5kZXgg ZWExMjAzNy4uMDQ2OTE4ZCAxMDA2NDQKLS0tIGEvY29udHJpYi9saXNwL29yZy1lbGRvYy5lbAor KysgYi9jb250cmliL2xpc3Avb3JnLWVsZG9jLmVsCkBAIC0xNTUsNyArMTU1LDcgQEAKICAgICAg ICAgICAgICAoc3RyaW5nPSBsYW5nICJnb2xhbmciKSkgKHdoZW4gKHJlcXVpcmUgJ2dvLWVsZG9j IG5pbCB0KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChnby1lbGRv Yy0tZG9jdW1lbnRhdGlvbi1mdW5jdGlvbikpKQogICAgICAgICAgICAodCAobGV0ICgoZG9jLWZ1 biAob3JnLWVsZG9jLWdldC1tb2RlLWxvY2FsLWRvY3VtZW50YXRpb24tZnVuY3Rpb24gbGFuZykp KQotICAgICAgICAgICAgICAgICh3aGVuIChmYm91bmRwIGRvYy1mdW4pIChmdW5jYWxsIGRvYy1m dW4pKSkpKSkpKQorICAgICAgICAgICAgICAgICh3aGVuIChmdW5jdGlvbnAgZG9jLWZ1bikgKGZ1 bmNhbGwgZG9jLWZ1bikpKSkpKSkpCiAKIDs7OyMjI2F1dG9sb2FkCiAoZGVmdW4gb3JnLWVsZG9j LWxvYWQgKCkKLS0gCjIuOS4wCgpiYXNlLWNvbW1pdDogZjU1ZjdhMWNjYmExMjdkZmU5OTgzZWI5 YTRkMWVlYTU4NGYzZmZkNwo= --94eb2c04f87874ea3805370863b3 Content-Type: application/octet-stream; name="0001-When-inserting-a-new-src-block-the-language-may-not-.patch" Content-Disposition: attachment; filename="0001-When-inserting-a-new-src-block-the-language-may-not-.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iqc48u9s1 RnJvbSBmNTVmN2ExY2NiYTEyN2RmZTk5ODNlYjlhNGQxZWVhNTg0ZjNmZmQ3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGYWJyaWNlIFBvcGluZWF1IDxmYWJyaWNlLnBvcGluZWF1QGdt YWlsLmNvbT4KRGF0ZTogVGh1LCA3IEp1bCAyMDE2IDExOjI1OjEyICswMjAwClN1YmplY3Q6IF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