[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Geiser-users] [PATCH] Connecting to a Unix-domain socket
From: |
Ludovic Courtès |
Subject: |
Re: [Geiser-users] [PATCH] Connecting to a Unix-domain socket |
Date: |
Thu, 27 Feb 2014 14:23:44 +0100 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
"Jose A. Ortega Ruiz" <address@hidden> skribis:
> On Wed, Feb 26 2014, Ludovic Courtès wrote:
>
>> Hello!
>>
>> "Jose A. Ortega Ruiz" <address@hidden> skribis:
>>
>>> On Tue, Feb 18 2014, Ludovic Courtès wrote:
>>>
>>>> Hello!
>>>>
>>>> The patches below allow Geiser to connect to a Unix-domain socket via
>>>> M-x geiser-connect-local.
>>>>
>>>> It works for me, but I’m not too familiar with elisp, so proper review
>>>> is in order. :-)
>>>
>>> After a very quick look, they look good to me, except for a little
>>> detail. Here:
>>>
>>> [...]
>>>
>>>> diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
>>>> index 995bb3b..316e6ea 100644
>>>> --- a/elisp/geiser-repl.el
>>>> +++ b/elisp/geiser-repl.el
>>>> @@ -290,7 +290,7 @@ module command as a string")
>>>> (marker-position (cdr comint-last-prompt)))
>>>> ((and (boundp 'comint-last-prompt-overlay)
>>>> comint-last-prompt-overlay)
>>>> (overlay-end comint-last-prompt-overlay))
>>>> - (t (save-excursion (geiser-repl--bol) (point)))))
>>>> + (t (save-excursion (end-of-line) (point)))))
>>>
>>> Why did you need to modify this bit? Is it related to unix-domain
>>> socket support too?
>>
>> (Note that it’s in a separate patch.) I hit that line while hacking,
>> and it seemed obviously wrong. WDYT?
>
> Well, that function is returning where the last prompt ends, and
> geiser-repl--bol tries to go to that exact spot for the current line
> ("the beginning of line after the prompt"), or the beginning of line if
> the prompt isn't found. That won't be right if there's no prompt, but
> will be closer to the previous prompt's end than going to the end of
> line...
Oh right, I misunderstood things, sorry about that (I took “last prompt
end” as meaning really the end of the user input at the prompt.) So you
can safely omit that part.
> That said, that is a last resort cond branch that will almost never be
> taken and it doesn't matter much what we put there...
Yeah.
Thanks!
Ludo’.