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: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 12351 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#12351: 24.1; parse-colon-path turns empty paths into nil
Date: Sun, 30 Dec 2012 22:08:57 -0500
on Sun Dec 30 2012, Andreas Schwab <schwab-AT-linux-m68k.org> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
>> The following function is buggy because of the original bug:
>>
>> (defun osx-plist-update-exec-path ()
>>   "Update `exec-path' from the PATH environment variable."
>>   (let ((path (getenv "PATH")))
>>     (mapc (lambda (dir)
>>             (add-to-list 'exec-path dir))
>>           (parse-colon-path path)))
>>   exec-path)
>
> In which way is this buggy, apart from the fact that it reverses the
> path (which has nothing to do with the behaviour of parse-colon-path)?

It puts nils in exec-path when PATH contains empty elements.

-- 
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 200 days ago.

Previous Next


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