Feature Proposal: Avoid a common error

Motivation

The escape for a % sign in macro expansion is $percnt

I don't know about the rest of you, but as a native English speaker, and someone who prides themselves on good spelling, I hate $percnt with a passion. The arbitrariness of the missing second vowel seems inexplicable to me. You could call it quirky; I call it bl**dy annoying. I have been caught out by this soooo many times, and have seen other people regularly fall into the same trap.

Without trying to work out why it is so (and only one person can answer that, and almost certainly won't) I'd like to propose changing:
    $text =~ s/\$percnt(\(\))?/\%/gos; # expand percent
to
    $text =~ s/\$perce?nt(\(\))?/\%/gos; # expand percnt and percent
in Foswiki::expandStandardEscapes, to allow for this common gotcha.

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: CrawfordCurrie - 25 Feb 2010

Discussion

+1

-- KennethLavrsen - 25 Feb 2010

Overdue smile

Are the docs going to be updated to recommend $percent, or left as they are?

-- AndrewJones - 25 Feb 2010

weird & frustrating, I seriously thought Will (N) have already done this several months ago frown, sad smile

loooooong overdue.

-- SvenDowideit - 25 Feb 2010

nope, it wasn't me, though i also support this proposal (even if it does have a terrible title ;-p)

-- WillNorris - 25 Feb 2010

My gut feel is that no-one is going to veto this simple proposal, so I'm going to mark it "ConsensusReached", raise a task and "just do it". We can always revert if necessary.

-- CrawfordCurrie - 26 Feb 2010

The 14-days are not over Crawford. It is quite OK to check and be ready to revert. But it is not OK to remove the proposal from the 14-day rule queue. People need to have a chance to see it and this requires that the proposal is listed in the 14-day rule queue.

People may not look at the changed topics in all webs on a daily basis. We could be travelling or have family visits. We need a chance to see the proposals and react. When you put it in Accepted and concensus reached it disappears from the radar screen and that is not fair to the rest of us. Please stick to the rules Mr Chairman.

But yes, you will probably not get any reactions against. Then again. I thought your ENCODE improvement would be a no-brainer proposal also.

I have put everything back in UnderInvestigation and No decision. Please keep it like this until 11st of March.

-- KennethLavrsen - 28 Feb 2010

See my comments in SimplifyTheFeatureProposalProcess.

-- CrawfordCurrie - 01 Mar 2010

It was pure chance that I saw the proposal by looking at WebChanges. I do not always do that. I just check the 14-day queue a couple of times per week. I never saw this proposal while it was in the 14-day queue. You need to give the community a chance to see the proposals. I have given a longer answer in SimplifyTheFeatureProposalProcess.

-- KennethLavrsen - 01 Mar 2010

+1

But, can't we come up with a better escape method than writing out symbols in English form?

-- MartinCleaver - 09 Mar 2010

And "quot" is not a word, either.

-- MartinCleaver - 09 Mar 2010

We cannot change $quot to $quote because someone might have written $quoterror report$quot. percnt can be repaired because the change it is in the middle of the token.

-- ArthurClemens - 09 Mar 2010

Accepted by 14-day rule.

I have changed the title summary to be more accurate.

-- KennethLavrsen - 11 Mar 2010
Topic revision: r15 - 06 Dec 2010, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy