[Top][All Lists]

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

Re: readable-not-found

From: Andreas Röhler
Subject: Re: readable-not-found
Date: Wed, 9 Mar 2022 19:47:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Am 09.03.22 um 13:20 schrieb Emanuel Berg via Users list for the GNU Emacs text editor:
Andreas Röhler wrote:

Have the following load-test.el in some ~/testdir/ :

(if (file-readable-p "../test.el")
   (load "../test.el" nil t))
(defun load-if-exists (file)
   (if (file-exists-p file)
       (load-file file)
     (message "The file %s does not exist." file) ))

Didn't use load-file, as assumed designed for interactive use.

When looking into its definition, it's expand-file-name which does it:

(load (expand-file-name "../test.el") nil t)

Thanks all!

reply via email to

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