GNU bug report logs - #12351
24.1; parse-colon-path turns empty paths into nil

Previous Next

Package: emacs;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Tue, 4 Sep 2012 19:06:01 UTC

Severity: normal

Found in version 24.1

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dave Abrahams <dave <at> boostpro.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12351 <at> debbugs.gnu.org
Subject: bug#12351: 24.1; parse-colon-path turns empty paths into nil
Date: Sun, 30 Dec 2012 14:53:44 -0500
on Sun Dec 30 2012, Glenn Morris <rgm-AT-gnu.org> wrote:

> Dave Abrahams wrote:
>
>> (parse-colon-path ":") yields (nil nil) but there's nothing in the
>> docstring to indicate that empty path entries will get turned into nil.
>> Either the docstring needs to be updated, or parse-colon-path should
>> return (delq nil cd-list).
>
> Making a change equivalent to the latter has caused
>
> http://debbugs.gnu.org/13296
>
> Obviously we need the nils to remain, so I will put them back and just
> mention that empty elements return nil. It's not worth handling the
> minor aesthetic annoyance of (nil nil) specially.

FWIW, I disagree. IMO you should at least consider fixing eshell and any
other things that break because of this change.  This discontinuity in
behavior is not merely aesthetic; it makes parse-colon-path difficult to
use correctly and leads to hard-to-find bugs in any code that fails to
account for the possible nils.

-- 
Dave Abrahams
BoostPro Computing                  Software Development        Training
http://www.boostpro.com             Clang/LLVM/EDG Compilers  C++  Boost




This bug report was last modified 12 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.