From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 12:25:38 2024 Received: (at submit) by debbugs.gnu.org; 26 Mar 2024 16:25:38 +0000 Received: from localhost ([127.0.0.1]:34770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rp9cI-0004V8-KE for submit@debbugs.gnu.org; Tue, 26 Mar 2024 12:25:38 -0400 Received: from lists.gnu.org ([2001:470:142::17]:33930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rp9cE-0004UP-HL for submit@debbugs.gnu.org; Tue, 26 Mar 2024 12:25:37 -0400 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 1rp9c8-0000EL-Uk for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2024 12:25:28 -0400 Received: from mail-oo1-f49.google.com ([209.85.161.49]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rp9c7-0003C2-Mo for bug-gnu-emacs@gnu.org; Tue, 26 Mar 2024 12:25:28 -0400 Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-5a470320194so2985060eaf.3 for ; Tue, 26 Mar 2024 09:25:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711470326; x=1712075126; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lovqG3TbV9JPMens8eUNjJ+ouJtOvZp6dtqs/S7qkYM=; b=pVgVCfAQG2pdguh6KCIMFev2buPaOg6cb21rj/V6GR787jbU7a9emKmzb6+9YRkxbN ue7vPzwtGr6897x+RoIxHgTYpM1x1QMPyMc/56wTIYOfl5JW5zaoZ2UicFVA5FIH7Pz2 3WaYfZIrbwYCiDvza1mtgvi8YWS0CtPOsFbt+Fc1iZdAVJv+iO3t/R/Ua+388bbb8ux8 ZNxrkhiRoORgzekCUcz8YbVTgjHIlVlS4A/gCXxdzTVgy2JweXvamXgG/HoPb38vx8Jk IsXhTV8t0Wp3S/Z++cwnwJ2YExcY8mIy5Iwb6Yypvw7779l1XceULLpxiZsQl4YRe3nT IcqA== X-Gm-Message-State: AOJu0YznqQJZqx1+re1XsjRK6T4zaR2kFaPxmi+OC+kZ2h/tSOWffQ33 SE4MuY1LIqX90TviVEBo4qVf6y/qL1dGUN1oSyxGIxN+ikUSXAUvaslyDxJHMshRP5SmuN47w8I pi8wYaZaL1nkeNXsk/sutVDyDxz7qYn8= X-Google-Smtp-Source: AGHT+IFf+ZaKBZg7j4cSQB3gZ7XSpQTRFrURiFUAsEYxoCBnTPL13l/lC9hvpPumwsdwhg2MBlUs5PSfw3fTJGB2X/0= X-Received: by 2002:a05:6820:1b13:b0:5a4:71b3:d090 with SMTP id bv19-20020a0568201b1300b005a471b3d090mr10348503oob.5.1711470325884; Tue, 26 Mar 2024 09:25:25 -0700 (PDT) MIME-Version: 1.0 From: Sam Steingold Date: Tue, 26 Mar 2024 12:25:13 -0400 Message-ID: Subject: shell-resync-dirs broken on windows To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000d16d16061492bc7d" Received-SPF: pass client-ip=209.85.161.49; envelope-from=sam.steingold@gmail.com; helo=mail-oo1-f49.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Windows emacs 29.2 Msys2 bash dirs returns something like "/c/foo" for "c:/foo" and (file-directory-p "/c/foo") returns nil even though "c:/foo" is a directory. Thus shell-resync-dirs goes into an inf [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sam.steingold[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --000000000000d16d16061492bc7d Content-Type: text/plain; charset="UTF-8" Windows emacs 29.2 Msys2 bash dirs returns something like "/c/foo" for "c:/foo" and (file-directory-p "/c/foo") returns nil even though "c:/foo" is a directory. Thus shell-resync-dirs goes into an infinite loop. --000000000000d16d16061492bc7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Windows emacs 29.2
Msys2 bash dirs retur= ns something like "/c/foo" for "c:/foo" and (file-direc= tory-p "/c/foo") returns nil even though "c:/foo" is a = directory.
Thus=C2=A0shell-resync-dirs goes into an = infinite loop.
--000000000000d16d16061492bc7d-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 26 12:52:24 2024 Received: (at 70012) by debbugs.gnu.org; 26 Mar 2024 16:52:24 +0000 Received: from localhost ([127.0.0.1]:34796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpA2C-0005eq-8Z for submit@debbugs.gnu.org; Tue, 26 Mar 2024 12:52:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpA2A-0005eD-BQ; Tue, 26 Mar 2024 12:52:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpA24-0001RW-SY; Tue, 26 Mar 2024 12:52:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=75ljAGkjPEIIGHJmUgwONL8MNoOsY1y6l2D70B6A5dQ=; b=OVSDoFFIbAb+ 8DqSM1Cc0eRemp/lcKzZ4ZVkSegjiqO79QOhsy0uVYCfM8AO3I+23j1DSZa9VWdmD/mxGkIAYtW1w 7lv1K+FGSKFVPWwkluT214A4QGChicnAPXQzdNZCsNJ+UPpg//VVw75qutLgWz5WvM//rGr3cHHOn IFSBpqXBTnQHjfDzKZsKk3ij76XbPVc00JMxThG50iAVM/sgO9GyK6OPKV0jDRP54pko1W6ljJ+2a z/8VSWwk5UKyl798aqMBWF8wBFF/Y+xOBx35Ws7vREIQ3NlWPWE8sH+eX+WfZYxedxmh2rFXO59cw PaDGxCd4HKSdaRurmqHgvw==; Date: Tue, 26 Mar 2024 18:52:07 +0200 Message-Id: <86v859hr60.fsf@gnu.org> From: Eli Zaretskii To: Sam Steingold In-Reply-To: (message from Sam Steingold on Tue, 26 Mar 2024 12:25:13 -0400) Subject: Re: bug#70012: shell-resync-dirs broken on windows References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 70012 notabug wontfix thanks > From: Sam Steingold > Date: Tue, 26 Mar 2024 12:25:13 -0400 > > Windows emacs 29.2 > Msys2 bash dirs returns something like "/c/foo" for "c:/foo" and (file-directory-p "/c/foo") returns nil even > though "c:/foo" is a directory. > Thus shell-resync-dirs goes into an infinite loop. Sorry, the native Windows build of Emacs is not supposed to support MSYS- or Cygwin-specific magic in file names. We cannot support that without significant complications in the low-level code, and even if that code can be made to work, users are not supposed to give up top-level directories named /x (where 'x' is a letter). If you want these names supported, try the Cygwin or Cygw32 build instead (but I'm not sure even those builds support /c/foo/bar file names). This is not a bug, and we should not even try fixing it. IOW, using MSYS Bash in shell buffers is not supported in the MS-Windows build. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 19:37:25 2024 Received: (at 70012) by debbugs.gnu.org; 27 Mar 2024 23:37:26 +0000 Received: from localhost ([127.0.0.1]:38531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpcpf-0002xe-3g for submit@debbugs.gnu.org; Wed, 27 Mar 2024 19:37:25 -0400 Received: from mail-ot1-f42.google.com ([209.85.210.42]:42353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpcpa-0002wM-Hx for 70012@debbugs.gnu.org; Wed, 27 Mar 2024 19:37:22 -0400 Received: by mail-ot1-f42.google.com with SMTP id 46e09a7af769-6e68a30e6a1so171447a34.1 for <70012@debbugs.gnu.org>; Wed, 27 Mar 2024 16:37:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711582632; x=1712187432; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vwIv6pSzGaEf8jvEqIi1KqOXvIA/2P2GKkPhPnBVcYU=; b=NBm9GOs6LtO83L3cMeJraOreX3+MVgnvJ8+7H75jvOaJr94s1Id138geNNGUU/Nm+T D6+8PT81REqmiMFL0poLYTt2nhV0pJR9lyyUXLCRNkU68yLBuZkAf8Jd/CYCisz4unqy GO0kmhlL2lGEduRG3CRy/8ix+0oHm2jnxXqhc9rdxXCzIX7h66NbZSULcgXWZ5Fqf0Zs SW97MeBNvbPR+2bL1aFOUUDLbn5M07ukfklX/wQtranHPHHo6s3j9dIZp0ul70tXzFQ+ XzQrYN5e12xBcmEZggmsDTzs44nQBvFkj4geqbK0Xh1tDiO0kDhYYrJrs34vtDp0kH7c rOeg== X-Gm-Message-State: AOJu0YzGvCyl7bPY9hrIDFU8GbxBsphs1KlatkAiQbIw1xlPUAOjVA0u sHCFc2ieoEbUBZ5nOEs1IQzUdNVaFaXSLYsiIS/HCHBhwyW0i8bdAjLijqTybONnEdx61kCrqDs hLagobIpuKZnES1dl+uwdZZXdaw== X-Google-Smtp-Source: AGHT+IEEq4zgJAUaKtaXxjZzk6HSS+oYHXAe/8K+4r8QxjH2cSSPdRh4SWcAD/txoYWypj0ae1gZN2xsMlPOveGOu/w= X-Received: by 2002:a05:6830:1e05:b0:6e6:9625:b07c with SMTP id s5-20020a0568301e0500b006e69625b07cmr321527otr.5.1711582632408; Wed, 27 Mar 2024 16:37:12 -0700 (PDT) MIME-Version: 1.0 References: <86v859hr60.fsf@gnu.org> In-Reply-To: <86v859hr60.fsf@gnu.org> From: Sam Steingold Date: Wed, 27 Mar 2024 19:37:00 -0400 Message-ID: Subject: Re: bug#70012: shell-resync-dirs broken on windows To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) which bash builds are supported on windows? On Tue, 26 Mar 2024 at 12:52, Eli Zaretskii wrote: > > tags 70012 notabug wontfix > thanks > > > From: Sam Steingold > > Date: Tue, 26 Mar 2024 12:25:13 -0400 > > > > Windows emacs 29.2 > > Msys2 bash dirs returns something like "/c/foo" for "c:/foo" and (file-directory-p "/c/foo") returns nil even > > though "c:/foo" is a directory. > > Thus shell-resync-dirs goes into an infinite loop. > > Sorry, the native Windows build of Emacs is not supposed to support > MSYS- or Cygwin-specific magic in file names. We cannot support that > without significant complications in the low-level code, and even if > that code can be made to work, users are not supposed to give up > top-level directories named /x (where 'x' is a letter). > > If you want these names supported, try the Cygwin or Cygw32 build > instead (but I'm not sure even those builds support /c/foo/bar file > names). > > This is not a bug, and we should not even try fixing it. IOW, using > MSYS Bash in shell buffers is not supported in the MS-Windows build. -- Sam Steingold From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 28 03:00:00 2024 Received: (at 70012) by debbugs.gnu.org; 28 Mar 2024 07:00:01 +0000 Received: from localhost ([127.0.0.1]:38882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpjjy-0007qn-IP for submit@debbugs.gnu.org; Thu, 28 Mar 2024 03:00:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpjjw-0007pu-98 for 70012@debbugs.gnu.org; Thu, 28 Mar 2024 02:59:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpjjn-0007vC-O3; Thu, 28 Mar 2024 02:59:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6byIKEE53boqn/dqjMdqXbObT7yNa9mhOV19Wa7HUxM=; b=Sa9d+8rJFKrQ rpf57MLmS2Dq0+JQ5Fo2MT66QcgUoOOoHZCSnM0vLYX4G0dYitNFkkT2cRO2vNthRI5yY3NGBrnSS 1B5UIoCk3U71bREzIOAO0wyzQqhC2rbtZ5Gk4Lk0LOAalPZGDuQa4BB+XH/KfqQFkJKF38LTxSyU3 7zWgk53y1w3fRGrFi05tx3nR1z5HH2qpZ8V2AIlh5UPVjlU3S4TJsFyf37Xslo8Hz9PpI0EBmRac6 rmCWTX4NSmSomOEtYOe9QH73ezFcbmrkTJlJvfegHg7/rO71JzdMGRzx5LPa2e0ahxllfOQnSCQdY 95fMJxRhO2R7txgs+Bkdow==; Date: Thu, 28 Mar 2024 08:59:41 +0200 Message-Id: <86plvehmea.fsf@gnu.org> From: Eli Zaretskii To: Sam Steingold In-Reply-To: (message from Sam Steingold on Wed, 27 Mar 2024 19:37:00 -0400) Subject: Re: bug#70012: shell-resync-dirs broken on windows References: <86v859hr60.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sam Steingold > Date: Wed, 27 Mar 2024 19:37:00 -0400 > Cc: 70012@debbugs.gnu.org > > which bash builds are supported on windows? Any native build of Bash would be supported. Except that I'm not aware of any such port of Bash, unfortunately. Maybe the MSYS or Cygwin Bash can be told to output Windows-format file names with drive letters? I know that "pwd -W", for example, shows the current directory in Windows format, so maybe there are other similar tricks? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 29 08:17:47 2024 Received: (at 70012) by debbugs.gnu.org; 29 Mar 2024 12:17:47 +0000 Received: from localhost ([127.0.0.1]:41866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqBB4-00068w-S4 for submit@debbugs.gnu.org; Fri, 29 Mar 2024 08:17:47 -0400 Received: from mail-oo1-f41.google.com ([209.85.161.41]:45364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqBB3-00068i-70 for 70012@debbugs.gnu.org; Fri, 29 Mar 2024 08:17:45 -0400 Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5a56710cdccso792716eaf.3 for <70012@debbugs.gnu.org>; Fri, 29 Mar 2024 05:17:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711714658; x=1712319458; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qcy7A84JkfgwWzQHRF5kxhYrolxBxC3QxTs1UquczbU=; b=sL1jOtfo92R6pHHsEglJn8BSrOWvyOA67vkjhhM9n0ARhRnNXavXNd19ygFy767Yhx lVzd1tSpWz5V2RIGiMRrLZtUN7/jLbIcgu3Ld5Cwpm0cOYo1w32ueGCb5McFs2SQoWdA 8VDnB2SaYKzNcIyBnrp/laAEVscySUB+KCP+7Yb42wPsmXsydE+3RM9x9aVoOazt1PFh MOO3NLXjIlAvcTs1kBgLrb6iWRlMTsehcpNn1FA+Hnb4KlUd++L9RpqeMPf0xZ9FqTVh rQFD5bm7XoKmkxrkQB0uQgswhEsD7ju94mHrCFW6o1Lkd8WGuDILk+6a8nSn2GI11DU0 N2Xw== X-Gm-Message-State: AOJu0YwFIq7XDlqeurOWmZ58OtwU7F7l95DtFJUrHp/+u+fEhSrq3kzd o0XYF7XTPMjMogieNGAyoW1c1rY9XY9QnUrWdh43JNbpWjZFDw5HDuNbqLvQgzq10snNycQNczn MYt16Mi4xfMZVB7r62i9w2CYPOvz+nDI1iA== X-Google-Smtp-Source: AGHT+IG4ts2XMkhk38uhxd59Qay8dY2we+u3jljcICVlrLXMYMoig5HkCqx40SnJTLPQajjhhRZnb19BWyyyIfc6/Sg= X-Received: by 2002:a4a:ee86:0:b0:5a1:c13d:ac32 with SMTP id dk6-20020a4aee86000000b005a1c13dac32mr1866422oob.8.1711714658070; Fri, 29 Mar 2024 05:17:38 -0700 (PDT) MIME-Version: 1.0 References: <86v859hr60.fsf@gnu.org> <86plvehmea.fsf@gnu.org> In-Reply-To: <86plvehmea.fsf@gnu.org> From: Sam Steingold Date: Fri, 29 Mar 2024 08:17:26 -0400 Message-ID: Subject: Re: bug#70012: shell-resync-dirs broken on windows To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On Thu, Mar 28, 2024, 02:59 Eli Zaretskii wrote: > > From: Sam Steingold > > which bash builds are supported on windows? > > Any native build of Bash would be supported. Except that I'm not > aware of any such port of Bash, unfortunately. I admire your sense of humor. > Maybe the MSYS or Cygwin Bash can be told to output Windows-format > file names with drive letters? I know that "pwd -W", for example, > shows the current directory in Windows format, so maybe there are > other similar tricks? Please upvote https://github.com/msys2/MSYS2-packages/issues/4472 (however, even with `dirs -W`, emacs would need to be patched) Incidentally, why do you use `dirs` instead of `pwd` there? you use only the last dir anyway. finally, the following patch fixes the bug for me: --- shell.el~ 2024-03-06 12:13:15.134281800 -0500 +++ shell.el 2024-03-28 11:50:32.920026000 -0400 @@ -711,6 +711,7 @@ ((string-equal shell "ksh") "echo $PWD ~-") ;; Bypass any aliases. TODO all shells could use this. ((string-equal shell "bash") "command dirs") + ((string-equal shell "bash.exe") "command pwd -W") ((string-equal shell "zsh") "dirs -l") (t "dirs"))) ;; Bypass a bug in certain versions of bash. may I push it? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 29 09:14:57 2024 Received: (at 70012) by debbugs.gnu.org; 29 Mar 2024 13:14:57 +0000 Received: from localhost ([127.0.0.1]:41931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqC4O-0000jd-N3 for submit@debbugs.gnu.org; Fri, 29 Mar 2024 09:14:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqC4K-0000jL-T6 for 70012@debbugs.gnu.org; Fri, 29 Mar 2024 09:14:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqC4E-0006k6-3Q; Fri, 29 Mar 2024 09:14:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YgvjDAUT3ekh7wyLanSY1c7BtWOhmRtqZbsRWWvdQTU=; b=TekCIi7oVgP/ Rh6PSlD5q0ko0KhUw4WLSViQ+f91J0PP09hbYje/fSptdo0U/EZ8LCa7MmlTpBbUXTjZS6S52RZhI Osb6qxBa/+C37YTg0udG/5zIRG2sgjdztWTiHYQfS5cNu8IKp58tJ+uTqN2CHO3c1Rk0jxOIioRXG Cub93sLwqsgYJwhlCp0LKBvV4RB4ZSfnj75Hk/KS4UA2ox4IgB6xOIa0bElN8Vfonuowbn9DO9UVk a6r9L2fF7NkNO0WCl40StjKDvygLZ3rTjCgIVFFflWLGCuSBV+zOpqdfOEgGo4lvOY+3BgyRnUKfV Cxl8uTa1DEtbD0iM0OaFnA==; Date: Fri, 29 Mar 2024 16:14:43 +0300 Message-Id: <86ttkpdvss.fsf@gnu.org> From: Eli Zaretskii To: Sam Steingold In-Reply-To: (message from Sam Steingold on Fri, 29 Mar 2024 08:17:26 -0400) Subject: Re: bug#70012: shell-resync-dirs broken on windows References: <86v859hr60.fsf@gnu.org> <86plvehmea.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sam Steingold > Date: Fri, 29 Mar 2024 08:17:26 -0400 > Cc: 70012@debbugs.gnu.org > > On Thu, Mar 28, 2024, 02:59 Eli Zaretskii wrote: > > > From: Sam Steingold > > > which bash builds are supported on windows? > > > > Any native build of Bash would be supported. Except that I'm not > > aware of any such port of Bash, unfortunately. > > I admire your sense of humor. Btw, I do have a (very old) native build of Bash on my system, but I don't use it as it is quite buggy, and cannot reliably run complicated shell scripts. IOW, it isn't like no one tried to produce a native port, they just didn't do well enough... > > Maybe the MSYS or Cygwin Bash can be told to output Windows-format > > file names with drive letters? I know that "pwd -W", for example, > > shows the current directory in Windows format, so maybe there are > > other similar tricks? > > Please upvote https://github.com/msys2/MSYS2-packages/issues/4472 Done. > finally, the following patch fixes the bug for me: > > --- shell.el~ 2024-03-06 12:13:15.134281800 -0500 > +++ shell.el 2024-03-28 11:50:32.920026000 -0400 > @@ -711,6 +711,7 @@ > ((string-equal shell "ksh") "echo $PWD ~-") > ;; Bypass any aliases. TODO all shells could use this. > ((string-equal shell "bash") "command dirs") > + ((string-equal shell "bash.exe") "command pwd -W") > ((string-equal shell "zsh") "dirs -l") > (t "dirs"))) > ;; Bypass a bug in certain versions of bash. > > may I push it? That's not really TRT, because it assumes every bash.exe is an MSYS program (which might not be true: there's a Cygwin Bash, for example). And we don't need to make such assumptions: (w32-application-type (executable-find "bash.exe")) => msys I'm okay with installing the fix after you change it to use w32-application-type (and verifying that it works in your case, of course: I don't have MSYS2 Bash installed). > Incidentally, why do you use `dirs` instead of `pwd` there? > you use only the last dir anyway. I don't know, I'm not familiar with shell.el well enough. Just by looking at the code, shell-resync-dirs does need to know all the stack, so it could refresh the value of shell-dirstack, no? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 29 10:54:36 2024 Received: (at 70012) by debbugs.gnu.org; 29 Mar 2024 14:54:36 +0000 Received: from localhost ([127.0.0.1]:43151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDcp-0005zO-2l for submit@debbugs.gnu.org; Fri, 29 Mar 2024 10:54:36 -0400 Received: from mail-oo1-f53.google.com ([209.85.161.53]:58519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDcj-0005z3-VX for 70012@debbugs.gnu.org; Fri, 29 Mar 2024 10:54:33 -0400 Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-5a58009fe88so1141348eaf.0 for <70012@debbugs.gnu.org>; Fri, 29 Mar 2024 07:54:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711724062; x=1712328862; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ww1csWnsMEF2M9I8/lyTB7srElif+RgjHQT5amzGgM0=; b=Oon851L1tEeI4cPIjGQV2uxkMO2Oe2JHESHcLj14NQH4VkDFde13SnqqcbR/UrkuQ0 w4kw6FvWB0dUzAxjLFifjwg2cw9pJhWow8ARbZWxCj4WjbBgL1qCNLiFdGMozvdYL8Mb NGK12goypC8fhXiijzEGniREWdJaYNdvxD6SlHUcxbQuORbABepzzbfzGAxfg8x2CTn1 4ZxQ7c7Eu0q16q3S+BEDzrJSwlXtunr6g2uwa8am1EKsVJ57NziMUQMZHlHwruOOQPMf vpur0IUTPfJtoZnVTMd6EDKMKVPQnUCHjQimLkc45fw1TzufFqcZpiis4p7kaL7palS4 UnOw== X-Gm-Message-State: AOJu0Yz9s4vJcK1BxwuGcwrktZa9GEGrvyz4lHsjdTLrYMn8FSpHXI59 y6ldElc5ttmVDgIiTwySMrgonZZGV0htrunajH7noz2RhGF/l/h+Ziw5t/EUALJM76Mf+aeletm OVNMDVS+rjv9+eNm6FiwW1sgYpqPRmfc= X-Google-Smtp-Source: AGHT+IFS51Bz+TVdirq1DA1CC5tb7gSAoPjcRl2aUA+Wi0FqMW+ZfEEeMAxBZon2O4Bmnga9xmEgaFIckk+7RdEHh2Y= X-Received: by 2002:a05:6820:986:b0:5a5:2431:f5a2 with SMTP id cg6-20020a056820098600b005a52431f5a2mr2318670oob.7.1711724062188; Fri, 29 Mar 2024 07:54:22 -0700 (PDT) MIME-Version: 1.0 References: <86v859hr60.fsf@gnu.org> <86plvehmea.fsf@gnu.org> <86ttkpdvss.fsf@gnu.org> In-Reply-To: <86ttkpdvss.fsf@gnu.org> From: Sam Steingold Date: Fri, 29 Mar 2024 10:54:10 -0400 Message-ID: Subject: Re: bug#70012: shell-resync-dirs broken on windows To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 70012 Cc: 70012@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On Fri, 29 Mar 2024 at 09:14, Eli Zaretskii wrote: > > finally, the following patch fixes the bug for me: > > > > --- shell.el~ 2024-03-06 12:13:15.134281800 -0500 > > +++ shell.el 2024-03-28 11:50:32.920026000 -0400 > > @@ -711,6 +711,7 @@ > > ((string-equal shell "ksh") "echo $PWD ~-") > > ;; Bypass any aliases. TODO all shells could use this. > > ((string-equal shell "bash") "command dirs") > > + ((string-equal shell "bash.exe") "command pwd -W") > > ((string-equal shell "zsh") "dirs -l") > > (t "dirs"))) > > ;; Bypass a bug in certain versions of bash. > > > > may I push it? > > That's not really TRT, because it assumes every bash.exe is an MSYS > program (which might not be true: there's a Cygwin Bash, for example). I am pretty sure they are compatible in this way. > And we don't need to make such assumptions: > > (w32-application-type (executable-find "bash.exe")) > => msys > > I'm okay with installing the fix after you change it to use > w32-application-type (and verifying that it works in your case, of > course: I don't have MSYS2 Bash installed). done. > > Incidentally, why do you use `dirs` instead of `pwd` there? > > you use only the last dir anyway. > > I don't know, I'm not familiar with shell.el well enough. Just by > looking at the code, shell-resync-dirs does need to know all the > stack, so it could refresh the value of shell-dirstack, no? nope. `pwd` is already used for sh and ksh. only the last line of `dirs` output is ever used. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 21:20:56 2024 Received: (at 70012-done) by debbugs.gnu.org; 5 Oct 2024 01:20:56 +0000 Received: from localhost ([127.0.0.1]:36982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swtTc-0001yi-Cg for submit@debbugs.gnu.org; Fri, 04 Oct 2024 21:20:56 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:56750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swtTa-0001yT-B8 for 70012-done@debbugs.gnu.org; Fri, 04 Oct 2024 21:20:54 -0400 Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5c5bca6603aso3234598a12.1 for <70012-done@debbugs.gnu.org>; Fri, 04 Oct 2024 18:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728091185; x=1728695985; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=Jtzhz5IE52JGxiZ9gDcnTf9/zhlVAxXyS7YQuxcOVyw=; b=NaR6A21Knhemackz4DcyR1BGRIYwiGggbdtZ10WdSs/aiSwafPZmONdhUZ6tQQKHMb m1XBgHaPun1fhrdFFZj5EJCWLVOiq4TXXhwGuU2gvba9jnWnYLBiJBs/Zq56dYY2k1DF gfyj7wRCBMk3q7QzMBY/2W2qWmX2lBmqkAeRyJY0GounIFHNC+GuRJ4JY3WQsRReFA5o MFHclBMghskvlaDpe1O+yXqsu7R0Uf86c+JvMXavvpKufZ1eFuiFCEXJmnQYYMUx2gHI 0uavCdUJGAaqQlQJ3HcGW7Yl0CwZdqSKUb6c9424WWvoQ2zn/OFKngux3NevkQ8JPnaI Tm4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728091185; x=1728695985; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jtzhz5IE52JGxiZ9gDcnTf9/zhlVAxXyS7YQuxcOVyw=; b=q3qYsrSvw9YD6kOQVhZgLd/z8kw7jwn2MjBXgxwZUNTdnYB7/bspoZcW6mNsfsKFui aXU1C+ONNHtSf5GySkgEWI50L9cfQQigJLXhYbx2ysrSAbV5+bkTzcLqcHWEp/72zWSv o19TAgsHwx+MrTqUivNKvNxgRHMi8XnnPvFxXT5/C6vch6nDilnxRo1f7AivI79k+NaK UbI3MSw6oEM3MaKmLHoWyAK8Cn1ifG4JjtwDjjrdmwY3cIQ0HoENGbiVRgRJ5TkrxvxD TQghUSdj+K3HQ3Cgnvk+P6Olv40v5ZGgdjUV2bwWJAEJf3AMemUaezO63DKHSyi0RP4a P2tg== X-Forwarded-Encrypted: i=1; AJvYcCVgdhmqmE8hHMhexyzxHRGBkKUeDci5KYHTasxHMuLk9/nYMXDC9paPWchrWRr9h5l3qkz6kLLyI+8b@debbugs.gnu.org X-Gm-Message-State: AOJu0YzcoBjhA66VY00nbHX7g1b3s2eB9lIFvsA8Y3AxfsHStmyg+aOz Zfv7TpRmMHf+JAc+f5qrYKAfLygCqDvO6sL4SWvlp72Wm+eA+y/mMvJEESiwU+VFaOtlb2p/JXM CyKaLs5xcbXm2vD5Gw9kVJO1Fqpw= X-Google-Smtp-Source: AGHT+IHTX7Sq6eg0Q/1PlT+MNosCGxfVSj9KQ7XjUsQ+vqC+nCP4nxj/f9lyhapymAvUJCh2iLqDmYrq087S07DKkTo= X-Received: by 2002:a05:6402:40cf:b0:5c5:c059:63c6 with SMTP id 4fb4d7f45d1cf-5c8d2dfb647mr3344785a12.2.1728091184672; Fri, 04 Oct 2024 18:19:44 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 4 Oct 2024 18:19:44 -0700 From: Stefan Kangas In-Reply-To: <86v859hr60.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 Mar 2024 18:52:07 +0200") References: <86v859hr60.fsf@gnu.org> MIME-Version: 1.0 Date: Fri, 4 Oct 2024 18:19:44 -0700 Message-ID: Subject: Re: bug#70012: shell-resync-dirs broken on windows To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70012-done Cc: Sam Steingold , 70012-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 70012 notabug wontfix > thanks > >> From: Sam Steingold >> Date: Tue, 26 Mar 2024 12:25:13 -0400 >> >> Windows emacs 29.2 >> Msys2 bash dirs returns something like "/c/foo" for "c:/foo" and (file-directory-p "/c/foo") returns nil even >> though "c:/foo" is a directory. >> Thus shell-resync-dirs goes into an infinite loop. > > Sorry, the native Windows build of Emacs is not supposed to support > MSYS- or Cygwin-specific magic in file names. We cannot support that > without significant complications in the low-level code, and even if > that code can be made to work, users are not supposed to give up > top-level directories named /x (where 'x' is a letter). > > If you want these names supported, try the Cygwin or Cygw32 build > instead (but I'm not sure even those builds support /c/foo/bar file > names). > > This is not a bug, and we should not even try fixing it. IOW, using > MSYS Bash in shell buffers is not supported in the MS-Windows build. I'm therefore closing this bug report. From unknown Thu Aug 14 22:19:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 02 Nov 2024 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator