18 Mar 15:21
acme-sac: analysis osx :., idiom problem
From: Axel Belinfante <Axel.Belinfante@...>
Subject: acme-sac: analysis osx :., idiom problem
Newsgroups: gmane.os.inferno.general
Date: 2008-03-18 14:26:04 GMT
Subject: acme-sac: analysis osx :., idiom problem
Newsgroups: gmane.os.inferno.general
Date: 2008-03-18 14:26:04 GMT
(ok, analysis is probably wrong wording. anyway.) I looked at the problems I had with :, and :., on acme-sac os-x. one of the things that happens with single-click b3 actions is that the selection is expanded, using character classes allowed for file name part, regular expression, or address part. to my surprise there is a difference in the list of characters allowed by isaddrc (in regx.b) in inferno acme compared with corresponding isaddrc in plan9/p9p acme (in addr.c). p9p and plan9 allow: 0123456789+-/$.#,; inferno/acme-sac allow: 0123456789+-/$.# to me this explains why acme-sac refuses to match :, but I don't understand why/how it does/could work on other platforms - but I did not take the time to look at what happens there. I added ,; to the list of characters allowed. that makes the :, idiom work. Furthermore there is some interesting interplay with the plumber that on acme-sac osx seems to match more than the plan9/p9p plumber do. I saw that since the :, problem was mentioned already some changes have been made to the acme-sac plumbing rules. I took the latest acme-sac plumber rule file as base, and on :., I no longer get acme opening a new window showing non-existent file /usr/axel/whatever/:., When I click to the right of the whole :., I get the correct behaviour; when I click on :., with single click between : and . then the expression get handed over to the plumber by acme sac, and the plumber matches :., as directory, I guess, so the cursor moves to the already open pane for that directory. (did not try this without pane open for that directory) mac osx weirdness? could : be a separator in mac os x file names? It seems the following acme-sac plumber rule matches for :., : # existing directories go to acme kind is text data matches '[a-zA-Z¡-0-9_./\-]+' data isdir $0 data set $dir [etc] I inserted a ^ in the pattern in the 'data matches', as in data matches '^[a-zA-Z¡-0-9_./\-]+' and then the :., idiom works as expected. No idea what the insertion of ^ might break. with these two changes (,; inserted in list of isaddrc chars, and ^ inserted in pattern that match directories) things seem to work for me. (find wood, knockQuestion not studied in detail: why does current code work on the other platforms? Axel.

Question not studied in detail:
why does current code work on the other platforms?
Axel.
RSS Feed