9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Acme button 2 argument expansion: feature or bug?
@ 2005-04-09 14:28 Paul Lalonde
  2005-04-09 16:00 ` Rob Pike
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Lalonde @ 2005-04-09 14:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I've been using gdb a lot with acme lately, and setting breakpoints by 
line number.  I thought I'd do this most easily by doing an Edit =  to 
find the source line then click on the result in the +Error window, and 
middle-click/left-click chord on the convenient "break" I've left lying 
around my debug window's tag line.
But the expansion for the middle button doesn't tack on the : and line 
number.
So I thought I'd just select the whole line and do the chord, but the : 
and line number get chopped off my selection!
Is there a rationalle for trimming my selections when chording 2/1?  
Otherwise I'll fix it and submit a patch.

Less importantly, most of the code I have to deal with is in C++, evil 
as it is, but the expand function doesn't know about ::, which makes 
selecting methods more difficult than it needs to be.  I'm more than 
willing to add that support if someone doesn't convince me I'm wasting 
my time :-)

Thanks,
	Paul



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

* Re: [9fans] Acme button 2 argument expansion: feature or bug?
  2005-04-09 14:28 [9fans] Acme button 2 argument expansion: feature or bug? Paul Lalonde
@ 2005-04-09 16:00 ` Rob Pike
  2005-04-09 16:24   ` Paul Lalonde
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Pike @ 2005-04-09 16:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

The thinking in the underlying code, which was co-opted for this
purpose, is that a 'word' ends at punctuation.  It's pretty deeply
rooted and would be annoying to change in general, which will
mean hacking it for your particular purpose.

Instead, I recommend just avoiding expansion in this case and
selecting the whole string you wish to send.

-rob


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

* Re: [9fans] Acme button 2 argument expansion: feature or bug?
  2005-04-09 16:00 ` Rob Pike
@ 2005-04-09 16:24   ` Paul Lalonde
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Lalonde @ 2005-04-09 16:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, Rob Pike

But even selecting the whole string fails: the colon and line number 
suffix is clobbered.
A simple non-solution is to change the dofile argument to the 
getbytearg call to false, which of course kills the full path expansion 
of the argument :-(, but at least doesn't kill the suffix.
I'd be happy to see the suffix not killed when the selected text was 
non-null.

Paul


On 9-Apr-05, at 9:00 AM, Rob Pike wrote:

> The thinking in the underlying code, which was co-opted for this
> purpose, is that a 'word' ends at punctuation.  It's pretty deeply
> rooted and would be annoying to change in general, which will
> mean hacking it for your particular purpose.
>
> Instead, I recommend just avoiding expansion in this case and
> selecting the whole string you wish to send.
>
> -rob
>



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

end of thread, other threads:[~2005-04-09 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-09 14:28 [9fans] Acme button 2 argument expansion: feature or bug? Paul Lalonde
2005-04-09 16:00 ` Rob Pike
2005-04-09 16:24   ` Paul Lalonde

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