From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colton Goates Newsgroups: gmane.emacs.bugs Subject: bug#74524: 29.4; dirtrack-mode Date: Tue, 26 Nov 2024 11:05:57 -0700 Message-ID: References: <86iksbij3m.fsf@gnu.org> <867c8ri1o8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a466a40627d4b551" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4121"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74524@debbugs.gnu.org To: Ship Mints Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 27 02:59:23 2024 Return-path: Envelope-to: geb-bug-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 1tG7Kt-0000vr-Kr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Nov 2024 02:59:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG7Kb-0002Sb-7X; Tue, 26 Nov 2024 20:59:05 -0500 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 1tG7KZ-0002S4-Bv for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 20:59:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tG7KZ-0006j0-2f for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 20:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=PqhupYVZssP0OzKkfR5cY4OSE6rk29wA8+DS1PSBIhM=; b=t66zvwBAxL1eq4Jbma4gTq3DFffsxuNYlDNytMZn3qRiyUygPKdpbyerkytc0F8lGOqiI9MiaJ+weVyXTKigpJwpN5GQhAwaDZB44XqI5gBhmDebqIHsewB/I50J15SxX/AXk6j/HOgWEX1cVRP0tohZQg66jlHsLk7eP3uZ5sVQXfqUn0D5pW5jSQQI2PvvOArgkB1BZ5A9ehYYOwXevJAyOfdtnhWMinRR4kPrDUOtX0vkv5VP3O+9/TDX5RGMV4+b139MrcYb01pTt+x+et0ZFkv8FaE906IRVyucngaQR6BFot0ULsThyqClByU1F27qSrnU7aFclJ2fS3aQvw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tG7KY-0006Pf-KF for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 20:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Colton Goates Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Nov 2024 01:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74524 X-GNU-PR-Package: emacs Original-Received: via spool by 74524-submit@debbugs.gnu.org id=B74524.173267268324542 (code B ref 74524); Wed, 27 Nov 2024 01:59:02 +0000 Original-Received: (at 74524) by debbugs.gnu.org; 27 Nov 2024 01:58:03 +0000 Original-Received: from localhost ([127.0.0.1]:55716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG7Ja-0006Nb-8y for submit@debbugs.gnu.org; Tue, 26 Nov 2024 20:58:03 -0500 Original-Received: from mail-yb1-f174.google.com ([209.85.219.174]:45511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFzyJ-0007zh-0u for 74524@debbugs.gnu.org; Tue, 26 Nov 2024 13:07:35 -0500 Original-Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-e333af0f528so5235411276.3 for <74524@debbugs.gnu.org>; Tue, 26 Nov 2024 10:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732644394; x=1733249194; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PqhupYVZssP0OzKkfR5cY4OSE6rk29wA8+DS1PSBIhM=; b=Bw+7NRaVqGePRmPHHNap+wIaOIkaEM7JXjPkvOODXE9undqCvssR6Z3oUodDpPPAEp wQn3uHB+KUE/mrVCUawI0VsXqjpjmTNhWEV6wUGY0UURdpJdCTj8WjZJgt148L+pq1Lf sxFI4Y55xQktpQMIolztjJCpYW/LpGscWq2Z6HVZMmlVNyj+W26qA1Ysb0vBLScibDjY kfNhB4Z2CMt1Zdpdercm8wZ3tKSgt1syl/94hWF3f23uXXVJG5YHH3SPtmb+3F8pzfDU 1MVhKUs1kXq58dDlYyOXJcQMSmmb0jMbTE0uEU5GOkEFipSweYFVPdgS2fvcBIJPRire jhCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732644394; x=1733249194; 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=PqhupYVZssP0OzKkfR5cY4OSE6rk29wA8+DS1PSBIhM=; b=HvbCOSkxLBWJE96M/4AVy7PNKJLYPSqJKdb83jRs1Mzw2rRS4w453P1pd5Z6ExmLNm nm200XhqPN30P3xXgWXDC61fDDCAwyLaKjhSRiClkqqjiQIIKMlT2CM4YGMcqubhly9s ltyD1evscewnm4seIhG7yVluEni/dW9LaxvBgNDB8LBHsHwLOvRTDKHICMvAPG29+x/I YdMkRkY6HWfW7SgP8aX5eq4HUo6kTYUknGsVV2+dQyqPZmmUDxHcLFfPieeGYB3qE765 GlKO+KCFhZEq0kz7mi1c8jBvBHuxaTD2XTTuPrvKrI2Icynotjw6vM5dweas+g+fF/vY esGg== X-Gm-Message-State: AOJu0YxVtYvPbvmzvzDx6G7g9VEiZrS7K2OR/uLvbBHAbmaSaM3u9w4j S8+9tRu27aQH7Edezf7w/eIJujqiJv/5CFMkYLOWmd0a2Z1j5xNosHH1IOpCtsxj4wT0GYwz8or UyHwER4resZu6wBq8Y9YUCg1URXI= X-Gm-Gg: ASbGncvG6+SgrQVjr17NFVZ9j9jBmD96lyCCvaP87egs4MkCOJFCAa4s+AUYkJacWvI +YYo1QFr3RwzvnNpG2rV2yIV9gaEQ/SfMLVtC8oUW7C7fA9wFVG3DCYKd6uJpVIQ= X-Google-Smtp-Source: AGHT+IEU167rWb7eoSVWNAp10maTR0esVWOH3HvzqrueWI+P0/+enOgP4fLi3JsnF+tDQzrnSDud7mqqdeN2R6NkNK4= X-Received: by 2002:a05:6902:c09:b0:e38:b512:2c05 with SMTP id 3f1490d57ef6-e38f8be1ca1mr19025695276.33.1732644394260; Tue, 26 Nov 2024 10:06:34 -0800 (PST) In-Reply-To: X-Mailman-Approved-At: Tue, 26 Nov 2024 20:58:00 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296012 Archived-At: --000000000000a466a40627d4b551 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was referring to the bizarre edge case of a printed edge case that matches your regex. In that case, it will confuse the two. But like you said, OS7 is the way to go. I'll just try to get it working On Tue, Nov 26, 2024 at 7:46=E2=80=AFAM Ship Mints wr= ote: > You can customize dirtrack-list to a regexp that can detect your prompt > format. I'd still recommend using osc 7 support, though, as it's precise > (once you get it working) and tracking pushd popd cd, parsing your prompt= , > etc. is not necessary. > > On Tue, Nov 26, 2024 at 3:16=E2=80=AFAM Colton Goates > wrote: > >> I don't know how dirtrack would tell the difference between a prompt >> output and other printed output. I just thought of the edge case and >> decided to point it out in case someone knew of a solution. Thanks for >> responding. >> >> On Mon, Nov 25, 2024 at 11:55=E2=80=AFAM Eli Zaretskii wr= ote: >> >>> > From: Colton Goates >>> > Date: Mon, 25 Nov 2024 10:27:00 -0700 >>> > Cc: 74524@debbugs.gnu.org >>> > >>> > Coltons-MacBook-Pro:/Users/coltongoates/software-dev/$ isn't intended >>> to be a directory name, it's a string >>> > that's intended to look exactly like my prompt. (I know it's pretty >>> contrived.) >>> > >>> > So, if someone prints something that resembles their prompt, dirtrack >>> will change the directory, because >>> > dirtrack thinks it just saw the shell prompt appear, but it really >>> just saw a string that resembles the prompt. >>> > Does that make more sense now? >>> >>> What do you expect dirtrack to do when you deliberately try to deceive >>> it? AFAIU, dirtrack is a piece of heuristic ad-hocery (as explained >>> in its commentary), so it cannot be expected to survive such >>> deception. What kind of changes would you suggest to consider to >>> handle the cases such as this one? >>> >> --000000000000a466a40627d4b551 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I was referring to the bizarre edge case of a printed edge= case that matches your regex. In that case, it will confuse the two. But l= ike you said, OS7 is the way to go. I'll just try to get it working

On Tue, Nov 26, 2024 at 7:46=E2=80=AFAM Ship Mints <shipmints@gmail.com> wrote:
You can customize dirtrack-list= =C2=A0to a regexp=C2=A0that can detect your prompt format. I'd still re= commend using osc 7 support, though, as it's precise (once you get it w= orking) and tracking pushd popd cd, parsing your prompt, etc. is not necess= ary.

On Tue, Nov 26, 2024 at 3:16=E2=80=AFAM Colton Goates <coltongoates@gmail.com= > wrote:
=
I don't know how dirtrack would tell the difference be= tween a prompt output and other printed output. I just thought of the edge = case and decided to point it out in case someone knew of a solution. Thanks= for responding.

On Mon, Nov 25, 2024 at 11:55=E2=80=AFAM Eli Zaretskii = <eliz@gnu.org> = wrote:
> From= : Colton Goates <coltongoates@gmail.com>
> Date: Mon, 25 Nov 2024 10:27:00 -0700
> Cc: 74524@d= ebbugs.gnu.org
>
> Coltons-MacBook-Pro:/Users/coltongoates/software-dev/$ isn't inten= ded to be a directory name, it's a string
> that's intended to look exactly like my prompt. (I know it's p= retty contrived.)
>
> So, if someone prints something that resembles their prompt, dirtrack = will change the directory, because
> dirtrack thinks it just saw the shell prompt appear, but it really jus= t saw a string that resembles the prompt.
> Does that make more sense now?

What do you expect dirtrack to do when you deliberately try to deceive
it?=C2=A0 AFAIU, dirtrack is a piece of heuristic ad-hocery (as explained in its commentary), so it cannot be expected to survive such
deception.=C2=A0 What kind of changes would you suggest to consider to
handle the cases such as this one?
--000000000000a466a40627d4b551--