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: Wed, 29 Sep 2021 15:37:52 +0800 Message-ID: References: <87lf3lrmos.fsf@gmx.net> <87ee9csyp0.fsf@gmx.net> <87a6k0sogz.fsf@gmx.net> <87lf3gqbi7.fsf@zoho.eu> <87r1d7q4i1.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="31239"; 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 Wed Sep 29 09:40:54 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 1mVUD0-0007v1-Mp for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 29 Sep 2021 09:40:54 +0200 Original-Received: from localhost ([::1]:41716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVUCz-0001E5-JX for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 29 Sep 2021 03:40:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVUAI-0008ID-F2 for help-gnu-emacs@gnu.org; Wed, 29 Sep 2021 03:38:06 -0400 Original-Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]:37779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVUAG-00050e-VH for help-gnu-emacs@gnu.org; Wed, 29 Sep 2021 03:38:06 -0400 Original-Received: by mail-vk1-xa33.google.com with SMTP id g192so83157vkf.4 for ; Wed, 29 Sep 2021 00:38: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=MkV8EkSG/5ooUSzkOm5U1LzriGTbQi/04iKV4MR/oOQ=; b=SJrHV31BVEHbmxKJkQTJAOnONLDzpxPudWABk2oYEhRVgnBRw7DeCSy7rePskuqMrN rv6l4qfwvRZj1m0NBbKmGm1kP4NIsANxNViGHq+sjavbqn5aE6g/zWQ9echl7n6ZVyk/ Z3YRCJD7p9AERO24pwfVIweGX335r0nKUrsVcDvlvESn3G3aBO/o1HM1yEIN81H0BV5I srxd/kgzjsf0hHtHy3frkCpkoIzkRzYIVOsoSmUiPHcKLdsiJ2ATDyGG5RmUCPvi2XDX n7KWqvgHMpSB6VJ8BMpXgPODsWRA0EUyCNygtTyW0z5zQxvXLQABn4hj47KCwV0zWAPp 5m5A== 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=MkV8EkSG/5ooUSzkOm5U1LzriGTbQi/04iKV4MR/oOQ=; b=tv7udXjyMqlXGFQfOrSh5r5yTQY9MEohyuNHG5K3u2lj6VCyg+smrIXC5kvOaVqNN9 o99ady4zvhgwVJitVY00NfkwljC0npOwa4T0SAkIT+jat1VNJ0lr/heMau5h0sCEf9o+ MhNBM+9ZwlSgo8tFRlAWObnrfDh3Itd38cKZ+TBSIOkt9DC2+y2OgKM0H/NfC7mTwI3K xT2YFAjOaJlny9zhSqF8WPq4/SxROn8v2up+GglFO5N6xMa8x3+fX52GHOJcWlwiI3l9 fMRGjNvJiOC+BwVaPcmYG9q1ZC458E1v9LF3ig8sLdpatFiZbEStNo+4pudhVUglfhYX z81Q== X-Gm-Message-State: AOAM531ln4Eib/OIxptcCgQa/Kv7AIXEfdZyguQw6HA+bxgaOdNm7hc+ Mg1UW56XFhQMsK9CCXRZKPuLD7v4EtnrbxevHHq3n+o19Bp8PgQY X-Google-Smtp-Source: ABdhPJwmgWPCGSEQNqyuwllbELU5N9COAUL8BB9gC5obFgaRBivR2OIzNp37ZeRLZ1cDdyrkFmTrdDI9az1Fn2XkAjw= X-Received: by 2002:a05:6122:2c3:: with SMTP id k3mr8233446vki.6.1632901083502; Wed, 29 Sep 2021 00:38:03 -0700 (PDT) In-Reply-To: <87r1d7q4i1.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::a33; envelope-from=hongyi.zhao@gmail.com; helo=mail-vk1-xa33.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:133380 Archived-At: On Wed, Sep 29, 2021 at 2:29 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > concat -> format > > ".python-version" hardcoded twice > > nth 0 -> car Thanks again. Then, is there room for further improvement in the following code? (defun try/pyvenv-workon () (when (buffer-file-name) (let* ((python-version ".python-version") (venvdir (locate-dominating-file (buffer-file-name) python-version))) (when venvdir (pyvenv-workon (with-temp-buffer (insert-file-contents (format "%s%s" venvdir python-version)) (car (split-string (buffer-string))))))))) HZ