GNU bug report logs - #19696
python.el: blank line eldoc error

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Mon, 26 Jan 2015 17:33:02 UTC

Severity: normal

Tags: patch

Found in version 24.4

Done: fgallina <at> gnu.org (Fabián Ezequiel Gallina)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19696 in the body.
You can then email your comments to 19696 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Mon, 26 Jan 2015 17:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 26 Jan 2015 17:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: galli.87 <at> gmail.com
Subject: 24.4; python.el: blank line eldoc error
Date: Mon, 26 Jan 2015 14:32:29 -0300
On blank lines eldoc shows the following message in the echo area:

eldoc error: (void-function nil)





Information forwarded to galli.87 <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Tue, 03 Feb 2015 23:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 19696 <at> debbugs.gnu.org
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Tue, 3 Feb 2015 20:23:08 -0300
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: galli.87 <at> gmail.com
Tags: patch

Advising eldoc-documentation-function sometimes resulted in a function
void symbol error. I don't know exactly why but the fact is that
eldoc-print-current-symbol-info error handler ended up printing "eldoc
error: ...". Anyway the approach seems to me a bit contorted so I
replaced the advice by a more conventional local variable and it seems
to work fine now.
[eldoc.patch (text/x-patch, attachment)]

Changed bug title to 'python.el: blank line eldoc error' from '24.4; python.el: blank line eldoc error' Request was from Carlos Pita <carlosjosepita <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 03 Feb 2015 23:25:02 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Carlos Pita <carlosjosepita <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 03 Feb 2015 23:26:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 15:26:01 GMT) Full text and rfc822 format available.

Message #15 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 19696 <at> debbugs.gnu.org, galli.87 <at> gmail.com
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 04 Feb 2015 10:25:12 -0500
> Advising eldoc-documentation-function sometimes resulted in a function
> void symbol error.

Can you show the exact error?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 18:03:02 GMT) Full text and rfc822 format available.

Message #18 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 4 Feb 2015 15:01:57 -0300
Sure Stefan.

This:


#[128 "\300\301^B\"\206^K^@\300\302^B\"\207" [apply
python-eldoc-function #[128 "\301\302\300!^B\"\207"
[eldoc-documentation-function apply default-value] 4 "

(fn &rest ARGS)"] nil] 4 nil]


is the content of eldoc-documentation-function at this point of execution:


     (if eldoc-documentation-function
         (eldoc-message (funcall eldoc-documentation-function))
      [...]


The error raised by the evaluation of the funcall is:


    Symbol's function definition is void: nil


And that triggers the message in the echo area:


    eldoc error: (void-function nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 18:13:02 GMT) Full text and rfc822 format available.

Message #21 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 4 Feb 2015 15:11:38 -0300
I'm not the expert here, but could it be that there is no previous
value for eldoc-documentation-function? I mean, from:

    (add-function WHERE PLACE FUNCTION &optional PROPS)

    Add a piece of advice on the function stored at PLACE.
    [...]
    `:before-until'    (lambda (&rest r) (or  (apply FUNCTION r)
(apply OLDFUN r)))

What is OLDFUN at the point where python.el advises it?:

  (add-function :before-until (local 'eldoc-documentation-function)
                #'python-eldoc-function)

It makes sense that if fails only when there is no symbol to get info
about, as (apply FUNCTION r) evals to nil and (apply OLDFUN r) gets
called, while OLDFUN has no value in its function cell.



On Wed, Feb 4, 2015 at 3:01 PM, Carlos Pita <carlosjosepita <at> gmail.com> wrote:
> Sure Stefan.
>
> This:
>
>
> #[128 "\300\301^B\"\206^K^@\300\302^B\"\207" [apply
> python-eldoc-function #[128 "\301\302\300!^B\"\207"
> [eldoc-documentation-function apply default-value] 4 "
>
> (fn &rest ARGS)"] nil] 4 nil]
>
>
> is the content of eldoc-documentation-function at this point of execution:
>
>
>      (if eldoc-documentation-function
>          (eldoc-message (funcall eldoc-documentation-function))
>       [...]
>
>
> The error raised by the evaluation of the funcall is:
>
>
>     Symbol's function definition is void: nil
>
>
> And that triggers the message in the echo area:
>
>
>     eldoc error: (void-function nil)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 18:36:01 GMT) Full text and rfc822 format available.

Message #24 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 04 Feb 2015 13:35:12 -0500
> I'm not the expert here, but could it be that there is no previous
> value for eldoc-documentation-function?

eldoc-documentation-function is defined in eldoc.el as:

    (defvar eldoc-documentation-function #'ignore
      ...)

and eldoc.el is preloaded, so the var should not be nil.

Which version of Emacs is that?  Your report seems to say Emacs-24.4,
but the add-function call in python.el is new in master, AFAICT.
Are you by any chance using the python.el from master with an
older Emacs?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 18:44:02 GMT) Full text and rfc822 format available.

Message #27 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 4 Feb 2015 15:43:28 -0300
When I initially reported this bug I was using an early build (post
24.4) of master. Now I'm at work with 24.4 and downloaded the latest
python.el from master just to answer you. But let me build the latest
master and try again.

On Wed, Feb 4, 2015 at 3:35 PM, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>> I'm not the expert here, but could it be that there is no previous
>> value for eldoc-documentation-function?
>
> eldoc-documentation-function is defined in eldoc.el as:
>
>     (defvar eldoc-documentation-function #'ignore
>       ...)
>
> and eldoc.el is preloaded, so the var should not be nil.
>
> Which version of Emacs is that?  Your report seems to say Emacs-24.4,
> but the add-function call in python.el is new in master, AFAICT.
> Are you by any chance using the python.el from master with an
> older Emacs?
>
>
>         Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 19:01:02 GMT) Full text and rfc822 format available.

Message #30 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 4 Feb 2015 15:59:38 -0300
You're right Stefan, my bad. I've been working quite a lot in
python.el and somehow mixed versions in the way (I use master at home
but 24.4 at work). The default is now #'ignore and the advise is to
advice eldoc-documentation-function. So feel free to close this.

On Wed, Feb 4, 2015 at 3:43 PM, Carlos Pita <carlosjosepita <at> gmail.com> wrote:
> When I initially reported this bug I was using an early build (post
> 24.4) of master. Now I'm at work with 24.4 and downloaded the latest
> python.el from master just to answer you. But let me build the latest
> master and try again.
>
> On Wed, Feb 4, 2015 at 3:35 PM, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>>> I'm not the expert here, but could it be that there is no previous
>>> value for eldoc-documentation-function?
>>
>> eldoc-documentation-function is defined in eldoc.el as:
>>
>>     (defvar eldoc-documentation-function #'ignore
>>       ...)
>>
>> and eldoc.el is preloaded, so the var should not be nil.
>>
>> Which version of Emacs is that?  Your report seems to say Emacs-24.4,
>> but the add-function call in python.el is new in master, AFAICT.
>> Are you by any chance using the python.el from master with an
>> older Emacs?
>>
>>
>>         Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 19:35:01 GMT) Full text and rfc822 format available.

Message #33 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 04 Feb 2015 14:34:54 -0500
> You're right Stefan, my bad. I've been working quite a lot in
> python.el and somehow mixed versions in the way (I use master at home
> but 24.4 at work). The default is now #'ignore and the advise is to
> advice eldoc-documentation-function. So feel free to close this.

OK, thanks.  I know that Fabián has worked on master's python.el using
an older version of Emacs (at some point in the past at least), so maybe
python.el should be fixed to handle that case (e.g. checking if
eldoc-documentation-function is nil before using `add-function' on it).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 19:49:02 GMT) Full text and rfc822 format available.

Message #36 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19696 <at> debbugs.gnu.org, Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 4 Feb 2015 16:47:46 -0300
> OK, thanks.  I know that Fabián has worked on master's python.el using
> an older version of Emacs (at some point in the past at least), so maybe

Btw, now that we're on that subject. What would you advise to keep
things in sync? Specifically, I want to work on master so I clone it
and add a new online remote, say in gitlab/github/bitbucket, to keep
my local repos (home, work, laptop) in touch. The problem is the repo
is huge, so I make a shallow clone and some cleanup, and this indeed
ameliorates the size issue. The repo passes from huge to just big. But
still, I'm just working on one or two files at the time being... so
eventually I ended up deciding to only pull python.el and avoid the
full repo approach. I don't want to post noisy reports as this one but
it's difficult when you're not a fulltime emacs developer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Wed, 04 Feb 2015 22:39:02 GMT) Full text and rfc822 format available.

Message #39 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Carlos Pita <carlosjosepita <at> gmail.com>, 19696 <at> debbugs.gnu.org,
 Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 04 Feb 2015 19:38:55 -0300
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>
> OK, thanks.  I know that Fabián has worked on master's python.el using
> an older version of Emacs (at some point in the past at least), so maybe
> python.el should be fixed to handle that case (e.g. checking if
> eldoc-documentation-function is nil before using `add-function' on it).
>

I want to keep the master's python.el compatible with Emacs 24 to the
maximum extent possible, to the point that if something doesn't work
with Emacs 24.x, I consider it a bug.  I'll be checking this later on,
but mind you I'm not finding much hacking time lately, so don't hold
your breath.


Cheers,
Fabián





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Thu, 05 Feb 2015 02:48:02 GMT) Full text and rfc822 format available.

Message #42 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
Cc: Carlos Pita <carlosjosepita <at> gmail.com>, 19696 <at> debbugs.gnu.org,
 Fabian Ezequiel Gallina <galli.87 <at> gmail.com>
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Wed, 04 Feb 2015 21:47:55 -0500
> I want to keep the master's python.el compatible with Emacs 24 to the
> maximum extent possible, to the point that if something doesn't work
> with Emacs 24.x, I consider it a bug.  I'll be checking this later on,
> but mind you I'm not finding much hacking time lately, so don't hold
> your breath.

I've just installed a patch which should fix this incompatibility.


        Stefan




bug closed, send any further explanations to 19696 <at> debbugs.gnu.org and Carlos Pita <carlosjosepita <at> gmail.com> Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> debbugs.gnu.org. (Thu, 05 Feb 2015 04:17:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Thu, 05 Feb 2015 09:10:02 GMT) Full text and rfc822 format available.

Message #47 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Carlos Pita <carlosjosepita <at> gmail.com>, 19696 <at> debbugs.gnu.org
Subject: Re: bug#19696: Acknowledgement (24.4;
 python.el: blank line eldoc error)
Date: Thu, 05 Feb 2015 06:09:22 -0300
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> I want to keep the master's python.el compatible with Emacs 24 to the
>> maximum extent possible, to the point that if something doesn't work
>> with Emacs 24.x, I consider it a bug.  I'll be checking this later on,
>> but mind you I'm not finding much hacking time lately, so don't hold
>> your breath.
>
> I've just installed a patch which should fix this incompatibility.
>

Thanks Stefan!





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19696; Package emacs. (Mon, 09 Feb 2015 15:57:02 GMT) Full text and rfc822 format available.

Message #50 received at 19696 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 19696 <at> debbugs.gnu.org
Cc: Fabián Ezequiel Gallina <fgallina <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: python.el: blank line eldoc error
Date: Mon, 9 Feb 2015 12:56:17 -0300
It must have been set instead of setq.




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 Feb 2015 15:58:01 GMT) Full text and rfc822 format available.

Reply sent to fgallina <at> gnu.org (Fabián Ezequiel Gallina):
You have taken responsibility. (Tue, 10 Feb 2015 02:55:02 GMT) Full text and rfc822 format available.

Notification sent to Carlos Pita <carlosjosepita <at> gmail.com>:
bug acknowledged by developer. (Tue, 10 Feb 2015 02:55:02 GMT) Full text and rfc822 format available.

Message #57 received at 19696-done <at> debbugs.gnu.org (full text, mbox):

From: fgallina <at> gnu.org (Fabián Ezequiel Gallina)
To: 19696-done <at> debbugs.gnu.org
Subject: python.el: blank line eldoc error
Date: Mon, 09 Feb 2015 23:54:08 -0300
Fixed at revno 880415a in the master branch.


Cheers,
Fabián.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Mar 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.