Re: [9fans] [acme] Edit command -- More than one argument?
On Mon Oct 27 23:49:06 EDT 2014, paul.a.lalo...@gmail.com wrote: What do you mean by resizing flicker? I've never seen it with the multi-line tags. And we do resize the tag by hand - the scroll wheel opens and shuts it, in addition to adding/removing the trailing newline. i didn't realize there was the scroll wheel trick. it doesn't work when the tag is empty, or allow one to expand the tag window larger than the current tag. what i mean by flicker is that if i modify a file which has a tag line that is close to wrapping, then modifying the file will often make the tag line too long, and wrapping. Undo has the opposite effect. - erik
Re: [9fans] [acme] Edit command -- More than one argument?
Yes, the scroll wheel forward expands to the full size, and backwards reduces it to one line; this is as designed, and only on the wheel for lack of a better UI idea. I can't say that it has any amount of documentation or discoverability :-( I see what you mean about the jitter on expand contract. I can't think of a way to handle, but if I ever open the source again I'll think about some sort of hysteresis. Paul On Tue Oct 28 2014 at 3:55:39 PM erik quanstrom quans...@quanstro.net wrote: On Mon Oct 27 23:49:06 EDT 2014, paul.a.lalo...@gmail.com wrote: What do you mean by resizing flicker? I've never seen it with the multi-line tags. And we do resize the tag by hand - the scroll wheel opens and shuts it, in addition to adding/removing the trailing newline. i didn't realize there was the scroll wheel trick. it doesn't work when the tag is empty, or allow one to expand the tag window larger than the current tag. what i mean by flicker is that if i modify a file which has a tag line that is close to wrapping, then modifying the file will often make the tag line too long, and wrapping. Undo has the opposite effect. - erik
Re: [9fans] [acme] Edit command -- More than one argument?
Yes, the scroll wheel forward expands to the full size, and backwards reduces it to one line; this is as designed, and only on the wheel for lack of a better UI idea. I can't say that it has any amount of documentation or discoverability :-( I see what you mean about the jitter on expand contract. I can't think of a way to handle, but if I ever open the source again I'll think about some sort of hysteresis. i think this route really wants the tag and the window to both be subwindows of a parent, each with its little top-left rectangle for window size mgmt. but that's just my half-baked idea. - erik
[9fans] [acme] Edit command -- More than one argument?
Hello, everyone, I'm in the process of learning acme via Russ Cox's p9p port. Recently, I found myself editing some text to use with markdown, and needed to make more than one modification to a list. I wanted to know if it's possible to give the Edit command more than one argument. For example, I found myself needing to replace colons with a close bracket (]), and inserting an open bracket at the beginning of the line. So I did this: Edit s/^/\[/ Edit s/\:\ /\]/ And I was hoping to combine these into a single line, so, for example: Edit s/^/\[/ s/\:\ /\]/ (Not sure if escaping was necessary, but I was playing it safe) Doing exactly what I did above resulted in the error Edit: newline expected (saw f) So that's obviously not it. But I'm not sure if it's at all possible. Thank you in advance. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard pgpRmAdk0U2w7.pgp Description: PGP signature
Re: [9fans] [acme] Edit command -- More than one argument?
Edit { s/^/\[/ s/\:\ /\]/ } On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com wrote: Hello, everyone, I'm in the process of learning acme via Russ Cox's p9p port. Recently, I found myself editing some text to use with markdown, and needed to make more than one modification to a list. I wanted to know if it's possible to give the Edit command more than one argument. For example, I found myself needing to replace colons with a close bracket (]), and inserting an open bracket at the beginning of the line. So I did this: Edit s/^/\[/ Edit s/\:\ /\]/ And I was hoping to combine these into a single line, so, for example: Edit s/^/\[/ s/\:\ /\]/ (Not sure if escaping was necessary, but I was playing it safe) Doing exactly what I did above resulted in the error Edit: newline expected (saw f) So that's obviously not it. But I'm not sure if it's at all possible. Thank you in advance. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard
Re: [9fans] [acme] Edit command -- More than one argument?
but you can't do this on a acme headline. So how would you apply such multiline commands to a range you marked in the buffer? Edit { s/^/\[/ s/\:\ /\]/ } On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com wrote: Hello, everyone, I'm in the process of learning acme via Russ Cox's p9p port. Recently, I found myself editing some text to use with markdown, and needed to make more than one modification to a list. I wanted to know if it's possible to give the Edit command more than one argument. For example, I found myself needing to replace colons with a close bracket (]), and inserting an open bracket at the beginning of the line. So I did this: Edit s/^/\[/ Edit s/\:\ /\]/ And I was hoping to combine these into a single line, so, for example: Edit s/^/\[/ s/\:\ /\]/ (Not sure if escaping was necessary, but I was playing it safe) Doing exactly what I did above resulted in the error Edit: newline expected (saw f) So that's obviously not it. But I'm not sure if it's at all possible. Thank you in advance. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard
Re: [9fans] [acme] Edit command -- More than one argument?
Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). -rob
Re: [9fans] [acme] Edit command -- More than one argument?
Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). And in any event, the multiline Edit command can be executed from within the editable text, where vertical space is not usually at a premium. Takes some tidying up afterwards, but that's a small price to pay. Lucio. PS: I've never done this, is it going to work? :-) - This email has been scanned by the MxScan Email Security System. -
Re: [9fans] [acme] Edit command -- More than one argument?
At least p9p acme has multiline tags. Personally, I prefer 2-1 chord complicated or frequent stuff onto Edit command -- Kostarev Ilya On 27 Oct 2014 at 18:48:10, Ingo Krabbe (ikrabbe@gmail.com) wrote: but you can't do this on a acme headline. So how would you apply such multiline commands to a range you marked in the buffer? Edit { s/^/\[/ s/\:\ /\]/ } On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com wrote: Hello, everyone, I'm in the process of learning acme via Russ Cox's p9p port. Recently, I found myself editing some text to use with markdown, and needed to make more than one modification to a list. I wanted to know if it's possible to give the Edit command more than one argument. For example, I found myself needing to replace colons with a close bracket (]), and inserting an open bracket at the beginning of the line. So I did this: Edit s/^/\[/ Edit s/\:\ /\]/ And I was hoping to combine these into a single line, so, for example: Edit s/^/\[/ s/\:\ /\]/ (Not sure if escaping was necessary, but I was playing it safe) Doing exactly what I did above resulted in the error Edit: newline expected (saw f) So that's obviously not it. But I'm not sure if it's at all possible. Thank you in advance. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard
Re: [9fans] [acme] Edit command -- More than one argument?
Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). I use the plan9 legacy version, that seems to ignore typed newlines. With the p9p it works and possible with the 9front version too. Actually I can echo 'Edit {… }'/mnt/acme/{winid}/tag with newlines and use that. Edit { s/^/\[/g s/$/\]/g } Or you can use the 2-1 chord to apply and use the Edit command in-place. But you need a confident mouse hand to use that effectively.
Re: [9fans] [acme] Edit command -- More than one argument?
On Mon, Oct 27, 2014 at 10:09:46AM -0700, Rob Pike wrote: Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). -rob Yes, it worked thank you for your help. -- Eduardo Alvarez Stercus, Stercus, Stercus, moriturus sum -- Rincewind The Wizzard pgpLOsHFwDLa4.pgp Description: PGP signature
Re: [9fans] [acme] Edit command -- More than one argument?
Plan 9's Acme doesn't support multiline (at least not version I have). The way you can do it is to put the multiline instructions for Edit in a different buffer; then select the multiline instructions and middle-left click on Edit of the file you want to edit. On Mon, Oct 27, 2014 at 10:09 AM, Rob Pike robp...@gmail.com wrote: Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). -rob
Re: [9fans] [acme] Edit command -- More than one argument?
Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). I think this only works in p9p. sl
Re: [9fans] [acme] Edit command -- More than one argument?
That's a shame. -rob On Mon, Oct 27, 2014 at 9:41 AM, s...@9front.org wrote: Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). I think this only works in p9p. sl
Re: [9fans] [acme] Edit command -- More than one argument?
We (Russ and I) never ported it back to Plan9 because there's a subtle layout bug when columns have different height fonts for the tag and the body. I works well enough for us, but isn't at the quality it should be. Paul On Mon Oct 27 2014 at 3:57:01 PM Rob Pike robp...@gmail.com wrote: That's a shame. -rob On Mon, Oct 27, 2014 at 9:41 AM, s...@9front.org wrote: Yes you can. That's how I verified this works. Open up the tag to multiple lines (just type newline in the tag). I think this only works in p9p. sl
Re: [9fans] [acme] Edit command -- More than one argument?
On Mon Oct 27 19:39:19 EDT 2014, paul.a.lalo...@gmail.com wrote: We (Russ and I) never ported it back to Plan9 because there's a subtle layout bug when columns have different height fonts for the tag and the body. I works well enough for us, but isn't at the quality it should be. the layout is tricky. and it's hard to prevent resizing flicker. perhaps forcing the user to resize the tag by hand might be smoother. better yet, i'd love to see acme extended to the point where an external program could provide a sam(1)-style window rather than fiddling with the tag. - erik
Re: [9fans] [acme] Edit command -- More than one argument?
What do you mean by resizing flicker? I've never seen it with the multi-line tags. And we do resize the tag by hand - the scroll wheel opens and shuts it, in addition to adding/removing the trailing newline. On Mon Oct 27 2014 at 8:44:57 PM erik quanstrom quans...@quanstro.net wrote: On Mon Oct 27 19:39:19 EDT 2014, paul.a.lalo...@gmail.com wrote: We (Russ and I) never ported it back to Plan9 because there's a subtle layout bug when columns have different height fonts for the tag and the body. I works well enough for us, but isn't at the quality it should be. the layout is tricky. and it's hard to prevent resizing flicker. perhaps forcing the user to resize the tag by hand might be smoother. better yet, i'd love to see acme extended to the point where an external program could provide a sam(1)-style window rather than fiddling with the tag. - erik