From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.devel Subject: Re: [ERC] wanna have C-a take me to after prompt.. Date: Tue, 18 Jun 2002 19:56:40 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <15631.29784.471536.463752@tfkp00.physik.uni-erlangen.de> References: <87ofea6p5z.fsf@tc-1-100.kawasaki.gol.ne.jp> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1024423059 2437 127.0.0.1 (18 Jun 2002 17:57:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2002 17:57:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17KNEY-0000dC-00 for ; Tue, 18 Jun 2002 19:57:38 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17KNfN-0006Zh-00 for ; Tue, 18 Jun 2002 20:25:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KNEB-0000XS-00; Tue, 18 Jun 2002 13:57:15 -0400 Original-Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17KNDf-0000Vq-00; Tue, 18 Jun 2002 13:56:44 -0400 Original-Received: from tfkp00.physik.uni-erlangen.de by max5.rrze.uni-erlangen.de with ESMTP; Tue, 18 Jun 2002 19:56:42 +0200 Original-To: Miles Bader In-Reply-To: X-Mailer: VM 6.96 under Emacs 21.2.1 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4965 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4965 On Jun 18 2002 Miles Bader wrote: > Roland Winkler writes: > > I'd like to use the field properties to get the expected behavior > > from `C-a' (comint-bol). But with the prompt being inserted by the > > process filter function, this doesn't work. > > The reason is that processing of `comint-output-filter-functions' is > done _after_ the prompt is set up. It's probably OK to move the filter > processing after that point (though I'm not sure), but it will still > require some care on your part if you do this sort of thing -- in > particular, if you insert text after the process-mark, you have to be > sure to move the process-mark to reflect that, or else it will be > considered `after' the prompt. Thanks a lot! It seems to me that I have to dig deeper in the code of comint.el. Right now I define the filter function by using the function set-process-filter instead of using the variable comint-output-filter-functions. The reason is that three different buffers display the output of the process, and only one of these buffers uses a mode that is derived from comint-mode. Then I can simply change the filter function that connects to one or the other buffer. Therefore I never thought about using the features of comint for handling the output of my process. But now I am browsing through the code of comint.el and it seems to me that it offers quite some suport for my problems. I need not reinvent the wheel. (Sometimes I was thinking that it would be very helpful to have info pages for the very powerful comint package.) > Can you try the following patch to comint, and see if this makes > things work correctly for you? First I expect I have to modify my code so that the process output is handled by comint. This might require some (major?) rewriting of my code. So it might take a little while till I can tell you whether your patch solves my problem. Thank you once again. Roland