Re: strange config problem (1.2.5i)

2001-05-07 Thread Sam Roberts

Quoting Arnaud S . Launay [EMAIL PROTECTED], who wrote:
 Le Sun, May 06, 2001 at 03:08:11PM -0500, Tim Legant a écrit:
 [snip]
   seems like a problem with \ and # parsing...
  
  Nope, it's working the way it should. Comments are stripped first. This
  is true of just about every programming / configuration language in the
  world. I say just about because someone will probably point to one
  that doesn't work this way, but it would be the odd exception.
 
 Yes, I see what you mean. As I was saying by mail to someone
 else, it's the difference between the logical computer language
 and human thought :)
 
 Anyway, and just for debate, what do you think of the following:
 
 # this line is a comment \
 but what is this one ?
 
 is 2nd line a comment as there is the \ indicating the parsing
 continue on next line, or is it not, as everything beyond the #
 will be treated as comment and so not analysed ?
 
 in the case of mutt, the comment continue til the next blank
 line, but I'm not sure every soft acts in the same way...

No, not till the next blank line. # comments go to the end of line.
A \ before an end-of-line makes it not be an end of line. So, it
goes to the next one (that's not escaped). It's the same in C and C++:

[sroberts]$ cat eol.c
int main()
{
  // a comment \
printf(hello world);
return 0;
}
[sroberts]$ make eol
cc eol.c   -o eol
[sroberts]$ ./eol
[sroberts]$ 

-- 
Sam Roberts [EMAIL PROTECTED]



strange config problem (1.2.5i)

2001-05-06 Thread Arnaud S . Launay

Hello,

I want to have something like that:

mailboxes ! \
+amazon \
#+announces \
+arrivees

in order to add/and delete viewing folders, with them classified
by alpha order.

problem is, parsing mailboxes stops after amazon, so arrivees
isn't shown.

seems like a problem with \ and # parsing...

any workaround (other than putting every # folders at the end of
the list, of course) or bug correction ?

Arnaud.
-- 
BOFH excuse:
The monitor needs another box of pixels.



Re: strange config problem (1.2.5i)

2001-05-06 Thread Lawrence Mitchell

* On [010506 15:22] Arnaud S . Launay [EMAIL PROTECTED] wrote:
 Hello,
 
 I want to have something like that:
 
 mailboxes ! \
 +amazon \
 #+announces \
 +arrivees
 
 seems like a problem with \ and # parsing...
The problem being that '#' is the symbol for a comment in your muttrc, and so
the rest of the line ins't parsed at all. Unless you mean you don't want to
specify the +announces box on purpose, if so, i'm confused
Lawrence



Re: strange config problem (1.2.5i)

2001-05-06 Thread Tim Legant

On Sun, May 06, 2001 at 03:19:16PM +0200, Arnaud S . Launay wrote:
 I want to have something like that:
 
 mailboxes ! \
 +amazon \
 #+announces \
 +arrivees
 
 in order to add/and delete viewing folders, with them classified
 by alpha order.
 
 problem is, parsing mailboxes stops after amazon, so arrivees
 isn't shown.

Well, '#' is a comment through the end of the line. You've commented off
your line-continuation character ( \ ) and therefore, as far as the
parser is concerned, +amazon is the last entry on the line.

 seems like a problem with \ and # parsing...

Nope, it's working the way it should. Comments are stripped first. This
is true of just about every programming / configuration language in the
world. I say just about because someone will probably point to one
that doesn't work this way, but it would be the odd exception.

 any workaround (other than putting every # folders at the end of
 the list, of course) or bug correction ?

Try

mailboxes +amazon
#mailboxes +announces
mailboxes +arrivees

Tim



Re: strange config problem (1.2.5i)

2001-05-06 Thread Arnaud S . Launay

Le Sun, May 06, 2001 at 03:08:11PM -0500, Tim Legant a écrit:
[snip]
  seems like a problem with \ and # parsing...
 
 Nope, it's working the way it should. Comments are stripped first. This
 is true of just about every programming / configuration language in the
 world. I say just about because someone will probably point to one
 that doesn't work this way, but it would be the odd exception.

Yes, I see what you mean. As I was saying by mail to someone
else, it's the difference between the logical computer language
and human thought :)

Anyway, and just for debate, what do you think of the following:

# this line is a comment \
but what is this one ?

is 2nd line a comment as there is the \ indicating the parsing
continue on next line, or is it not, as everything beyond the #
will be treated as comment and so not analysed ?

in the case of mutt, the comment continue til the next blank
line, but I'm not sure every soft acts in the same way...

  any workaround (other than putting every # folders at the end of
  the list, of course) or bug correction ?
 
 Try
 
 mailboxes +amazon
 #mailboxes +announces
 mailboxes +arrivees

Did it right. Many, many thanks.

Arnaud.
-- 
BOFH excuse:
Police are examining all internet packets in the search for a narco-net-traficer



Re: strange config problem (1.2.5i)

2001-05-06 Thread David Champion

On 2001.05.06, in [EMAIL PROTECTED],
Tim Legant [EMAIL PROTECTED] wrote:
 
 Nope, it's working the way it should. Comments are stripped first. This
 is true of just about every programming / configuration language in the
 world. I say just about because someone will probably point to one
 that doesn't work this way, but it would be the odd exception.

Well, I'm all set up to look silly for mentioning it, but

Sh doesn't work this way, for example, and I figure that this general
syntax of using line termination, '#' comment markers, and '\' line
continuations is *nominally* based upon -- or at least popular because
of -- sh's model.  In such a syntax, there are three ways of dealing
with the relationship of comments to line continuations, and I don't
really think there's a strong balance toward a single one of them among
all syntaxes in the world.

You can parse comment delimiters before line continuation (like sh), or
line continuation before comments (like mutt), or you can offer a
hybrid where comments end with an EOL *or* a line continutation marker,
which is what Arnaud Launay expected.  The hybrid is also what I, as a
programmer, usually choose, since it seems to be the most flexible.

I don't think it would be silly to ask about changing the order in
which mutt parses these.  I'd certainly vote for a change.  But it
would perhaps mess with too many people's configuration files, so I'm
not sure it's worth it.

I just want to disagree that this behavior is somehow naturally
correct. :)

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago