From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.devel Subject: Re: [david.hansen@gmx.net: Re: comint's directory tracking doesn't understand \( or \)] Date: Tue, 06 Mar 2007 04:10:46 +0100 Organization: disorganized Message-ID: <878xeboymh.fsf@localhorst.mine.nu> References: <871wk56tjh.fsf@localhorst.mine.nu> <87k5xw8b07.fsf@localhorst.mine.nu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173151485 6511 80.91.229.12 (6 Mar 2007 03:24:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2007 03:24:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 06 04:24:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HOQI0-000687-RG for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2007 04:24:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQI0-000143-Bm for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 22:24:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOQHH-0000o9-DW for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOQHF-0000nQ-Pj for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOQHF-0000nK-IC for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:49 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HOQHE-0004pM-Pj for emacs-devel@gnu.org; Mon, 05 Mar 2007 22:23:49 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HOQH3-0006SV-Fv for emacs-devel@gnu.org; Tue, 06 Mar 2007 04:23:37 +0100 Original-Received: from e178063185.adsl.alicedsl.de ([85.178.63.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Mar 2007 04:23:37 +0100 Original-Received: from david.hansen by e178063185.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Mar 2007 04:23:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 28 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178063185.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:Ti09sjJS6P5P5evpVN0kar0T1gA= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67400 Archived-At: On Mon, 05 Mar 2007 21:23:32 -0500 Stefan Monnier wrote: >> shell-mode watches your input for commands that change the directory >> (mainly the shells `cd' command but also `popd', `pushd' and maybe >> others). > >> shell-mode then just use the first argument - (comint-arguments 1 1) - >> to this command to keep track of the working dir of the shell process. > >> This patch would be safer if you add a new function comint-dir-argument >> which does the new thing, and is used only for dir tracking. >> Then you could leave comint-arguments unchanged, and avoid the risk >> of breaking something else with some other shell. > >> With that alteration, I think we could install it now. > > Wouldn't it be better to move it to shell.el? > I.e. create a new function shell-argument? Agree with that. I'll think about a quick and dirty solution that only solves the directory tracking problem (we don't need to parse the whole command line here, just the 0th and 1st arg, maybe that simplifies the problem a bit). I'll bring up the discussion about a more general solution after Emacs 22 is out. David