[slime-devel] Re: SLIME-SPACE not always working?

Edi Weitz edi at agharta.de
Wed Jul 7 11:48:36 UTC 2004


On Wed, 07 Jul 2004 12:29:42 +0200, Luke Gorrie <luke at bluetail.com> wrote:

> Edi Weitz <edi at agharta.de> writes:
>
>> I /think/ this used to work differently some time ago, but I'm not
>> sure. For a simple example create a file "foo.lisp" which has
>> nothing but the line
>>
>>   (zerop 42)
>>
>> in it. Now position point behind the "p" and press the space bar. I
>> see no arglist in the mini-buffer.
>
> After pressing space the contents will be "(zero p 42)", right? So I
> don't think it should show an arglist, unless there is a function
> called zero.

No, I said 'point /behind/ the "p"', so after pressing space the
contents will be "(zerop 42)" and as far as I know this is equivalent
to "(zerop 42)" in CL unless you've modified the readtable. I might be
dumb sometimes but I'm not /that/ dumb... :)

>> If I instead press backspace, then "p" and the space bar, I see the
>> arglist. Is this expected behaviour?
>
> Do you mean you delete the p with backspace, then put it back, then
> press space? Then it should show the arglist.

Yes, this is of course expected behaviour. My question was if it is
expected behaviour that the arglist doesn't show up in the first case.

> The intended semantics is that when you press the space bar it shows
> you the arglist for the surrounding function call. How does that
> relate to your observations and expectations? :-)

My expectations are that it should work like this. My observations are
that it doesn't.

> I oversimplify a little. If the nearest operator doesn't have an
> arglist then it will try other surrounding ones,

Yes, I know.

> but this should make no difference for the example.

Right.

I'll repeat my observations in more detail:

1. Open up a fresh Emacs and type M-x slime.

2. Visit the file /tmp/foo.lisp which contains exactly the ten
   characters "(zerop 42)", without the quotes, obviously.

3. Now type C-u 5 C-f so you're behind the "p".

4. Press the space bar. The buffer now looks like "(zerop  42)" - two
   spaces.

5. I see no arglist in the mini-buffer.

6. Press backspace twice. The buffer now looks like

     (zero 42)

7. Now press p and the space bar. The buffer again (see step 4) looks
   like "(zerop  42)" with two spaces.

8. But this time I see the arglist in the mini-buffer.

9. Note that in /both/ cases (step 5 and step 8) the buffer contents
   are identical, the point is at the same position and the last key
   pressed was the space bar. In step 8 you see the arglist, in step 5
   you don't.

Let me know if you need more details... :)

My guess is that the arglist is not shown if the space is the first
character that modifies the buffer, i.e. if it's the character that
makes the buffer go out of sync with its couterpart in the file system
and which triggers the asterisks in the modeline. (Evidence: Press
space again after step 5 - arglist shows up now.) Maybe the arglist
function interfers with the corresponding hook. (I'm not an Emacs
wizard.)

Cheers,
Edi.




More information about the slime-devel mailing list