An Emacs mode for editing Python code

How to customize python-mode from menus

Asked by Glenn Linderman on 2012-04-09

Trying to upgrade from python-mode 6.0.2 to 6.0.5, and had some problems.

As a debugging / problem isolation technique, it was suggested that my problem might be related to some indexing issue, and that I should customize py-imenu-create-index-p to nil should avoid this anyway.

I have no clue how to do this. I tried the menus, but after reaching: Options / Customize Emacs / Programming / Languages / Python ... I couldn't guess where to go next, nor even if I had gone to the right place thus far.

It was also suggested to turn off outline mode via customize py-outline-minor-mode-p nil

This was also not obvious to be reachable via the above Customize Emacs menu.

There is the possibility that that the word "customize" was intended to convey some information other than the "Customize Emacs" menu, but if so, it is not clear what.

I see a number of other menus appear after loading python-mode that didn't appear in the prior version I used, so clearly things are much different than before. I've only glanced at these menus so far, figuring that new versions would/should work the same as old versions, but better, until such time as I learn about and turn on more options. This may have been a bad assumption.

Question information

Language:
English Edit question
Status:
Answered
For:
python-mode.el Edit question
Assignee:
No assignee Edit question
Last query:
2012-04-10
Last reply:
2012-04-10
Andreas Roehler (a-roehler) said : #1

in Emacs menu "Options", "Customize Emacs" appears, displaying "Specific Option..."

writing "py-imenu-create-index-p" resp. "py-imenu-cre" TAB directs you to the place

Beside menu PyTools displays an entry "Customize Python mode"

See also for example M-y customize-variable RET py-imenu-create-index-p

Glenn Linderman (v+python) said : #2

When I attempted to use the specific option feature, I got no completions for partial typing, and after typing the whole thing and hitting entry, I got a [no match] error....

I speculated perhaps it was because python-mode was not yet loaded, although it is not clear to me, then, how to set the settings to debug things that happen during the first load of python-mode.

I opened a .py file (triggering the errors I'd been having), and tried the specific option feature again, with the same result... well almost:

py-imenu- TAB produces py-imenu-show-method-args-p which sort of implies the other one isn't there at all.

Opening a different .py file that doesn't produce the error at load still doesn't find a Specific Option of py-imenu-create-index-p

Andreas Roehler (a-roehler) said : #3

Am 10.04.2012 05:55, schrieb Glenn Linderman:
> Question #193107 on python-mode.el changed:
> https://answers.launchpad.net/python-mode/+question/193107
>
> Status: Answered => Open
>
> Glenn Linderman is still having a problem:
> When I attempted to use the specific option feature, I got no
> completions for partial typing, and after typing the whole thing and
> hitting entry, I got a [no match] error....
>
> I speculated perhaps it was because python-mode was not yet loaded,

TAB-completion of symbols is not Python-mode specific

> although it is not clear to me, then, how to set the settings to debug
> things that happen during the first load of python-mode.
>

M-x customize-variable RET debug-on-error

here it is set to "always"

> I opened a .py file (triggering the errors I'd been having),

please make reports for them

and tried
> the specific option feature again, with the same result... well almost:
>
> py-imenu- TAB produces py-imenu-show-method-args-p which sort of
> implies the other one isn't there at all.
>
> Opening a different .py file that doesn't produce the error at load
> still doesn't find a Specific Option of py-imenu-create-index-p
>

have a look into INSTALL how to get python-mode.el loaded every time

Glenn Linderman (v+python) said : #4

I added the lines in install to my .emacs, it still didn't enable setting the specific option of py-imenu-create-index-p

Andreas Roehler (a-roehler) said : #5

Am 10.04.2012 08:01, schrieb Glenn Linderman:
> Question #193107 on python-mode.el changed:
> https://answers.launchpad.net/python-mode/+question/193107
>
> Status: Answered => Open
>
> Glenn Linderman is still having a problem:
> I added the lines in install to my .emacs, it still didn't enable
> setting the specific option of py-imenu-create-index-p
>

What does M-x describe-variable py-imenu-create-index-p RET

say?

Glenn Linderman (v+python) said : #6

[no match]

Andreas Roehler (a-roehler) said : #7

oh, my bad, sorry. That variable was introduced after release.

Please try the current trunk, should building the index should create difficulties.

Can you help with this problem?

Provide an answer of your own, or ask Glenn Linderman for more information if necessary.

To post a message you must log in.