[Asterisk-Users] Priority usage: absolute sequential vs. sequential

John Todd jtodd at loligo.com
Sun Apr 6 17:56:02 MST 2003


I already use macros to simplify, but at some point you are reduced 
to using priorities.

It seems inelegant to rely on my editor or a post-processor to handle 
things that are easily handled just by trivially changing the way 
that the parser works.

JT


>  > In vim,
>Yuck!
>
>>  > Then, when I wanted to insert something between 10 and 20, I would
>>  > simply call it "15" and it would Just Work
>I work on an AS/400 they have a couple of utilities that use this - and
>after an insertion (when you save) it re-numbers the list. Anyway I would
>argue against this because most priorities (I expect) are one digit, thus
>more typing would be required.
>
>In any case, you would probably be better off writing a bash script so a
>repeated or reduced priority would get (previous+1) to parse the file or a
>macro for your favorite editor.
>
>exten => s,2,1
>exten => s,2,a
>exten => s,2,b
>exten => s,3,2
>becomes
>exten => s,2,1
>exten => s,3,a
>exten => s,4,b
>exten => s,5,2
>
>You might want to look at using macros to simplify maintenance (take a look
>at the 'hunt' thread also.  I expect to finish up soon).
>
>John



More information about the asterisk-users mailing list