From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: let*: Wrong type argument: stringp, nil Date: Tue, 28 Sep 2021 13:25:51 +0800 Message-ID: References: <87lf3lrmos.fsf@gmx.net> <87ee9csyp0.fsf@gmx.net> <87a6k0sogz.fsf@gmx.net> <87y27hmlki.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14480"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 28 07:26:39 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mV5dX-0003aC-J4 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 07:26:39 +0200 Original-Received: from localhost ([::1]:34734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV5dW-0003Xe-GK for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 01:26:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV5d0-0003WD-Ac for help-gnu-emacs@gnu.org; Tue, 28 Sep 2021 01:26:06 -0400 Original-Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]:37418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV5cy-0007hC-HW for help-gnu-emacs@gnu.org; Tue, 28 Sep 2021 01:26:06 -0400 Original-Received: by mail-vk1-xa2e.google.com with SMTP id s125so7963327vkd.4 for ; Mon, 27 Sep 2021 22:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=kLSpVZv/PQ1sw8ANBFV5Ru1Q9IKx61Nc03NgHK6JQkk=; b=TqHpIw9/GiMc9MVEvogc9bCJYBwgb1jvLSAME1+j/QAVQuExD4r2T2MYgRR1n02yUQ Yfy6a+OW/20mwjKcE2fFCmuo8wcI6JPm/O/5pMT+toBc6loxTTi3j96PiLLOFPVI8145 ETjfH2OsO8FWVIuEgvLuL1Tqv8i8jUu1N7dbY9ghxxqc1Zrwx4p43PBqxrCwBaZvffHZ SMYw1iWA7ega40EcS0do/Z1BWpEFvpQ4KT8OVOivHhtcxhgycugF7l4sZrXcTEHshAeB DWy/Z5xlPVIBDR5G/ds9B42ENqrZs1VPNArl0HTpLQdt5W01ifLntzH9lMunq9k7Sn9D RTJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=kLSpVZv/PQ1sw8ANBFV5Ru1Q9IKx61Nc03NgHK6JQkk=; b=fvoJ+Goi3ep6feFKcO6KCQiHACWwTgFhmTQUR9ii77kna2vGqyDl3esb0wgva/7Wlo Erc0d9sk56Oif7B7nvjj2vtgWHssQdauNhQ5YdMMlV4RUtKk2e2hu1mngRWNQsP3odem uW0O943uhPUBTbWYwvZ5G2O5BTaI20qOeKVmluXstO7xDa+1IXtNs6PCu43V5mgEyevk cp/b0GKEE0BO9mX3YKSTSkMZKuXuPvL+gDrzwnYJG0qpKURcfWCljpKkRZHEEmr1mTQ9 Ee0heVihBxDvMcWrBnQwgcJY07A1n+6DnWxqDyvqZad3G1n3R8P+EbwCmLSa4GX58LTl p3DA== X-Gm-Message-State: AOAM531+JzVii3BqiAZqk6wR04RWfOUBsxVJL4frm9yGF5zxyu9pKyVA 7FdaylhOG/rwz2MbzBqzAbM+aGlh80Rl7k8Mv5E= X-Google-Smtp-Source: ABdhPJxwziGbA20uhts+z1HqaOXIFMipb3utnvWr83CJ6xFSooJTpQG/bO+fNHi9aNsX4NzW/j8pWmLOpiZAs/IHu/4= X-Received: by 2002:a05:6122:2c3:: with SMTP id k3mr3377539vki.6.1632806762450; Mon, 27 Sep 2021 22:26:02 -0700 (PDT) In-Reply-To: <87y27hmlki.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::a2e; envelope-from=hongyi.zhao@gmail.com; helo=mail-vk1-xa2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133325 Archived-At: On Tue, Sep 28, 2021 at 11:22 AM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > Now I'm trying another test code snippet based on the idea > > posted here [1]: > > > > (defun desperately-pyvenv-workon() > > "Traveling up the path, find a `.python-version' and activate the > > corresponding virtualenv." > > (interactive) > > (with-temp-buffer > > (unless (equal(getenv "HOME") default-directory) > > (while (not (file-exists-p ".python-version")) > > (cd "..") > > )) > > (when(file-exists-p ".python-version") > > (message(expand-file-name ".python-version"))))) > > > > (desperately-pyvenv-workon) > > > > [1] https://emacs.stackexchange.com/a/7477 > > > > 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. > > Eval this > > (cd "..") > > enough times and it alternates between "/" and "/../" > indefinitely, maybe that's what happens? > > (But I don't know why, or what it tries to say with "/../" > which should be equivalent to "/" ... in the shell, cd from / > does not lead to /../ but will stay in /) They are really equivalent: werner@X10DAi-00:/$ realpath -e /../ / werner@X10DAi-00:/$ realpath -e / /