help-gnu-emacs
[Top][All Lists]
Advanced

[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: Wed, 29 Sep 2021 17:02:12 +0800

On Wed, Sep 29, 2021 at 4:21 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> Looks good to me.

Thank you for your comment and help. In order to be more in line with
the actual situation, I replaced the variable name `venvdir'  with
`project-dir':

  (defun try/pyvenv-workon ()
    (when (buffer-file-name)
      (let* ((python-version ".python-version")
             (project-dir (locate-dominating-file (buffer-file-name)
python-version)))
        (when project-dir
          (pyvenv-workon
            (with-temp-buffer
              (insert-file-contents (format "%s%s" project-dir python-version))
              (car (split-string (buffer-string)))))))))

HZ



reply via email to

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