all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Colton Goates <coltongoates@gmail.com>
To: Ship Mints <shipmints@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 74524@debbugs.gnu.org
Subject: bug#74524: 29.4; dirtrack-mode
Date: Tue, 26 Nov 2024 11:11:20 -0700	[thread overview]
Message-ID: <CAJkz86tPfAiMLfo7dhT+jpOiBVRSJrRQkR-xsiu1TSFyq78cpg@mail.gmail.com> (raw)
In-Reply-To: <CAN+1HbrYM=tB4x7cm2HOPT_qaswfFFHM-09BhXVxi_DY=UOd2Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]

I also default my shell to bash. I might look into wezterm to see if I can
get it working with that one. Thanks for the tip about buffer local

On Tue, Nov 26, 2024 at 7:00 AM Ship Mints <shipmints@gmail.com> wrote:

> Check that your default shell supports the function. I understand later
> macOS defaults to zsh which I have no experience with. I use macOS but I
> default my shell to bash. If you have an alternate terminal like
> Wezterm you could verify your shell settings there
> https://wezfurlong.org/wezterm/shell-integration.html#osc-7-escape-sequence-to-set-the-working-directory
>
> As far as your osc filter goes, I think it would be better to install it
> buffer-locally in a shell-mode-hook so you don't interfere with other
> comint uses.
>
>   (defun my/shell-mode-hook ()
>     (shell-dirtrack-mode -1)
>     (add-hook 'comint-output-filter-functions #'comint-osc-process-output
> nil 'local))
>   (add-hook 'shell-mode-hook #'my/shell-mode-hook)
>
> On Tue, Nov 26, 2024 at 3:16 AM Colton Goates <coltongoates@gmail.com>
> 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 AM Eli Zaretskii <eliz@gnu.org> wrote:
>>
>>> > From: Colton Goates <coltongoates@gmail.com>
>>> > 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?
>>>
>>

[-- Attachment #2: Type: text/html, Size: 3876 bytes --]

  reply	other threads:[~2024-11-26 18:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  3:55 bug#74524: 29.4; dirtrack-mode Colton Goates
2024-11-25 12:38 ` Eli Zaretskii
2024-11-25 17:27   ` Colton Goates
2024-11-25 18:55     ` Eli Zaretskii
2024-11-25 19:08       ` Ship Mints
2024-11-26  2:32         ` Colton Goates
2024-11-26  2:11       ` Colton Goates
2024-11-26 14:00         ` Ship Mints
2024-11-26 18:11           ` Colton Goates [this message]
2024-11-26 14:32         ` Eli Zaretskii
2024-11-26 14:46         ` Ship Mints
2024-11-26 18:05           ` Colton Goates

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJkz86tPfAiMLfo7dhT+jpOiBVRSJrRQkR-xsiu1TSFyq78cpg@mail.gmail.com \
    --to=coltongoates@gmail.com \
    --cc=74524@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=shipmints@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.