Idiom for shelling out to $EDITOR/$PAGER?

Ben Finney ben+python at benfinney.id.au
Fri Dec 23 07:06:03 EST 2011


Cameron Simpson <cs at zip.com.au> writes:

> On 23Dec2011 17:12, Ben Finney <ben+python at benfinney.id.au> wrote:
> | That doesn't address the concern Tim raised: did the user actually do
> | anything, did the file change?
>
> I'm not sure it matters.

I know of numerous applications where it matters, spcifically ones which
decide what to do with the edited text. Including “submit a bug report”
and “submit a wiki page edit” and “send an email message”.

> Sure. But still, if you're able to act on a changed file, why not also
> act on an unchanged file? The user asked to change things; take what
> you got back and proceed!

If the buffer was not edited, the user has most likely changed their
mind about editing at all, and there are many applications where the
correct default action differes depending on whether the user actually
changed anything in the text.

-- 
 \      “By instructing students how to learn, unlearn, and relearn, a |
  `\         powerful new dimension can be added to education.” —Alvin |
_o__)                                    Toffler, _Future Shock_, 1970 |
Ben Finney



More information about the Python-list mailing list