I think you can go way simpler. The following filter works as a comment toggle:
|sed 's@^//@@;tq;s@^@//@;:q' Shove that in your tag line; M1 highlight the block you want to (un)comment; and finally M2 highlight the filter line in the tag. Done. Alternatively, save the command as a script in $home/bin/rc/whatever #!/bin/rc sed 's@^//@@;tq;s@^@//@;:q' Then |whatever in the tag line serves the same purpose. > I've now put the script basically all over the place, including explicitly in > /bin itself. Namespaces are your friend, by the way. Better to save in a private directory and bind -a over /bin or wherever. This is how /bin is populated. Your $home/lib/profile binds $home/bin/rc into /bin, which is why creating the above script Just Works™. BW 2026年10月8日 9:43:50 JST、[email protected] より: >..I got distracted.. > >Quoting this manually to keep posts in order, let me know if that's frowned on. > >"you're very close with the sed script. did you see acme's 'Edit' command? >grep -n Edit <{man acme}" > >I did, after lots of reading, get things to work this way. The work-flow is >impressive in how far it is from what I'm used to. For the record, what I've >settled on, following this strategy, is the following: > >1) Create a file called ascripts that stands for acme-scripts, in the director >of interest. >2) Open acme in said directory, and right-click on both that file, and on the >file I want to edit. That file goes on the right, under the directory entries. >3) In it, I put, each to a line, the scripts I use regularly. (so far, only >1). I also add Edit to the tag. >4) I then select the lines to be block-commented, double-M1 on the first >character of the script of interest, then M2 on Edit then M1 on Edit with M2 >still down, then release M1 then release M2, and on release of M2, the >block-comment activates. > >..If I've misread the instructions somehow, please let me know! > >With respect to Mathieu's comment, I have now tried with an absolute path, and >it still doesn't work. I have done chmod +x on the file in question, the >permissions look right. I also have all the relevant folders bound to bin, >following the instructions in "introduction to operating systems abstractions". > >I've now put the script basically all over the place, including explicitly in >/bin itself. no dice. I distantly realize that putting it "all over the >place" is actually not the right solution, since the first one found will >execute. What I have now done is a test with | /bin/my_script in the >tag-line. And my_script does not have | at the beginning. Now, if I select >all that, then M2 on it, or select it with M2, the lines I had selected.. get >deleted, not commented. But at least something happens, so that's a step in >the right direction, right? -_- > >On Wednesday, October 07, 2026, at 5:37 PM, Paul Lalonde wrote: >> (I added in the acme & edwood sources right after Look) > ..I will have to research this further. It looks to me like you have mostly > the same work-flow I described above, so that's cool! :-) ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Td1c9bb890f22e833-M8b115477d5ad6e9ccbfb55d9 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
