Subject: bug#64311: [PATCH] Fix shell-dirtrack-mode showing up as enabled in unrelated buffers

From: Eli Zaretskii <[email-masked]>
Date: Thu, 29 Jun 2023 21:10:14 +0300

> From: Vladimir Sedach <[email-masked]>
> Cc: [email-masked]
> Date: Thu, 29 Jun 2023 10:26:38 -0600
> 
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > So making the default value nil will solve the problem?
> 
> Yes, but you are asking the wrong question.

Am I?  Asking about the root cause of the problem is not wrong,
because it indicates how best to fix it.

> When I came upon this problem, the first questions I had were: what
> is the variable shell-dirtrackp, and why is it aliased to
> shell-dirtrack-mode?

Why would we bother about that?  With the exception of the default
value, what harm does that variable cause by existing?

> This is why I came up with a fix that follows the X-mode control
> variable convention, marks the redundant variable obsolete, replaces
> any leftover references to the redundant variable with
> shell-dirtrack-mode, and adds unit tests for the control paths of the
> affected code.

Sorry, I'm not interested in making changes unrelated to the problem.
Making a variable obsolete causes Emacs emit annoying messages when
the variable is used, and that can be justified only if the variable
gets in the way.  This one doesn't.

So I think we should just make the default value nil, and be done.