9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] ls
@ 2002-11-11 16:33 rog
  2002-11-11 17:13 ` Dan Cross
  0 siblings, 1 reply; 4+ messages in thread
From: rog @ 2002-11-11 16:33 UTC (permalink / raw)
  To: 9fans

> we went back and forth on this topic and eventually
> settled on quoting by default because it was just too nice.

acme mail should probably do the same thing when
generating "cp" commands for message components.

the fix is just:
		Bprint(w->body, "\tcp %s%sbody%s %q\n", rootdir, name, ext(m->type), dest);

in /acme/mail/src/mesg.c:/^mimedisplay

and, in /acme/mail/src/mail.c:

int isrcspecial(int c)
{
	char *s;
	for (s = "`^#*[]=|\\?${}()'<>&;"; *s; s++)
		if (*s == c)
			return 1;
	return 0;
}

in threadmain():

	doquote = isrcspecial;
	quotefmtinstall();



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ls
  2002-11-11 16:33 [9fans] ls rog
@ 2002-11-11 17:13 ` Dan Cross
  2002-11-11 17:17   ` Dan Cross
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Cross @ 2002-11-11 17:13 UTC (permalink / raw)
  To: 9fans

> and, in /acme/mail/src/mail.c:
>
> int isrcspecial(int c)
> {
> 	char *s;
> 	for (s = "`^#*[]=|\\?${}()'<>&;"; *s; s++)
> 		if (*s == c)
> 			return 1;
> 	return 0;
> }

Yuck.  I feel compelled to ask again: can we please put this in a
library?

	- Dan C.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ls
  2002-11-11 17:13 ` Dan Cross
@ 2002-11-11 17:17   ` Dan Cross
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Cross @ 2002-11-11 17:17 UTC (permalink / raw)
  To: 9fans

Oh, man.  I hate it when I post something about a thing that just got
changed.  Russ, you're simply too quick for me.

	- Dan C.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] ls
@ 2002-11-11 17:15 Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2002-11-11 17:15 UTC (permalink / raw)
  To: 9fans

cross@math.psu.edu:
> This seems like a generally useful thing (that is, quoting on all of
> the above characters), and indeed when I wrote walk I was somewhat
> dismayed that I had to pull something that seemed so basic and
> universal out of another program.  Even then I wasn't sure that I got
> the entire list right, and indeed, I didn't.  Any chance of putting the
> obvious lsquote() like function in libc?

It's now in the library as needsrcquote.  Ls has been updated
(and fixed! it wasn't getting \ (er, \\) right.)

rog@vitanuova.com:
>> we went back and forth on this topic and eventually
>> settled on quoting by default because it was just too nice.
>
> acme mail should probably do the same thing when
> generating "cp" commands for message components.

Acme Mail has also been updated.

Russ



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-11 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11 16:33 [9fans] ls rog
2002-11-11 17:13 ` Dan Cross
2002-11-11 17:17   ` Dan Cross
2002-11-11 17:15 Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).