Re: obsolete RPM tags highlighting

2006-07-15 Thread Leonard den Ottolander
Hello Jindrich,

On Fri, 2006-07-14 at 19:52 +0200, Jindrich Novy wrote:
 On Fri, 2006-07-14 at 15:33 +0200, Leonard den Ottolander wrote:
  \{Gg\}\{Rr\}\{Oo\}\{Uu\}\{Pp\}

 This is a joke, isn't it?
 
 Just imagine a nice spec like this:
 
 SuMmArY: Programs for backing up and restoring ext2/ext3 filesystems
 nAMe: dump
 veRSioN: 0.4b41

I agree it looks odd but it's valid syntax :-) .

 At least the first capital letter should be mandatory upper-case

Although I don't really mind that we put some restrictions on the user
as to what capitalization is being highlighted I disagree with this. All
lowercase tags should be highlighted imo. Using all lowercase is rather
consistent and I encounter an occasional spec file that does this. And
why should we allow the decapitalization of the a in BuildArch but not
the B?

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-15 Thread Jindrich Novy
Hi Leonard,

On Sat, 2006-07-15 at 13:11 +0200, Leonard den Ottolander wrote:
 And
 why should we allow the decapitalization of the a in BuildArch but not
 the B?

Because buildArch or buildPreReq in spec looks just wrong? ;-)

Jindrich

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-15 Thread Leonard den Ottolander
Hi Jindrich,

On Sat, 2006-07-15 at 17:35 +0200, Jindrich Novy wrote:
 Because buildArch or buildPreReq in spec looks just wrong? ;-)

As you might have guessed I was actually referring to buildarch and
buildprereq. But I guess that if I prefer all lowercase tags to be
highlighted I need to propose a patch here.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-14 Thread Jindrich Novy
Hi Andy,

On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote:
 Jindrich Novy пишет:
 My $0.02 to specfile highliting.
 The mc shipped with FC4 doesn't handle correctly the case-insensivity
 tags. For example, BuildArch and Buildarch are highliting differently,
 but rpm recognize both.
 I guess the mainstream also has this issue.

Here's the patch to fix it. Thanks for pointing this out.

Jindrich
--- mc/syntax/spec.syntax.case	2006-07-13 13:59:28.0 +0200
+++ mc/syntax/spec.syntax	2006-07-13 17:02:41.0 +0200
@@ -2,19 +2,19 @@
 keyword whole Auto\{Pp\}rov: green
 keyword whole Auto\{Rr\}eq\{Pp\}rov: green
 keyword whole Auto\{Rr\}eq: green
-keyword whole BuildArch: green
-keyword whole BuildPre\{Rr\}eq: green
+keyword whole Build\{Aa\}rch: green
+keyword whole Build\{Pp\}re\{Rr\}eq: green
 keyword whole Build\{Rr\}oot: green
-keyword whole BuildRequires: green
+keyword whole Build\{Rr\}equires: green
 keyword whole Conflicts: green
 keyword whole Copyright: white
 keyword whole Description: green
 keyword whole Distribution: green
 keyword whole Doc\{Dd\}ir: green
 keyword whole Epoch: green
-keyword whole ExcludeArch: green
-keyword whole ExclusiveArch: green
-keyword whole ExclusiveOS: green
+keyword whole Exclude\{Aa\}rch: green
+keyword whole Exclusive\{Aa\}rch: green
+keyword whole Exclusive\{Oo\}\{Ss\}: green
 keyword whole Group: green
 keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]): green
 keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\]): green
@@ -38,8 +38,7 @@
 keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\].\[ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890\]): green
 keyword whole Vendor: green
 keyword whole Version: green
-keyword whole URL: green
-keyword whole Url: green
+keyword whole U\{Rr\}\{Ll\}: green
 
 keyword whole linestart %build red
 keyword whole linestart %changelog red
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-14 Thread Pavel Tsekov

On Fri, 14 Jul 2006, Jindrich Novy wrote:


Hi Andy,

On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote:

Jindrich Novy ??:
My $0.02 to specfile highliting.
The mc shipped with FC4 doesn't handle correctly the case-insensivity
tags. For example, BuildArch and Buildarch are highliting differently,
but rpm recognize both.
I guess the mainstream also has this issue.


Here's the patch to fix it. Thanks for pointing this out.


Commited.

Thanks!
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-14 Thread Andy Shevchenko
Jindrich Novy пишет:
My $0.02 to specfile highliting.
The mc shipped with FC4 doesn't handle correctly the case-insensivity 
tags. For example, BuildArch and Buildarch are highliting differently, 
but rpm recognize both.
I guess the mainstream also has this issue.

-- 
With best regards,
Andy Shevchenko.  mailto: [EMAIL PROTECTED]


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-14 Thread Jindrich Novy
Hi,

On Fri, 2006-07-14 at 15:33 +0200, Leonard den Ottolander wrote:
 Hi,
 
 On Fri, 2006-07-14 at 09:24 +0200, Jindrich Novy wrote:
  On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote:
   Jindrich Novy пишет:
   My $0.02 to specfile highliting.
   The mc shipped with FC4 doesn't handle correctly the case-insensivity
   tags. For example, BuildArch and Buildarch are highliting differently,
   but rpm recognize both.
 
  Here's the patch to fix it. Thanks for pointing this out.
 
 Andy's examples were just that: Examples. A complete patch should allow
 any mixing of case for any spec keyword. For _example_:
 
 \{Gg\}\{Rr\}\{Oo\}\{Uu\}\{Pp\}

 Just fixing and committing a few arbitrary examples does not makes much
 sense imo.

This is a joke, isn't it?

Just imagine a nice spec like this:

SuMmArY: Programs for backing up and restoring ext2/ext3 filesystems
nAMe: dump
veRSioN: 0.4b41

I really think that the highlighting rules for spec should be limited to
some set of commonly used tags. At least the first capital letter should
be mandatory upper-case and some case sensitivity fix-ups should be made
for tags composed from multiple words as Andy pointed out. Otherwise
specs written using mcedit would be a big mess IMO.

Jindrich

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-13 Thread Jindrich Novy
On Thu, 2006-07-13 at 14:08 +0200, Jindrich Novy wrote:
 Hi mc-devel,
 
 attaching a simple patch that highlights obsolete RPM tags with white
 color so that it helps the spec file editor to be better aware of the
 fact they are obsolete for several years and shouldn't be used.


The patch was in the reversed order, attaching the correct one...

Jindrich
--- mc/syntax/spec.syntax.obsolete	2006-06-21 17:22:55.0 +0200
+++ mc/syntax/spec.syntax	2006-07-13 13:59:28.0 +0200
@@ -7,7 +7,7 @@
 keyword whole Build\{Rr\}oot: green
 keyword whole BuildRequires: green
 keyword whole Conflicts: green
-keyword whole Copyright: green
+keyword whole Copyright: white
 keyword whole Description: green
 keyword whole Distribution: green
 keyword whole Doc\{Dd\}ir: green
@@ -30,6 +30,7 @@
 keyword whole Release: green
 keyword whole Requires: green
 keyword whole Root: green
+keyword whole Serial: white
 keyword whole Source\[0123456789\]: green
 keyword whole Summary: green
 keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]): green
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-13 Thread Pavel Tsekov
On Thu, 13 Jul 2006, Jindrich Novy wrote:

 attaching a simple patch that highlights obsolete RPM tags with white
 color so that it helps the spec file editor to be better aware of the
 fact they are obsolete for several years and shouldn't be used.


 The patch was in the reversed order, attaching the correct one...

Commited.

P.S. what happend to your patch which changed the location of the 
configuration files to /etc ? Would you mind modifying it as suggested ?

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-13 Thread Jindrich Novy
Hi Andy,

On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote:
 Jindrich Novy пишет:
 My $0.02 to specfile highliting.
 The mc shipped with FC4 doesn't handle correctly the case-insensivity
 tags. For example, BuildArch and Buildarch are highliting differently,
 but rpm recognize both.
 I guess the mainstream also has this issue.

Yes, I noticed that and it also needs to be fixed. I'm going to write a
patch for it as well.

Jindrich

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: obsolete RPM tags highlighting

2006-07-13 Thread Jindrich Novy
Hi Pavel,

On Thu, 2006-07-13 at 17:33 +0300, Pavel Tsekov wrote:
 On Thu, 13 Jul 2006, Jindrich Novy wrote:
 
  attaching a simple patch that highlights obsolete RPM tags with white
  color so that it helps the spec file editor to be better aware of the
  fact they are obsolete for several years and shouldn't be used.
 
 
  The patch was in the reversed order, attaching the correct one...
 
 Commited.

Thanks.

 P.S. what happend to your patch which changed the location of the 
 configuration files to /etc ? Would you mind modifying it as suggested ?

Ah, almost forgot about that one. I need to reread the thread again so
that I can modify the patch.

Jindrich

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel