[Top][All Lists]

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

Re: let*: Wrong type argument: stringp, nil

From: Hongyi Zhao
Subject: Re: let*: Wrong type argument: stringp, nil
Date: Tue, 28 Sep 2021 16:24:34 +0800

On Tue, Sep 28, 2021 at 4:02 PM Yuri Khan <> wrote:
> On Tue, 28 Sept 2021 at 10:08, Hongyi Zhao <> wrote:
> > Now I'm trying another test code snippet based on the idea posted here [1]:
> >
> >     (while (not (file-exists-p ".python-version"))
> >           (cd "..")
> >     ))
> >
> > But when I test the above code in scratch buffer, it seems to be stuck
> > in an endless loop and running there all the time. Any hints for this
> > problem?
> You’re not handling the case here that you reached the root directory
> without finding a .python-version file.
> You will really get better results if you use locate-dominating-file.
> If you’re trying to learn, learn by reading that function. As a bonus,
> it does not mess with the buffer’s default directory.

Thanks for the tip! I will give up further attempts on this path. If
available, I will first try to use and learn by reading the source
code of the Emacs built-in functions.

Best, HZ

reply via email to

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