[Top][All Lists]

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

Re: comint-previous-prompt in *shell* fooled just too often

From: Dan Jacobson
Subject: Re: comint-previous-prompt in *shell* fooled just too often
Date: 26 Feb 2001 02:38:52 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Kai" == Kai Gro罨ohann <address@hidden> writes:

Kai>   [[ Mailed copy of news article posted to gnu.emacs.bug ]]
Kai> On 23 Feb 2001, Dan Jacobson wrote:

>> How about having it at least take a look around first before I hit
>> return [or after previous return] to see what its current prompt
>> is, or maybe remember a list of previous spots in the buffer... all
>> better that relying on a regexp?

Kai> Don't make it too smart.  Users won't understand it anymore.

Kai> Suppose your .bashrc does "echo -n foo" at the end, then the
Kai> shell would think your prompt is "foo$ ".  Not good.

Naw. Here's the plans: Every time we return from a shell command and
place the cursor to rest at a prompt, we take a back towards the
beginning of line to remember what this prompt looked like.... no, how
about we remember a character offset from beginning of file... no,
what if the user took out a chunk of the file... ah yes: we just "set
a mark" in a private mark list... then the ^C^P's will jump to the
exact previous "prompting" locations, no matter if we were uing all of
sh, bc, dc, mail, or whatever... or perhaps set comint-previous-prompt
directly from PS1... but today's PS1 is loaded with
metacharacters... ok never mind.
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com. 積丹尼

reply via email to

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