nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Color patch


From: David Lawrence Ramsey
Subject: Re: [Nano-devel] Color patch
Date: Sat, 13 Sep 2003 18:42:33 -0700 (PDT)

--- address@hidden wrote:

<snip>

>I don't understand what you mean by 'Specifying the commands in the
>files', I don't want to add a 'set tabsize 8' comment to every file in
>the nano-1.2.2 directory. It would be quicker and easier to add 'for
>"~/nano-1.2.2/" ; set tabsize 8" to ~/.nanorc.

Okay; I have it now.  Having the commands in the files is what vi does,
and works best for individual files, but you want to have the commands
in the nanorc in a way that would work best for groups of files.  I just
got a bit confused over what your goal was here.

>The code would simply test the first character of the filename, if '/'
>it would compare to each of the FOR patterns. Otherwise it would
>prepend `pwd` and then do the comparisons. It would probably be better
>if the asterisk wasn't used and the code could detect the trailing '/'
>and would only compare the first N characters of the filename, where N
>is the length of the pattern.

You could just pass the specified path, minus any asterisk, through
get_full_path().  If the result ends in a '/', it's a directory, in
which case you need only run get_full_path() on the name of any file you
load and use strncmp() to find out whether the file is in the specified
path.  If the result doesn't end in a '/', it's a file, in which case
you can use strcmp() to find out whether a file you load is the one you
specified.

>The only problem I see is with multibuffers, does each buffer have its
>own settings such as tabsize or do all buffers share settings?

As it is now, all buffers share settings such as tabsize and the like.

<snip>

>I didn't think about syntaxes with no extensions, they should be
>allowed. My next patch will handle them.

Okay.

<snip>

>The nanorc file was for CVS, my patch was not. Sorry about that.

No problem.

<snip>

>I'm not sure what you're talking about but --displaysyntax would
>shutdown nano before loading files. It parses the nanorc files,
>displays each syntax and terminates.

I know; I've tried it.  It's just a bit cleaner to use a flag in that
case instead of a global variable.  In any case, it works the same way.

>> - I converted the C++-style comments to C-style comments.
>
>Oops, four of those comments shouldn't be in the patch and I forgot to
>finish the TODO comment.
>
>> The ported version is attached.  If possible, would you make patches
>> against the unstable CVS from now on?  Thanks.
>
>I will make patches against 1.2.2 and CVS.

Okay.  However, since your patch adds new features and 1.2.x is the
current stable version (i.e, it's in a feature freeze), it most likely
won't get into 1.2.x.

>Does savannah generate nightly CVS tarballs? I'm behind a proxy and
>can't access CVS via pserver, gserver or https. I would rather not
>download each file manually through viewcvs. :)

Not as far as I know, unfortunately.  Anyone else have an idea on how to
deal with this?

In other news, I've finished porting the parts of DB's patch that relate
to display_string(), except for the parts that use it to display
filenames (since adding them apparently requires some extensive changes
to files.c which would make nanodbdisplay.patch too huge to be dealt
with properly) and all but the most basic needed changes to the search
functions (the refactoring changes to them look all right at first
glance, but seeing as (a) the search code is known to be delicate, (b)
I'd need time to test those changes to make absolutely sure they didn't
break anything that works now, and (c) for the same reason as stated
above, I'm not putting them in at this time).  Most of the changes are
relatively easily understandable refactoring of the involved input
functions and/or cosmetic changes such as comparing regexec()'s return
value to REG_NOMATCH instead of using !regexec().  It's working well
after the testing I've done on it, so after some more testing and my
writing changelog entries for it, I'm committing it next, after which
I'll get to studying your color code overhaul in detail.  Sorry for the
delay in doing so.

http://pooka_regent.tripod.com/patches/nano/nanodbdisplay-patch.txt


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]