help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python.el and imenu


From: Greg Laun
Subject: Re: python.el and imenu
Date: Mon, 30 Jul 2012 09:49:36 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

Hello,

On 07/30/2012 06:28 AM, Yagnesh Raghava Yakkala wrote:
Hello Greg,

Greg Laun <greg.laun@gmail.com> writes:

For me Imenu is working with both emacs-24.1 and with trunk
(emacs-24.2). Notice that 24.2 will come with Fabian's python.el replacing the
old one.
How does one use imenu with the current python.el in emacs24?  When I try M-x
imenu in a python file, I always get the message, "No items suitable for an
index found in this buffer".
when you are in the python buffer, whats the value of
`imenu-create-index-function' (C-h v).

I changed my .emacs file to only contain the lines

(add-hook 'python-mode-hook
  (lambda ()
    (setq imenu-create-index-function 'python-imenu-create-index)))

even though I see that python.el also sets imenu-create-index-function to python-imenu-create-index.

But in a python buffer, (C-h v) gives

imenu-create-index-function is a variable defined in `imenu.el'.
Its value is semantic-create-imenu-index
Local in buffer tmp.py; global value is
imenu-default-create-index-function

So it looks like semantic is mucking things up? The semantic-create-imeu-index function is defined in imenu.el.
I have spent a good part of the day searching the Internet for an answer and
have had no luck.  I have found other people having the same problem
(e.g. 
http://stackoverflow.com/questions/6317667/fabian-gallinas-python-el-imenu-support)
but the solutions there do not work for me.
There is a bug in CEDET's imenu function for python, So if you have semantic
enabled (from CEDET) please turn it off.

My .emacs file is pretty bare, so I'm not sue how semantic could be turned on unless it's on by default. In that case I'm not sure how to turn it off.

Thanks for your reply.


Thanks.,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]