9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] 'euro symbol' special in acme interface?
@ 2002-03-29  5:23 Russ Cox
  2002-03-29 13:07 ` Axel Belinfante
  2002-04-03 13:01 ` [9fans] finding acme window id from shell script? Axel Belinfante
  0 siblings, 2 replies; 4+ messages in thread
From: Russ Cox @ 2002-03-29  5:23 UTC (permalink / raw)
  To: 9fans

> Today I tried to update the coffeelist script I mentioned sometime
> before, such that the 'field name' 'payable' is replaced by the euro
> sign (made using 'compose' e$ ).
> However, when I read that substring from acme, so, when reading from the
> data file after making the selection with a regexp, I seem to get
> the empty string. Making the selection seems to work OK;
> using mouse button 3 on the string I use to make the selection
> (prefixed with a :) works ok.
> Anything obvious that I may have missed?

Wow.  That's quite the shell script.

Try replacing read with sed 1q in your shell
definitions.  You're in uncharted territory.
Read and acme don't get along very well
about reading multibyte UTF sequences.
Acme currently assumes that it doesn't have to deal
with programs that read from data 1 byte at a time,
like read does.

Russ


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

* Re: [9fans] 'euro symbol' special in acme interface?
  2002-03-29  5:23 [9fans] 'euro symbol' special in acme interface? Russ Cox
@ 2002-03-29 13:07 ` Axel Belinfante
  2002-04-03 13:01 ` [9fans] finding acme window id from shell script? Axel Belinfante
  1 sibling, 0 replies; 4+ messages in thread
From: Axel Belinfante @ 2002-03-29 13:07 UTC (permalink / raw)
  To: 9fans

> > Today I tried to update the coffeelist script I mentioned sometime
> > before, such that the 'field name' 'payable' is replaced by the euro
> > sign (made using 'compose' e$ ).
[...]

> Wow.  That's quite the shell script.

I hope it can be made more simple. Keep in mind it's my first attempt
at programming acme from rc :-) (having no experience with the acme
interface, doing the same in C seemed even more scary to me). The hope
was that it might be used as an example, to built upon... (oh well :-)

> Try replacing read with sed 1q in your shell definitions.  
[...]

Last night I played with it at home, and when it was obvious that
the selection was made correctly, I looked at the reading part,
tried cat and then sed 1q and it worked.
Thanks for the hint, and for explaining the problem!

Axel.





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

* [9fans] finding acme window id from shell script?
  2002-03-29  5:23 [9fans] 'euro symbol' special in acme interface? Russ Cox
  2002-03-29 13:07 ` Axel Belinfante
@ 2002-04-03 13:01 ` Axel Belinfante
  1 sibling, 0 replies; 4+ messages in thread
From: Axel Belinfante @ 2002-04-03 13:01 UTC (permalink / raw)
  To: 9fans

Another question about programming acme from rc:
Can a shell script (or other program) find
out from which acme window it was invoked
(other than looking for a 'known' filename
 in/mnt/acme/index)?

In the manual I only found acme's ID command,
which I cannot use from within the shell script
(or is there a way?), and reading the ctl file,
but I assume that refers to e.g. /mnt/acme/<nr>/ctl
and to read that I already need to know <nr>.
Currently I just look for a 'fixed' filename in
/mnt/acme/index, which works ok; I'm just wondering
whether there is a more 'direct' way.

Thanks,
Axel.



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

* [9fans] 'euro symbol' special in acme interface?
@ 2002-03-28 18:27 Axel Belinfante
  0 siblings, 0 replies; 4+ messages in thread
From: Axel Belinfante @ 2002-03-28 18:27 UTC (permalink / raw)
  To: 9fans

Today I tried to update the coffeelist script I mentioned sometime
before, such that the 'field name' 'payable' is replaced by the euro
sign (made using 'compose' e$ ).
However, when I read that substring from acme, so, when reading from the
data file after making the selection with a regexp, I seem to get
the empty string. Making the selection seems to work OK;
using mouse button 3 on the string I use to make the selection
(prefixed with a :) works ok.
Anything obvious that I may have missed?

Axel.



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

end of thread, other threads:[~2002-04-03 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-29  5:23 [9fans] 'euro symbol' special in acme interface? Russ Cox
2002-03-29 13:07 ` Axel Belinfante
2002-04-03 13:01 ` [9fans] finding acme window id from shell script? Axel Belinfante
  -- strict thread matches above, loose matches on Subject: below --
2002-03-28 18:27 [9fans] 'euro symbol' special in acme interface? Axel Belinfante

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).