[Top][All Lists]

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

Re: newbie tries to hack comint.el (help!)

From: Kevin Rodgers
Subject: Re: newbie tries to hack comint.el (help!)
Date: Tue, 29 Jun 2004 17:36:06 -0000
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Miles Bader wrote:
> bill <address@hidden> writes:
>>One thing that this function must do, but I have not been able to
>>figure out is how to to move the point to the beginning of the line
>>of the immediately preceding shell input.  I've been able to handle
>>simple cases, but not tricky ones like:
>>myhost:~/some/dir$ foo \
>>>bar \
>>where '_' immediately after 'baz' indicates the location of the
>>point at the time I want to move it to the beginning of the line
>>beginning with "myhost".
> Note that comint _does not know_ (and cannot know) the difference
> between "myhost: ~ ...$ " and "> " -- it can't tell when your input
> causes a process to run in the shell, it just sees the input and output.
> comint-prompt-regexp is probably not useful because it is designed to
> match most prompts, and that includes "> ".

But doesn't comint or process-mark keep track of where the previous
command's output ended?  You should be able to search forward from there
to the next matching prompt.

Kevin Rodgers

reply via email to

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