bugvile, a vi-compatible text editor - Bugs: bug #19817, Trouble with 'suf' REs in setting...

 
 

bug #19817: Trouble with 'suf' REs in setting majormodes

Submitted by:  None
Submitted on:  Mon 07 May 2007 06:56:33 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 08 May 2007 02:18:33 PM UTC, comment #4:

Ah, that is it. Not a bug. Well, actually, the meaning of 'suf' seems to have changed in 9.4f. Using the new mode-* directives as shown below work fine. Please close.

Adam Denton <adenton>
Tue 08 May 2007 12:06:34 AM UTC, comment #3:

Reading more - since I started by assuming I was looking for a bug in regular expressions - one of the changes since 9.4 was this item from 9.4f:
split up the majormode "suffixes" into suffixes, mode-filename and mode-pathname

I think that may be the cause of confusion. A suffix has to match beginning with the first "." in the filename; the mode-filename and mode-pathname are used to handle other cases such as "tags".

So tagsmode in 9.5 is done with this:

mode-filename '^tags$'

I'm puzzled by the vilemode issue. This is what I have in modes.rc:

mode-pathname '\(vile./.rc\)$'
mode-filename '^\(\.\?vile.*rc\)$'
suffixes '\.\(exrc\|vile\)$'

Thomas Dickey <dickey>
Project Administrator
Mon 07 May 2007 11:41:46 PM UTC, comment #2:

I'm not seeing this behavior - I built/installed 9.5p
on my Debian/testing, and when running "vile tags",
get a properly colored file. To check if there was
something in my .vilerc which is fixing it, I ran
"vile -I" to just point to the vileinit.rc file

There might be something in your .vilerc file which
is interfering with 9.5p's behavior (guessing). Or
some system dependency such as locale setting (I tried
en_US, en_US.UTF-8 without seeing a difference). But
the .vilerc sounds like the place to look, since I did
make fixes/improvements in quoting and expression
evaluation which could have affected compatibility...

Thomas Dickey <dickey>
Project Administrator
Mon 07 May 2007 07:49:12 PM UTC, comment #1:

Further info -- my .vilerc contains: (among lots more :) )
set tagword
set tagrelative
set tags "tags ../tags ../../tags ../../../tags"

Adam Denton <adenton>
Mon 07 May 2007 06:56:33 PM UTC, original submission:

On linux, configured with
./configure --with-builtin-filters="c perl sh tags"

************
***1) 9.5p does not set tagsmode
Make a real tags file named "tags" somewhere; cd there. Type "vile tags".
Does not set tagsmode. I type /.../vile-9.4/vile (previous production vile built identically) and it works fine. Odd:
Even if I set the line in filters.rc to
suf 'tags$'
and rename the file to e.g. xxxtags it will not work.
If I rename the file to tags.S it will set asmode.

************
***2) 9.5p has trouble with REs in "suf" in .vilerc (related to above?)

My filters.rc is located in $HOME/.vile/filters.rc
If I do “vile $HOME/.vile/filters.rc” I will NOT
get vilemode EVEN if I set the line to
suf “s.rc$”
(note leading ‘s’ before the dot)

Instead I get shmode, but if I disable shmode
(i.e. by commenting out its pre and suf lines)
then I get no majormode (i.e. it’s not related to
ordering, or the “before” mechanism).

It WILL work if I remove the leading ‘s’ i.e.
suf “.rc$”
The following also works
suf “.[r][c]$’

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dickey (Posted a comment)
  • -unavailable- added by adenton (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 09 May 2007 12:08:38 AM UTCdickeyStatusNone=>Works For Me
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1