An Emacs mode for editing Python code

show-trailing-whitespace t has no effect in python mode

Reported by Neilen Marais on 2012-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Undecided
Unassigned

Bug Description

I'm using python-mode 6.0.12 from a bzr tag with emacs 23 as packaged by Ubuntu 12.04. I have the following in my emac.d:

(add-hook 'python-mode-hook
   '(lambda () (setq show-trailing-whitespace t)) t)

This should result in blaring red highligted trailing whitespace. Instead, no trailing whitespace seems to be highlighted.

Neilen Marais (neilenmarais) wrote :
Changed in python-mode:
milestone: none → 6.1.0
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium

Am 25.10.2012 10:04, schrieb Neilen Marais:
> Public bug reported:
>
> I'm using python-mode 6.0.12 from a bzr tag with emacs 23 as packaged by
> Ubuntu 12.04. I have the following in my emac.d:
>
> (add-hook 'python-mode-hook
> '(lambda () (setq show-trailing-whitespace t)) t)
>
> This should result in blaring red highligted trailing whitespace.
> Instead, no trailing whitespace seems to be highlighted.

that way it works for me

   (add-hook 'python-mode-hook
    (lambda () (setq show-trailing-whitespace t)))

Changed in python-mode:
status: New → Incomplete
Neilen Marais (neilenmarais) wrote :

Hi,

In the meantime I upgraded to emacs24 and the newest bzr revision of http://bazaar.launchpad.net/~python-mode-devs/python-mode/python-mode/. I also changed my add-hook call to be the same as in comment 2.

In the end, I isolated it down to an (old I guess) saved emacs customization:

'(py-python-command-args (quote ("-i --colors LightBG")) t)

which seems to break the initialization of the python-mode, resulting in the hooks not getting called. After removing that is seems to be OK. Could perhaps have used more detailed error feedback, but does not seem to be a problem with python-mode per se.

Changed in python-mode:
status: Incomplete → Invalid

Am 08.11.2012 14:14, schrieb Neilen Marais:
> Hi,
>
> In the meantime I upgraded to emacs24 and the newest bzr revision of
> http://bazaar.launchpad.net/~python-mode-devs/python-mode/python-mode/.
> I also changed my add-hook call to be the same as in comment 2.
>
> In the end, I isolated it down to an (old I guess) saved emacs
> customization:
>
> '(py-python-command-args (quote ("-i --colors LightBG")) t)
>
> which seems to break the initialization of the python-mode, resulting in
> the hooks not getting called. After removing that is seems to be OK.
> Could perhaps have used more detailed error feedback, but does not seem
> to be a problem with python-mode per se.
>

thanks, it's here now: lp:1076893
>

Changed in python-mode:
importance: Medium → Undecided
assignee: Andreas Roehler (a-roehler) → nobody
milestone: 6.1.0 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers