all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* problem: M-a M-e gives symbol's function definition is voide
@ 2017-02-22 19:50 Krishnakant
  2017-02-22 20:14 ` John Mastro
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-22 19:50 UTC (permalink / raw)
  To: help-gnu-emacs

Dear all,

I am really confused as to what might have happened in this case.

I open a file in python-mode

there is lot of code in it.

now when I try doing M-a or M-e to move back and forth between function 
or class definition, I get the said error mentioned in the subject.

I use emacs 24.5 on Ubuntu 16.04 LTS and I have elpy with company-mode 
enabled.

Can some one tell me what must be going wrong here?

I actually can't use any navigation function in python-mode because I 
get the same error "symbol's function definition is voide ..." for any 
shortcut I press.

of course M-C-i works with company so I know other things are going correct.

Indentation also works correctly.

But it is very important for me to move between blocs of code (one of 
the major reasons I have shifted to emacs ).

Happy hacking.

Krishnakant.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-22 19:50 problem: M-a M-e gives symbol's function definition is voide Krishnakant
@ 2017-02-22 20:14 ` John Mastro
  2017-02-23  5:00   ` Krishnakant
  2017-02-23  4:33 ` Robert Thorpe
  2017-02-27 13:53 ` hector
  2 siblings, 1 reply; 10+ messages in thread
From: John Mastro @ 2017-02-22 20:14 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: Krishnakant

Krishnakant <krmane@openmailbox.org> wrote:
> I am really confused as to what might have happened in this case.
>
> I open a file in python-mode
>
> there is lot of code in it.
>
> now when I try doing M-a or M-e to move back and forth between
> function or class definition, I get the said error mentioned in the
> subject.

Please check the *Messages* buffer and see if there is anything more to
the error message. Specifically, I would expect it to say which symbol's
function definition is void (example below).

> I use emacs 24.5 on Ubuntu 16.04 LTS and I have elpy with company-mode
> enabled.
>
> Can some one tell me what must be going wrong here?
>
> I actually can't use any navigation function in python-mode because I
> get the same error "symbol's function definition is voide ..." for any
> shortcut I press.

Something is attempting to call a function that doesn't exist. You can
manufacture a similar situation with something like:

(defun broken-command ()
  (interactive)
  (no-such-function))

(global-set-key (kbd "<f12>") #'broken-command)

After evaluating those forms, if I type f12, I get the error:

broken-command: Symbol’s function definition is void: no-such-function

Because there's no such function as no-such-function ;-)

> of course M-C-i works with company so I know other things are going
> correct.
>
> Indentation also works correctly.
>
> But it is very important for me to move between blocs of code (one of
> the major reasons I have shifted to emacs ).

Once we know what the relevant symbol, this will likely be fairly easy
to track down and fix.

        John



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-22 19:50 problem: M-a M-e gives symbol's function definition is voide Krishnakant
  2017-02-22 20:14 ` John Mastro
@ 2017-02-23  4:33 ` Robert Thorpe
  2017-02-27  4:21   ` Krishnakant
  2017-02-27 13:53 ` hector
  2 siblings, 1 reply; 10+ messages in thread
From: Robert Thorpe @ 2017-02-23  4:33 UTC (permalink / raw)
  To: Krishnakant; +Cc: help-gnu-emacs

Krishnakant <krmane@openmailbox.org> writes:

> I actually can't use any navigation function in python-mode because I 
> get the same error "symbol's function definition is voide ..." for any 
> shortcut I press.

There are two possibilities I can think off.  Firstly, your versions of
python-mode and Emacs are incompatible.  Secondly, something in your
config is interferring with python mode.

I suggest starting an uncustomized Emacs using "emacs -Q" then see if
the problem still occurs.  If it doesn't then bisect your init file.

BR,
Robert Thorpe




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-22 20:14 ` John Mastro
@ 2017-02-23  5:00   ` Krishnakant
  2017-02-23  5:05     ` Krishnakant
  2017-02-23 18:41     ` John Mastro
  0 siblings, 2 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-23  5:00 UTC (permalink / raw)
  To: John Mastro, help-gnu-emacs@gnu.org



On Thursday 23 February 2017 01:44 AM, John Mastro wrote:
> Krishnakant <krmane@openmailbox.org> wrote:
>> I am really confused as to what might have happened in this case.
>>
>> I open a file in python-mode
>>
>> there is lot of code in it.
>>
>> now when I try doing M-a or M-e to move back and forth between
>> function or class definition, I get the said error mentioned in the
>> subject.
> Please check the *Messages* buffer and see if there is anything more to
> the error message. Specifically, I would expect it to say which symbol's
> function definition is void (example below).
>
>> I use emacs 24.5 on Ubuntu 16.04 LTS and I have elpy with company-mode
>> enabled.
>>
>> Can some one tell me what must be going wrong here?
>>
>> I actually can't use any navigation function in python-mode because I
>> get the same error "symbol's function definition is voide ..." for any
>> shortcut I press.
> Something is attempting to call a function that doesn't exist. You can
> manufacture a similar situation with something like:
>
> (defun broken-command ()
>    (interactive)
>    (no-such-function))
>
> (global-set-key (kbd "<f12>") #'broken-command)
>
> After evaluating those forms, if I type f12, I get the error:
>
> broken-command: Symbol’s function definition is void: no-such-function
>
> Because there's no such function as no-such-function ;-)
>
>> of course M-C-i works with company so I know other things are going
>> correct.
>>
>> Indentation also works correctly.
>>
>> But it is very important for me to move between blocs of code (one of
>> the major reasons I have shifted to emacs ).
> Once we know what the relevant symbol, this will likely be fairly easy
> to track down and fix.
>
Here's the message from the buffer.
Symbol's function definition is void: beginning-of-python-def-or-class
Can you suggest what could this be?
I also tryed running emacs -Q for bare bones setting and this still happens.
Happy hacking.
Krishnakant.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-23  5:00   ` Krishnakant
@ 2017-02-23  5:05     ` Krishnakant
  2017-02-23 18:41     ` John Mastro
  1 sibling, 0 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-23  5:05 UTC (permalink / raw)
  To: John Mastro, help-gnu-emacs@gnu.org



On Thursday 23 February 2017 10:30 AM, Krishnakant wrote:
>
>
> On Thursday 23 February 2017 01:44 AM, John Mastro wrote:
>> Krishnakant <krmane@openmailbox.org> wrote:
>>> I am really confused as to what might have happened in this case.
>>>
>>> I open a file in python-mode
>>>
>>> there is lot of code in it.
>>>
>>> now when I try doing M-a or M-e to move back and forth between
>>> function or class definition, I get the said error mentioned in the
>>> subject.
>> Please check the *Messages* buffer and see if there is anything more to
>> the error message. Specifically, I would expect it to say which symbol's
>> function definition is void (example below).
>>
>>> I use emacs 24.5 on Ubuntu 16.04 LTS and I have elpy with company-mode
>>> enabled.
>>>
>>> Can some one tell me what must be going wrong here?
>>>
>>> I actually can't use any navigation function in python-mode because I
>>> get the same error "symbol's function definition is voide ..." for any
>>> shortcut I press.
>> Something is attempting to call a function that doesn't exist. You can
>> manufacture a similar situation with something like:
>>
>> (defun broken-command ()
>>    (interactive)
>>    (no-such-function))
>>
>> (global-set-key (kbd "<f12>") #'broken-command)
>>
>> After evaluating those forms, if I type f12, I get the error:
>>
>> broken-command: Symbol’s function definition is void: no-such-function
>>
>> Because there's no such function as no-such-function ;-)
>>
>>> of course M-C-i works with company so I know other things are going
>>> correct.
>>>
>>> Indentation also works correctly.
>>>
>>> But it is very important for me to move between blocs of code (one of
>>> the major reasons I have shifted to emacs ).
>> Once we know what the relevant symbol, this will likely be fairly easy
>> to track down and fix.
>>
> Here's the message from the buffer.
> Symbol's function definition is void: beginning-of-python-def-or-class
> Can you suggest what could this be?
> I also tryed running emacs -Q for bare bones setting and this still 
> happens.

Sorry here's the complete message buffer output.
Can't guess python-indent-offset, using defaults: 4
ad-handle-definition: `ibuffer-interactive-filter-by-mode' got redefined
ad-handle-definition: `ibuffer-toggle-filter-group' got redefined
ad-handle-definition: `ibuffer-forward-filter-group' got redefined
ad-handle-definition: `ibuffer-backward-filter-group' got redefined
ad-handle-definition: `ibuffer-do-shell-command-pipe' got redefined
ad-handle-definition: `ibuffer-do-shell-command-pipe-replace' got redefined
ad-handle-definition: `ibuffer-do-shell-command-file' got redefined
ad-handle-definition: `ibuffer-do-rename-uniquely' got redefined
ad-handle-definition: `ibuffer-do-replace-regexp' got redefined
ad-handle-definition: `ibuffer-filters-to-filter-group' got redefined
ad-handle-definition: `ibuffer-set-filter-groups-by-mode' got redefined
ad-handle-definition: `ibuffer-pop-filter-group' got redefined
ad-handle-definition: `ibuffer-clear-filter-groups' got redefined
ad-handle-definition: `ibuffer-jump-to-filter-group' got redefined
ad-handle-definition: `ibuffer-kill-filter-group' got redefined
ad-handle-definition: `ibuffer-yank-filter-group' got redefined
ad-handle-definition: `ibuffer-filter-disable' got redefined
ad-handle-definition: `ibuffer-filter-by-mode' got redefined
ad-handle-definition: `ibuffer-filter-by-used-mode' got redefined
ad-handle-definition: `ibuffer-filter-by-name' got redefined
ad-handle-definition: `ibuffer-filter-by-filename' got redefined
ad-handle-definition: `ibuffer-filter-by-size-gt' got redefined
ad-handle-definition: `ibuffer-filter-by-size-lt' got redefined
ad-handle-definition: `ibuffer-filter-by-content' got redefined
ad-handle-definition: `ibuffer-filter-by-predicate' got redefined
ad-handle-definition: `ibuffer-toggle-sorting-mode' got redefined
ad-handle-definition: `ibuffer-invert-sorting' got redefined
ad-handle-definition: `ibuffer-do-sort-by-major-mode' got redefined
ad-handle-definition: `ibuffer-do-sort-by-alphabetic' got redefined
ad-handle-definition: `ibuffer-do-sort-by-size' got redefined
ad-handle-definition: `ibuffer-bs-show' got redefined
ad-handle-definition: `ibuffer-add-to-tmp-hide' got redefined
ad-handle-definition: `ibuffer-add-to-tmp-show' got redefined
ad-handle-definition: `ibuffer-forward-next-marked' got redefined
ad-handle-definition: `ibuffer-backwards-next-marked' got redefined
ad-handle-definition: `ibuffer-do-kill-lines' got redefined
ad-handle-definition: `ibuffer-jump-to-buffer' got redefined
ad-handle-definition: `ibuffer-diff-with-file' got redefined
ad-handle-definition: `ibuffer-copy-filename-as-kill' got redefined
ad-handle-definition: `ibuffer-mark-by-name-regexp' got redefined
ad-handle-definition: `ibuffer-mark-by-mode-regexp' got redefined
ad-handle-definition: `ibuffer-mark-by-file-name-regexp' got redefined
ad-handle-definition: `ibuffer-mark-by-mode' got redefined
ad-handle-definition: `ibuffer-mark-modified-buffers' got redefined
ad-handle-definition: `ibuffer-mark-unsaved-buffers' got redefined
ad-handle-definition: `ibuffer-mark-dissociated-buffers' got redefined
ad-handle-definition: `ibuffer-mark-help-buffers' got redefined
ad-handle-definition: `ibuffer-mark-compressed-file-buffers' got redefined
ad-handle-definition: `ibuffer-mark-old-buffers' got redefined
ad-handle-definition: `ibuffer-mark-special-buffers' got redefined
ad-handle-definition: `ibuffer-mark-read-only-buffers' got redefined
ad-handle-definition: `ibuffer-mark-dired-buffers' got redefined
Symbol's function definition is void: beginning-of-python-def-or-class


Happy hacking.
Krishnakant.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-23  5:00   ` Krishnakant
  2017-02-23  5:05     ` Krishnakant
@ 2017-02-23 18:41     ` John Mastro
  2017-02-27  4:19       ` Krishnakant
  1 sibling, 1 reply; 10+ messages in thread
From: John Mastro @ 2017-02-23 18:41 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: Krishnakant

Krishnakant <krmane@openmailbox.org> wrote:
> Here's the message from the buffer. Symbol's function definition is
> void: beginning-of-python-def-or-class Can you suggest what could this
> be? I also tryed running emacs -Q for bare bones setting and this
> still happens. Happy hacking. Krishnakant.

The function beginning-of-python-def-or-class isn't part of the
python-mode that's included with Emacs. It's part of a separate Python
mode that IIUC is, or at least was, distributed with Python. I've always
used the one that's included with Emacs so I don't know much about it.

Are you intentionally using the alternative python-mode, or is it
entering into this picture unexpectedly?

Also, please try typing `C-h k M-a' (or, equivalently, M-x describe-key
RET M-a) and report back what command it says M-a is bound to.

Trying to think this through, what confuses me is that the command bound
to e.g. M-a must be trying to call beginning-of-python-def-or-class, but
you've said it still happens in emacs -Q. It could be that the
alternative python-mode is being loaded even in emacs -Q (and binds its
own M-a), but in that case we would expect
beginning-of-python-def-or-class to be available.

If you're not intentionally using the alternative python-mode, perhaps
try running something like this in your shell:

    $ cd ~/.emacs.d
    $ grep beginning-of-python-def-or-class **/*.el

That may tell us where that symbol is coming from. Except, since this
also happens in emacs -Q, you may also need to check in other locations
on your load-path, which will depend on your system.

On a Debian-like system, I think this would cover everything in a
typical configuration, but I'm not at one to check:

    $ cd /usr/local/share/emacs
    $ grep beginning-of-python-def-or-class **/*.el

Hope that helps

        John



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-23 18:41     ` John Mastro
@ 2017-02-27  4:19       ` Krishnakant
  0 siblings, 0 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-27  4:19 UTC (permalink / raw)
  To: John Mastro, help-gnu-emacs@gnu.org



On Friday 24 February 2017 12:11 AM, John Mastro wrote:
> Krishnakant <krmane@openmailbox.org> wrote:
>> Here's the message from the buffer. Symbol's function definition is
>> void: beginning-of-python-def-or-class Can you suggest what could this
>> be? I also tryed running emacs -Q for bare bones setting and this
>> still happens. Happy hacking. Krishnakant.
> The function beginning-of-python-def-or-class isn't part of the
> python-mode that's included with Emacs. It's part of a separate Python
> mode that IIUC is, or at least was, distributed with Python. I've always
> used the one that's included with Emacs so I don't know much about it.
>
> Are you intentionally using the alternative python-mode, or is it
> entering into this picture unexpectedly?
I haven't done any thing intentionaly.
I had done a sudo apt-get install python-mode expecting that I needed 
that for my Python work.
I then removed it using sudo apt-get remove, thinking that the version 
installed by Ubuntu might be causing the problem.
I now asume that the default python-mode must have taken over, but still 
same result.
I don't intend to use the alternative Python mode.
By the way here is the output of C-h k  for the diagnose.
M-a runs the command beginning-of-python-def-or-class, which is an alias 
for `beginning-of-python-def-or-class',
which is not defined.  Please make a bug report.

> Also, please try typing `C-h k M-a' (or, equivalently, M-x describe-key
> RET M-a) and report back what command it says M-a is bound to.
>
> Trying to think this through, what confuses me is that the command bound
> to e.g. M-a must be trying to call beginning-of-python-def-or-class, but
> you've said it still happens in emacs -Q. It could be that the
> alternative python-mode is being loaded even in emacs -Q (and binds its
> own M-a), but in that case we would expect
> beginning-of-python-def-or-class to be available.
>
> If you're not intentionally using the alternative python-mode, perhaps
> try running something like this in your shell:
>
>      $ cd ~/.emacs.d
>      $ grep beginning-of-python-def-or-class **/*.el
>
> That may tell us where that symbol is coming from. Except, since this
> also happens in emacs -Q, you may also need to check in other locations
> on your load-path, which will depend on your system.
>
> On a Debian-like system, I think this would cover everything in a
> typical configuration, but I'm not at one to check:
>
>      $ cd /usr/local/share/emacs
>      $ grep beginning-of-python-def-or-class **/*.el
>
Thanks for your help John, I was on a similar line of thought and your 
advice made it even more confirmed.  Surprisingly though, grep returns 
blank.  No result.
I don't understand what must be going on.
Happy hacking.
Krishnakant.

But surprisingly the



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-23  4:33 ` Robert Thorpe
@ 2017-02-27  4:21   ` Krishnakant
  0 siblings, 0 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-27  4:21 UTC (permalink / raw)
  To: Robert Thorpe; +Cc: help-gnu-emacs



On Thursday 23 February 2017 10:03 AM, Robert Thorpe wrote:
> Krishnakant <krmane@openmailbox.org> writes:
>
>> I actually can't use any navigation function in python-mode because I
>> get the same error "symbol's function definition is voide ..." for any
>> shortcut I press.
> There are two possibilities I can think off.  Firstly, your versions of
> python-mode and Emacs are incompatible.  Secondly, something in your
> config is interferring with python mode.
>
> I suggest starting an uncustomized Emacs using "emacs -Q" then see if
> the problem still occurs.  If it doesn't then bisect your init file.
>
> BR,
> Robert Thorpe
> Hi Robert,
I had done sudo apt-get install python-mode on Ubuntu 16.04 thinking 
that it would have been of some help.
But I removed it afterwards realizing that it does not work properly.
Can that be one factor?
Happy hacking.
Krishnakant.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-22 19:50 problem: M-a M-e gives symbol's function definition is voide Krishnakant
  2017-02-22 20:14 ` John Mastro
  2017-02-23  4:33 ` Robert Thorpe
@ 2017-02-27 13:53 ` hector
  2017-02-27 15:37   ` Krishnakant
  2 siblings, 1 reply; 10+ messages in thread
From: hector @ 2017-02-27 13:53 UTC (permalink / raw)
  To: Krishnakant; +Cc: help-gnu-emacs

In my system "beginning-of-python-def-or-class" is defined in python-mode.el
which belongs to package python-mode.

The key binding for this function in my system is not M-a but C-M-a.
My version of python-mode is 5.1.0.

Another hint could be given by running the command

find /usr/share/emacs* -name 'python*'

In my system I get the lines:

/usr/share/emacs/site-lisp/python-mode/python-mode.el
/usr/share/emacs23/site-lisp/python-mode/python-mode.elc

So you can see if everything is properly installed.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: problem: M-a M-e gives symbol's function definition is voide
  2017-02-27 13:53 ` hector
@ 2017-02-27 15:37   ` Krishnakant
  0 siblings, 0 replies; 10+ messages in thread
From: Krishnakant @ 2017-02-27 15:37 UTC (permalink / raw)
  To: hector; +Cc: help-gnu-emacs


Thanks a million.

The C-M-a and C-M-a works good.

Wonder why I got wrong key combinations in help.

By the way is there some kind of keyboard shortcut which can help me go 
to the place where a variable was first defined?

For example if I have a variable called varName and I use it at several 
locations.  Now if I see it somewhere and can't remember where it was 
defined, I could just put my point on it and press the key combination 
and go to the line where it is first used/ defined.

I looked up the help but could not get it in C-h m.

Happy hacking.

Krishnakant.




On Monday 27 February 2017 07:23 PM, hector wrote:
> In my system "beginning-of-python-def-or-class" is defined in python-mode.el
> which belongs to package python-mode.
>
> The key binding for this function in my system is not M-a but C-M-a.
> My version of python-mode is 5.1.0.
>
> Another hint could be given by running the command
>
> find /usr/share/emacs* -name 'python*'
>
> In my system I get the lines:
>
> /usr/share/emacs/site-lisp/python-mode/python-mode.el
> /usr/share/emacs23/site-lisp/python-mode/python-mode.elc
>
> So you can see if everything is properly installed.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-27 15:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22 19:50 problem: M-a M-e gives symbol's function definition is voide Krishnakant
2017-02-22 20:14 ` John Mastro
2017-02-23  5:00   ` Krishnakant
2017-02-23  5:05     ` Krishnakant
2017-02-23 18:41     ` John Mastro
2017-02-27  4:19       ` Krishnakant
2017-02-23  4:33 ` Robert Thorpe
2017-02-27  4:21   ` Krishnakant
2017-02-27 13:53 ` hector
2017-02-27 15:37   ` Krishnakant

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.