unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
	Stephen Berman <stephen.berman@gmx.net>
Subject: Re: let*: Wrong type argument: stringp, nil
Date: Tue, 28 Sep 2021 16:24:34 +0800	[thread overview]
Message-ID: <CAGP6POJ8A1Gj=dt4=s4QV-vwjhbR2g58VU3ZVQRR4eJf39V8ew@mail.gmail.com> (raw)
In-Reply-To: <CAP_d_8Xmz_WgxPsgwd=VgY1J9TB+eL8joydA46sXb6hM7Hf9Kw@mail.gmail.com>

On Tue, Sep 28, 2021 at 4:02 PM Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
> On Tue, 28 Sept 2021 at 10:08, Hongyi Zhao <hongyi.zhao@gmail.com> 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	other threads:[~2021-09-28  8:24 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 14:52 let*: Wrong type argument: stringp, nil Hongyi Zhao
2021-09-24 14:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-25  1:29   ` Hongyi Zhao
2021-09-25 23:42     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-25 10:09 ` Stephen Berman
2021-09-25 10:45   ` Hongyi Zhao
2021-09-25 11:04     ` Stephen Berman
2021-09-25 13:49       ` Hongyi Zhao
2021-09-25 14:45         ` Stephen Berman
2021-09-25 15:03           ` Hongyi Zhao
2021-09-28  3:08             ` Hongyi Zhao
2021-09-28  3:21               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  3:24                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  5:25                 ` Hongyi Zhao
2021-09-28  7:20                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  8:02               ` Yuri Khan
2021-09-28  8:24                 ` Hongyi Zhao [this message]
2021-09-29  1:43                 ` Hongyi Zhao
2021-09-29  2:03                   ` Hongyi Zhao
2021-09-29  3:02                     ` Hongyi Zhao
2021-09-29  3:57                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-29  6:15                         ` Hongyi Zhao
2021-09-29  6:29                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-29  7:37                             ` Hongyi Zhao
2021-09-29  8:21                               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-29  9:02                                 ` Hongyi Zhao
2021-09-29  9:14                             ` Yuri Khan
2021-09-29 10:29                               ` Hongyi Zhao
2021-09-29 12:29                                 ` Yuri Khan
2021-09-29 12:49                                   ` Hongyi Zhao
2021-10-08  3:36                                     ` Hongyi Zhao
2021-10-10 14:05                                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-30  3:38                               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-29  4:35                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-29  6:17                     ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGP6POJ8A1Gj=dt4=s4QV-vwjhbR2g58VU3ZVQRR4eJf39V8ew@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stephen.berman@gmx.net \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).