From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "KARR, DAVID" Newsgroups: gmane.emacs.help Subject: How to get eshell to do what I used to do with shell Date: Sat, 10 Aug 2024 17:00:44 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35548"; mail-complaints-to="usenet@ciao.gmane.io" To: "Help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 10 19:01:44 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1scpTM-00098g-1R for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 10 Aug 2024 19:01:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scpSq-0007M8-2e; Sat, 10 Aug 2024 13:01:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scpSg-0007Lc-HQ for Help-gnu-emacs@gnu.org; Sat, 10 Aug 2024 13:01:05 -0400 Original-Received: from mx0b-00191d01.pphosted.com ([67.231.157.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scpSd-0005g6-Ry for Help-gnu-emacs@gnu.org; Sat, 10 Aug 2024 13:01:01 -0400 Original-Received: from pps.filterd (m0288868.ppops.net [127.0.0.1]) by m0288868.ppops.net-00191d01. (8.18.1.2/8.18.1.2) with ESMTP id 47AFilTc025410 for ; Sat, 10 Aug 2024 13:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.com; h=from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=PP1; bh=AVA3/3MGbKJ6C b+ffvXVHd9s172r7rI4GQNc6D7iV/4=; b=U79jRDaxXwWNUcTh0V7tMUDT7m9FN ZRNFspZ/gP9OvzGAQwH9XPOnlkPbDS/hsiIYHlEEB0XQvuh5p2rKwLQVYMsxxdYH +v4tAgnHjJi17Jgb+wtQJVmiV8JZ1Lx49Wcf20fp11+jFHOnlkfIZXLiCj30KLhJ +L0ol8//1OpMtR2bmMS8RxvbpLEoWWOfngYoQX0wlLiSCILs7B0lbf+emiESv30m pDyLbd/kOIUSSlqtYW/A1x2WQSADVfzj5kf2OZ+HYMQ3Pv+6EafFWKgQBQ26q9I3 eaZbua10VJ+KUU6KpKnXm8v/x1/gm7ov1ud/n6Nq6GnDDU0acdPVyn7LQ== Original-Received: from alpi154.enaf.aldc.att.com (sbcsmtp6.sbc.com [144.160.229.23]) by m0288868.ppops.net-00191d01. (PPS) with ESMTPS id 40xb4a11b0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 10 Aug 2024 13:00:55 -0400 (EDT) Original-Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id 47AH0sJ0005208 for ; Sat, 10 Aug 2024 13:00:54 -0400 Original-Received: from zlp30485.vci.att.com (zlp30485.vci.att.com [135.47.91.178]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id 47AH0lHg005075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 10 Aug 2024 13:00:48 -0400 Original-Received: from zlp30485.vci.att.com (zlp30485.vci.att.com [127.0.0.1]) by zlp30485.vci.att.com (Service) with ESMTP id 8A61040AF726 for ; Sat, 10 Aug 2024 17:00:47 +0000 (GMT) Original-Received: from GAALPA1MSGEX1EF.ITServices.sbc.com (unknown [135.147.63.196]) by zlp30485.vci.att.com (Service) with ESMTP id 43CF140AF725 for ; Sat, 10 Aug 2024 17:00:47 +0000 (GMT) Original-Received: from GAALPA1MSGEX1EE.ITServices.sbc.com (135.147.63.195) by GAALPA1MSGEX1EF.ITServices.sbc.com (135.147.63.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 10 Aug 2024 13:00:46 -0400 Original-Received: from GAALPA1MSGETA06.tmg.ad.att.com (144.161.121.52) by GAALPA1MSGEX1EE.ITServices.sbc.com (135.147.63.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11 via Frontend Transport; Sat, 10 Aug 2024 13:00:46 -0400 Original-Received: from CH1PR05CU001.outbound.protection.outlook.com (40.93.20.2) by edgeAL.exch.att.com (144.161.121.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 10 Aug 2024 13:00:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fk4UcbpkFeEC1Aog69Ntf2On3d0oWsN6x7lZP55gqqS92b/gCMGrni1Ua7hKh7r/JbyhNH/GDu88MpGKt6f5qxzdorNwNI2KLy4SpDBHaE6mqhEiQRniN65HixsyJDbBfHu7ByZMMw9oXl4MQArQEN860vKJaKBRo2/sabNVKpiaSv2I+ZmHW8SCOZ7PDlHK9pn3pVaHFIjDuZqqDut/nMe7HgFTmyW10xpxq4MSc2z+YRzPL+uFbPxtBCmJxyLqbt2mTrcO18I0yA2kLmVMlclNrUtbLiM6iDIt+0KHMeLpdmkN+nJR80bIKTaMN7FvSpPByYPIJrvAo2thb18CXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AVA3/3MGbKJ6Cb+ffvXVHd9s172r7rI4GQNc6D7iV/4=; b=WNy181o7xc5uBUtGNV0cjkV5iNCEDewgMDI86c5WAAsExyQmTpoM1TNRIhA+I7DgMbKp2NmFtTriBk3mS8HWLPjKGcH0S0+c+QgOJgDK0yxxkqsqdBW1MOEF0Ph9msrDHKx11mrS2OI/aSrzorHQwkacsgEOfG0z2H3hBxK6WCJHAC/HGufF/jCYonHcDkf2dQjT2UpEdUOoL131EsHp/D759BXUSS4+8q6lhc9Dy7hBQLnEIav0vSYeMhqfXDEeN7yAgSIwSST9MiJT8qi2adyq5ZlNm5iEXLACokM8XmPC453qfkq3YvFqbisrq6X6vfFmhhGz/CWTW5KMCUIdHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=att.com; dmarc=pass action=none header.from=att.com; dkim=pass header.d=att.com; arc=none Original-Received: from DM3PR02MB10256.namprd02.prod.outlook.com (2603:10b6:0:4b::5) by SA6PR02MB10454.namprd02.prod.outlook.com (2603:10b6:806:40b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.19; Sat, 10 Aug 2024 17:00:44 +0000 Original-Received: from DM3PR02MB10256.namprd02.prod.outlook.com ([fe80::1f1d:c970:cbe7:1d04]) by DM3PR02MB10256.namprd02.prod.outlook.com ([fe80::1f1d:c970:cbe7:1d04%5]) with mapi id 15.20.7849.018; Sat, 10 Aug 2024 17:00:44 +0000 Thread-Topic: How to get eshell to do what I used to do with shell Thread-Index: AdrrRMUYfdN0FRoxQy+4vjS/jDCrQQ== Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM3PR02MB10256:EE_|SA6PR02MB10454:EE_ x-ms-office365-filtering-correlation-id: 351dd9aa-7c67-4b5a-5b32-08dcb95df965 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?PDcaG2hauyVf0ROw5jV2BpGYxgJ/CSVztg1AJmBu654slMQ1LwjtgR0u3659?= =?us-ascii?Q?6gbqfYZx912YG44Z/FAmtedvwjBanovf5EMd3bIFLcHzjsjFABSQzXJwdufT?= =?us-ascii?Q?+4giBkXT66Uh8NjCrj1TZkrbeADypDhuCpHFzNzwAEgO3/j7z+zQsCI+P9p8?= =?us-ascii?Q?2PlEGtHLNKRnBI4IJbJlNBHCKsj2nkLP65Ccm0xP7mMJw0c2q6nXyXH4gh/4?= =?us-ascii?Q?M4OEXYYTMK40WR3YdVztOyFKEAZ9fm3MaeCUY2XTygIWmR1FAyYuSHKS6Sf3?= =?us-ascii?Q?skC1KFMS8x7qQTYorZac8Cd5sDIZsh3F3sYrifNqrSWCxjzexyysvtMJfcbV?= =?us-ascii?Q?nD2Dwvg25uKWmgmw12HCLE2Zo0/gPkF0HubjyZvbioDH3qfxjiCO/G+5j8br?= =?us-ascii?Q?OJWxzFoVCKLircnZEGCSzxDFGiG3qWVbihAgnIoBet+PkA+3guGzvd/FQpFQ?= =?us-ascii?Q?E6t0wdng5estxNezb/0x6Oc82wq+A30expoP5mm9BCQO7BGWhpeQbk77RdFM?= =?us-ascii?Q?1HdkRIT4mgm6ksbhpOtXgA7dS8ZOtteyBa+EtZ3xgc6DNeIR12X2lcOEtPvS?= =?us-ascii?Q?uwcHxD222INEeZ13Hqh92OAX+I1SJVcD2VzOKSHGXFc89byDJQagZ4qJfCf/?= =?us-ascii?Q?RyulV x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM3PR02MB10256.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wWWwUyGKRBYx3ei5Sm8BXYE25XeX3MI/fBeQocuWoYoiXhyGCgmnqSVLfT34?= =?us-ascii?Q?bVVhZ6SVX8Eyc2JpkVNQ+qv2NaIZad9FpZwF61qoWCTKupFS71D4GfRvR1vR?= =?us-ascii?Q?gSz/x4KPkjuchW9FEGb/BXysQn4R7BgYgjVnPzMB4CUYm/dhjHQpVMdrNQVm?= =?us-ascii?Q?5b++8OK6+fcYIzM94dKA6zkbcg4k00Tvg+Li7RTCQ4f0jr5YoCpCP3w6UCun?= =?us-ascii?Q?Cz+V39t2PsRNHtXWGilaBfP91iNnzC9t9iqgr2kaiW48Ot7WG5QFYQOmcCks?= =?us-ascii?Q?rUGomXf9s5uoTQ+1gtLcQaymMlJM/S6sGG2Lrgup6Cn/C9tkHJtGqJhTpZ5c?= =?us-ascii?Q?taKx3vn41DLTJjLYBMB89yv0/BNccCJnZdLRsnDQx89EmPvcw1VOARfxztKq?= =?us-ascii?Q?vTexvhzP/eLHkzDtIOgxgJaOzU+vXmMFCQWLQiFu9d2tGVjsK/IxgEdmdgOi?= =?us-ascii?Q?mE7UT2SbWiueB/KUBX6oVSNHmDseyzfZMnmUIB9mJTirK3kD0ePXHiyOfL6l?= =?us-ascii?Q?+hHuo3LXoYAH6l8LqSGF+qaTq9xdWUpcPOrUGnGQepnAOc92jncuatNJI1AV?= =?us-ascii?Q?NwOqSlu2q6uEo6tWRwRtZEA1LjGQVM1HysTpUL2pN4ofat6PXMdFEgXM0WZs?= =?us-ascii?Q?o5 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM3PR02MB10256.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 351dd9aa-7c67-4b5a-5b32-08dcb95df965 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2024 17:00:44.6877 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e741d71c-c6b6-47b0-803c-0f3b32b07556 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HaH6J2B8YM70HK4ViH9YsoVfFF2BB0pLp2erjgGWlnN74Y2qN0CTKme8By+7/vFK X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR02MB10454 X-TM-SNTS-SMTP: 118957261253025ADE5DD2066B701BED79E56CA1B211E767B836885FB4B3744F2 X-Proofpoint-ORIG-GUID: -QwDkltu_YomEVSdx1RuI8BKIp36usny X-Proofpoint-GUID: -QwDkltu_YomEVSdx1RuI8BKIp36usny X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-10_15,2024-08-07_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=330 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408100128 Received-SPF: pass client-ip=67.231.157.136; envelope-from=dk068x@att.com; helo=mx0b-00191d01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147587 Archived-At: I haven't gotten a reply from the Cygwin list yet on my shell ioctl problem= . I may get something useful from that, but I may have to consider an alte= rnative path. I wrote this little wrapper on "shell" a couple of decades a= go, and it's worked fine since then. I've briefly looked at "eshell", and = it seems like it will do the job, but I wanted to know whether I can wrap i= t to do the same things my older wrapper was doing. My old wrapper had these features: * In a non-shell buffer, execing the main func would either create the firs= t shell buffer, or go to the first one in the chain, perhaps called the 0th= . * In a shell buffer, execing the main func would create a new shell in the = chain, using the current directory=20 * In a shell buffer, execing the "goto-next-shell" func would move to the n= ext buffer in the chain, or back to 0 if at the end * In a shell buffer, execing the "find-shell-with-dir" func would take a st= ring argument and find the next buffer in the chain where the pwd has that = string as a substring I think all of these are doable, but I haven't written any elisp for many y= ears. I see that "default-directory" in each eshell buffer is set to the cu= rrent directory, just like in the old shell package. I wonder if this will= work just by changing the name of the function to execute. Could it be th= at simple? I guess I'll iterate on that and come back here for question.