Underscore syntax class

Bug #940812 reported by Andreas Roehler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

Am 25.02.2012 01:55, schrieb Jason Addison:
> New question #188792 on python-mode.el:
> https://answers.launchpad.net/python-mode/+question/188792
>
> Please include the patch provided by Ian Zimmerman as an attachment to the last entry in this thread:
>
> http://python.6.n6.nabble.com/Underscore-syntax-class-td2012292.html
>
> that allows python-mode to work like everything else in emacs wrt underscores.
>
> The cognitive dissonance resulting from this inconsistency puts a debilitating load on my limited mental faculties. Also, I find the traditional emacs behavior very convenient and efficient.
>
> Please please please include this.
>
> Thanks for all of your work to provide this mode. I use it every day.
>
> Jason
>
>

Changed in python-mode:
importance: Undecided → Medium
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.6
status: New → Triaged
Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi,

thanks for the request.

Will make this customizable.

Remains the question of default syntax.

The advantage of word-syntax is, common forward-word etc. travel the whole Python identifier.
OTOH the experienced user might switch that too, leaving the newbie without surprise at this point.

Let's see, if some comments come in....

Andreas

Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 940812] Re: Underscore syntax class

On Feb 25, 2012, at 07:40 AM, Andreas Roehler wrote:

>thanks for the request.
>
>Will make this customizable.
>
>Remains the question of default syntax.
>
>The advantage of word-syntax is, common forward-word etc. travel the whole Python identifier.
>OTOH the experienced user might switch that too, leaving the newbie without surprise at this point.
>
>Let's see, if some comments come in....

Well, you knew I would comment on it!

This subject comes up every so often and the problem is that long time users
of the mode will be very unhappy if you change the defaults.

I strongly oppose changing the default, but I have no problem with making it
conditional. (Strictly speaking, it already is since any Emacs user can
change the default by adding a little bit of lisp.) What you may need to do
is fix some internal routines that expect the default behavior when the syntax
change is made.

Revision history for this message
Jason Addison (jraddison) wrote :

Thanks for considering making this an option.

Yes, a user could try to figure out how to modify the mode and make their own changes. Speaking for myself, I use emacs and python-mode every day, and I never would have taken on this task myself. On occasion, I'd open up python-mode.el and see what it might require. I could tell that it wasn't going to be a 1 or 2 line edit. When I found the Ian's patch I applied it by hand against a later version on one of the machines I work on. So far, it is working great. It may just be a little bit of lisp code for a mode developer, but the diff is over 150 lines and makes 13 changes. I doubt I could have figured this out on my own in a reasonable amount of time. Also, as python-mode continues to evolve, the patch may get stale and be difficult to apply correctly.

I am all for leaving the default, but I can't think of many things that would make me happier (such a sad life I lead ... I know) than providing this as a built-in option.

Changed in python-mode:
status: Triaged → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.