* python.el and imenu
@ 2012-07-30 3:26 Greg Laun
2012-07-30 10:28 ` Yagnesh Raghava Yakkala
0 siblings, 1 reply; 5+ messages in thread
From: Greg Laun @ 2012-07-30 3:26 UTC (permalink / raw
To: help-gnu-emacs
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".
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.
I tried using a blank .emacs file and still get the same errors, so it
doesn't seem like my configuration.
Anybody know how this is supposed to work?
Thanks!
Greg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: python.el and imenu
2012-07-30 3:26 python.el and imenu Greg Laun
@ 2012-07-30 10:28 ` Yagnesh Raghava Yakkala
2012-07-30 13:49 ` Greg Laun
0 siblings, 1 reply; 5+ messages in thread
From: Yagnesh Raghava Yakkala @ 2012-07-30 10:28 UTC (permalink / raw
To: Greg Laun; +Cc: help-gnu-emacs
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 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.
Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: python.el and imenu
2012-07-30 10:28 ` Yagnesh Raghava Yakkala
@ 2012-07-30 13:49 ` Greg Laun
0 siblings, 0 replies; 5+ messages in thread
From: Greg Laun @ 2012-07-30 13:49 UTC (permalink / raw
To: Yagnesh Raghava Yakkala; +Cc: help-gnu-emacs
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.,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: python.el and imenu
[not found] <mailman.5953.1343629267.855.help-gnu-emacs@gnu.org>
@ 2012-08-04 11:04 ` Matthias Meulien
0 siblings, 0 replies; 5+ messages in thread
From: Matthias Meulien @ 2012-08-04 11:04 UTC (permalink / raw
To: help-gnu-emacs
> How does one use imenu with the current python.el in emacs24? (...)
> Anybody know how this is supposed to work?
Have you enabled the new parser features?
The following seems to work with GNU Emacs 24.1.1:
(semantic-mode 1)
(add-hook 'python-mode-hook
'(lambda ()
(define-key python-mode-map "\C-ci" 'imenu)))
--
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: python.el and imenu
@ 2012-08-04 16:20 Dan Maftei
0 siblings, 0 replies; 5+ messages in thread
From: Dan Maftei @ 2012-08-04 16:20 UTC (permalink / raw
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 440 bytes --]
>
>
> ---------- Forwarded message ----------
> From: Matthias Meulien <m.meulien@free.fr>
> To: help-gnu-emacs@gnu.org
> Cc:
> Date: Sat, 04 Aug 2012 13:04:26 +0200
> Subject: Re: python.el and imenu
> > How does one use imenu with the current python.el in emacs24? (...)
> > Anybody know how this is supposed to work?
>
>
For me, M-x imenu works out of the box with GNU's python.el in emacs 24.
What precisely isn't working for you?
Dan
[-- Attachment #2: Type: text/html, Size: 768 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-04 16:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30 3:26 python.el and imenu Greg Laun
2012-07-30 10:28 ` Yagnesh Raghava Yakkala
2012-07-30 13:49 ` Greg Laun
[not found] <mailman.5953.1343629267.855.help-gnu-emacs@gnu.org>
2012-08-04 11:04 ` Matthias Meulien
-- strict thread matches above, loose matches on Subject: below --
2012-08-04 16:20 Dan Maftei
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.