RE: dogfood feedback -- Smart Quotes


Subject: RE: dogfood feedback -- Smart Quotes
From: Paul Rohr (paul@abisource.com)
Date: Thu Feb 22 2001 - 19:45:18 CST


At 05:19 PM 2/22/01 -0800, WJCarpenter wrote:
>((Executive summary: I think the solution is at hand. Paul, would
>you do a bugzilla if you haven't already?))

Cool. How many bugs do you want filed? :-)

>paul> 1. Type a closing double-quote at the end of a phrase.
>paul> ------------------------------------------------------- (Ditto
>paul> for paired single-quotes.) Change the matching open quote
>paul> first, then the closing one, globbed together as a user-atomic
>paul> change. Even with the existing undo mechanism, the IP should
>paul> already wind up in the right place.
>
>In fact, doing it this way would break the UNDO paradigm. The
>sequence that typically happened was
>
> 1. type a quote character
> 2. type another character
> 3. opening smart quote promotion, if appropriate
> 4. type some more characters
> 5. type a quote character
> 6. type another character
> 7. closing smart quote promotion, if appropriate
>
>Obviously, the UNDO sequence must be at least the visible reverse of
>that.

Oh. I guessed (wrongly) that you promoted both the quotes at once, and was
describing a way to "jump back" and make both changes in a way that wouldn't
screw up the IP.

Sounds like you've got a more localized state machine than I'd envisioned.
(It'll be interesting to see how you handle some of the screw cases with
abandoned edits, but that's another story.)

Sorry I didn't read your code before posting.

>It's not that you're missing something ... it's that your explanation
>has "too many notes". We can collapse all of those cases and just say
>that when smart quote stuff creates the aggregated UNDO blob, it not
>only does the delete/insert of the old and new quote, but it also does
>a delete/insert of the character following the replaced quote (and
>does all that in an order such that the UNDO machinery does the
>insertion point stuff that we've been talking about).
>
>With this re-statement, the code is localized, works for a general
>case instead of a special case, and is something I wish I had thought
>of back in August 2000.

Cool. Then it *was* easy. :-)

>There are some boundary cases for when there is a structural boundary
>(heh, heh, boundary cases ... I kill me! :-) after the quote instead
>of a character, but they can surely be worked through. (Other than
>that, it might have simply been a matter of deleting/inserting 2
>characters instead of one in
>src/text/fmt/xp/fl_DocLayout.cpp:FL_DocLayout::considerSmartQuoteCandidateA
t().)

ROTFL :-)

>You have missed my point and wandered off. I agree 100% that UNDO
>should work seamlessly with smart quotes. My point was that, even so,
>a huge number of users won't ever think of that, and so perhaps a
>different *additional* mechanism is needed anyhow.

Yep. We agree. Any additional smart quote widgetry wouldn't remove the
need for an Undo fix.

I'm still not fully appreciating your perceived need for that extra stuff,
but I don't tend to use smart quotes often enough to be the one to convince.
I'll defer to folks who use the feature more.

Paul



This archive was generated by hypermail 2b25 : Thu Feb 22 2001 - 19:37:40 CST