unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Richard Copley <rcopley@gmail.com>
Cc: 57353-done@debbugs.gnu.org
Subject: bug#57353: [PATCH] Fix parse-colon-path with UNC directory names
Date: Wed, 24 Aug 2022 19:21:47 +0300	[thread overview]
Message-ID: <835yih6290.fsf@gnu.org> (raw)
In-Reply-To: <CAPM58oj_Mm+0DFYSeHdRUY1Bup5t8Rm5KfTGBNadLiGshb=J2Q@mail.gmail.com> (message from Richard Copley on Wed, 24 Aug 2022 15:23:56 +0100)

> From: Richard Copley <rcopley@gmail.com>
> Date: Wed, 24 Aug 2022 15:23:56 +0100
> Cc: 57353@debbugs.gnu.org
> 
> On Wed, 24 Aug 2022 at 15:15, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > Does the patch below give good results in your use cases?
> >
> > diff --git a/lisp/files.el b/lisp/files.el
> > index 8596d9a..26730df 100644
> > --- a/lisp/files.el
> > +++ b/lisp/files.el
> > @@ -856,10 +856,16 @@ parse-colon-path
> >                  (if (equal "" f) nil
> >                    (let ((dir (file-name-as-directory f)))
> >                      ;; Previous implementation used `substitute-in-file-name'
> > -                    ;; which collapse multiple "/" in front.  Do the same for
> > -                    ;; backward compatibility.
> > -                    (if (string-match "\\`/+" dir)
> > -                        (substring dir (1- (match-end 0))) dir))))
> > +                    ;; which collapses multiple "/" in front, while
> > +                    ;; preserving double slash where it matters.  Do
> > +                    ;; the same for backward compatibility.
> > +                    (if (string-match "\\`//+" dir)
> > +                        (substring dir
> > +                                   (- (match-end 0)
> > +                                      (if (memq system-type
> > +                                                '(windows-nt 'cygwin 'ms-dos))
> > +                                          2 1)))
> > +                      dir))))
> >                (split-string spath path-separator)))))
> >
> >  (defun cd-absolute (dir)
> 
> It does.

Thanks, installed with minor changes, and closing the bug.





      reply	other threads:[~2022-08-24 16:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 11:34 bug#57353: [PATCH] Fix parse-colon-path with UNC directory names Richard Copley
2022-08-23 13:21 ` Eli Zaretskii
2022-08-24 14:15   ` Richard Copley
2022-08-24 14:15   ` Eli Zaretskii
2022-08-24 14:23     ` Richard Copley
2022-08-24 16:21       ` Eli Zaretskii [this message]

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=835yih6290.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=57353-done@debbugs.gnu.org \
    --cc=rcopley@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 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).