geiser-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Geiser-users] [PATCH] Connecting to a Unix-domain socket


From: Jose A. Ortega Ruiz
Subject: Re: [Geiser-users] [PATCH] Connecting to a Unix-domain socket
Date: Thu, 27 Feb 2014 02:51:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi!

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

Cheers,
jao
-- 
All parts should go together without forcing. You must remember that
the parts you are reassembling were disassembled by you. Therefore, if
you can’t get them together again, there must be a reason. By all
means, do not use a hammer. —IBM Manual, 1925



reply via email to

[Prev in Thread] Current Thread [Next in Thread]