Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17797

Re: Idiom for shelling out to $EDITOR/$PAGER?

Date 2011-12-23 06:28 -0600
From Tim Chase <python.list@tim.thechases.com>
Subject Re: Idiom for shelling out to $EDITOR/$PAGER?
References <877h1nn7ej.fsf@benfinney.id.au> <mailman.4018.1324621939.27778.python-list@python.org> <87wr9nlcgk.fsf@benfinney.id.au>
Newsgroups comp.lang.python
Message-ID <mailman.4028.1324643312.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 12/23/11 06:06, Ben Finney wrote:
> Cameron Simpson<cs@zip.com.au>  writes:
>> On 23Dec2011 17:12, Ben Finney<ben+python@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”.
>
> 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.

Yes, Ben's understanding is correct here, that for some of my 
use-cases, it's helpful to know if the user did anything.  The 
application can then decide whether it should use the original 
data it passed to the function, or whether it should go some 
"abort what you're doing" route.

-tkc

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Idiom for shelling out to $EDITOR/$PAGER? Cameron Simpson <cs@zip.com.au> - 2011-12-23 17:02 +1100
  Re: Idiom for shelling out to $EDITOR/$PAGER? Ben Finney <ben+python@benfinney.id.au> - 2011-12-23 17:12 +1100
    Re: Idiom for shelling out to $EDITOR/$PAGER? Cameron Simpson <cs@zip.com.au> - 2011-12-23 17:32 +1100
      Re: Idiom for shelling out to $EDITOR/$PAGER? Ben Finney <ben+python@benfinney.id.au> - 2011-12-23 23:06 +1100
        Re: Idiom for shelling out to $EDITOR/$PAGER? Tim Chase <python.list@tim.thechases.com> - 2011-12-23 06:28 -0600
  Re: Idiom for shelling out to $EDITOR/$PAGER? Owen Jacobson <angrybaldguy@gmail.com> - 2011-12-23 21:41 -0500

csiph-web