unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: phil@hagelb.org, 49918@debbugs.gnu.org
Subject: bug#49918: 28.0.50; cd function expands CDPATH incorrectly
Date: Sat, 07 Aug 2021 15:17:18 +0300	[thread overview]
Message-ID: <835ywhih4h.fsf@gnu.org> (raw)
In-Reply-To: <87wnox7ck5.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat,  07 Aug 2021 12:51:22 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sat, 07 Aug 2021 12:51:22 +0200
> Cc: 49918@debbugs.gnu.org
> 
> > This happens because of this snippet inside the `cd' function:
> >
> >     (unless cd-path
> >       (setq cd-path (or (parse-colon-path (getenv "CDPATH"))
> >                         (list "./"))))
> 
> Yup.  Thanks for the detailed analysis.
> 
> This should now be fixed in Emacs 28.

Why does the current implementation of parse-colon-path use
expand-file-name?  The comment says "to expand "~", but the original
implementation in Emacs 27 didn't do that.

Bug#21454 only wanted to avoid mis-interpreting duplicate slashes in
the input path, but there's no need to collapse them, so I don't see
how the call to expand-file-name is at all necessary, and could
potentially change behavior in unintended ways.  Am I missing
something?





  reply	other threads:[~2021-08-07 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07  1:18 bug#49918: 28.0.50; cd function expands CDPATH incorrectly Phil Hagelberg
2021-08-07 10:51 ` Lars Ingebrigtsen
2021-08-07 12:17   ` Eli Zaretskii [this message]
2021-08-07 15:50     ` Phil Hagelberg
2021-08-08 12:42     ` Lars Ingebrigtsen
2021-08-08 14:32       ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=835ywhih4h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49918@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=phil@hagelb.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).