py-point looks like it should use save-excursion

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

Bug Description

subject says all -- otherwise point will not be restored in case of errors

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 914972] [NEW] py-point looks like it should use save-excursion

Am 11.01.2012 20:30, schrieb Georg Brandl:
> Public bug reported:
>
> subject says all -- otherwise point will not be restored in case of
> errors
>

Hi Georg,

reads reasonable. Do you have a case for this?

Basically no function employed inside should cause an error. If it does,
it's wrongly used, which should be fixed.

Andreas

Revision history for this message
Georg Brandl (gbrandl) wrote :

Well, exceptions are called that because they can occur in exceptional cases :)

To turn the question around, is there any argument against using the safe way
using save-excursion?

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 914972] Re: py-point looks like it should use save-excursion

Am 11.01.2012 21:50, schrieb Georg Brandl:
> Well, exceptions are called that because they can occur in exceptional
> cases :)
>

yes, but it pertains to errors in Python, which should no cause errors
in Lisp.

> To turn the question around, is there any argument against using the safe way
> using save-excursion?
>

The only argument against seems the fact it worked for that many years
without failure.

Experience tells from other cases, abstract reasoning may overlook
something, so I tend not to change unless some compelling argument is
delivered.

Anyway, if you like to change, let's see how it comes out.
Maybe we gain something not mentioned yet?

Andreas

Changed in python-mode:
importance: Undecided → Medium
milestone: none → 6.0.5
assignee: nobody → Andreas Roehler (a-roehler)
status: New → In Progress
Changed in python-mode:
status: In Progress → 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

Remote bug watches

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