From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.bugs Subject: bug#11962: 23.4; shell-process-cd called before executing command in shell, but must after. Date: Tue, 17 Jul 2012 22:25:04 +0300 Message-ID: <87pq7unqb3.fsf@desktop.home.int> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1342553166 24192 80.91.229.3 (17 Jul 2012 19:26:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2012 19:26:06 +0000 (UTC) To: 11962@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 21:26:06 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrDPJ-0008AI-T6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 21:26:06 +0200 Original-Received: from localhost ([::1]:58859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDPJ-0000w0-3b for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 15:26:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDPG-0000vr-AD for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:26:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrDPF-0003st-3v for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:26:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDPF-0003sp-0B for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SrDV4-0004YP-AY for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jul 2012 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11962 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134255348017455 (code B ref -1); Tue, 17 Jul 2012 19:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jul 2012 19:31:20 +0000 Original-Received: from localhost ([127.0.0.1]:46668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrDUL-0004XP-Bi for submit@debbugs.gnu.org; Tue, 17 Jul 2012 15:31:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38281) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrDUI-0004XH-6B for submit@debbugs.gnu.org; Tue, 17 Jul 2012 15:31:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrDOR-0003k2-Jp for submit@debbugs.gnu.org; Tue, 17 Jul 2012 15:25:12 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:38848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDOR-0003jy-Fp for submit@debbugs.gnu.org; Tue, 17 Jul 2012 15:25:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDOQ-0000Ez-Et for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:25:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrDOP-0003jJ-AS for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:25:10 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:58047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrDOP-0003ht-1f for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 15:25:09 -0400 Original-Received: by wgbez12 with SMTP id ez12so511941wgb.30 for ; Tue, 17 Jul 2012 12:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=CHfB/tFq2kODOoiSXiAc7KUEmlMN8/lpbXq1EprfPcE=; b=Sz/d/Du06QlEFr5vNUxO577/mRzQHgdo0I5DKhCBPurpVa5PJ+FoPBfAVb57OChgGm 1CRdMHEnIhE7Ip4pr8d9j2UAD8iKHczyfBGT/F+k0jhWJaqt2raDQPi0GX+bWH+8gz6v rwzjuPUwvOW2v9GljMuXOAbSrv69lDMkFaik/7ic3PaVSPK3gfaqtjmVeJsdQxLfn6O7 wwtIHrihOk8pkYFixgTaFhHN9R0khC35nM576N7Y7GA1numHbgHKOSs3H46vkndvet86 AEq/spb/cIVkp/vWavLgPFdOV2keEZHj8cNbl0rYWsplUjD02uxSYjXkwL80fWdJJqHd 69yw== Original-Received: by 10.216.154.69 with SMTP id g47mr82075wek.171.1342553107434; Tue, 17 Jul 2012 12:25:07 -0700 (PDT) Original-Received: from localhost ([46.185.20.32]) by mx.google.com with ESMTPS id bc2sm42088226wib.0.2012.07.17.12.25.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 12:25:06 -0700 (PDT) Original-Received: by localhost (sSMTP sendmail emulation); Tue, 17 Jul 2012 22:25:04 +0300 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62066 Archived-At: In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-07 on trouble, modified by Debian I found md function useful under Bash: md () { mkdir -p "$1" && cd "$1"; } as it save duplicate directory name typing. I decide to teach Emacs understand this keyword. Natural way to do so is to modify: (setq shell-cd-regexp "[cm]d") But I explore that this setting does not teach Emacs follow into directory (default-directory still not updated). After debugging functions in 'lisp/shell.el.gz' I found that 'shell-process-cd' call 'shell-cd' which call 'cd' which fail as I believe because 'cd' called before 'md' actually passed to shell (directory does not exist and 'cd' fail)... I think shell mode need to wait some mark that command processed (like waiting for prompt). This fix my bug report automatically. -- Best regards!