help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Modular Configuration: the preferable way.


From: Lars Ingebrigtsen
Subject: Re: Emacs Modular Configuration: the preferable way.
Date: Tue, 22 Jun 2021 14:50:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Philip Kaludercic <philipk@posteo.net> writes:

> Does it really make a difference in a personal configuration, especially
> when you don't use Windows or other non /-delimiting systems?

No, the code here is fine, and I think chiding people for writing
perfectly find code is counterproductive.  It's not what I'd put in a
general library meant for redistribution, but nobody has any obligation
to write code on any particular form for their own usage.

Besides, `expand-file-name' has annoying corner cases, and Emacs should
really grow a variation that's actually sound and reliable instead of
the current DWIM-ish mess.  For instance, the following loop might
signal an error:

(dolist (file (directory-files "/tmp/"))
  (unless (string-match "^/tmp" (expand-file-name file "/tmp"))
    (error "boom")))

while

(dolist (file (directory-files "/tmp/"))
  (unless (string-match "^/tmp" (format "/tmp/%s" file))
    (error "boom")))

never will.  To see the difference, say

$ touch "/tmp/~$USER"

first.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]