|
From: | Emanuel Berg |
Subject: | Re: let*: Wrong type argument: stringp, nil |
Date: | Wed, 29 Sep 2021 08:29:10 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hongyi Zhao wrote: > The code I’ve modified looks like this: > > (defun try/pyvenv-workon () > (when (buffer-file-name) > (let ((file (concat (locate-dominating-file (buffer-file-name) > ".python-version") ".python-version"))) > (when (file-exists-p file) > (pyvenv-workon > (with-temp-buffer > (insert-file-contents file) > (nth 0 (split-string (buffer-string))))))))) > > Any further improvement tips? concat -> format ".python-version" hardcoded twice nth 0 -> car -- underground experts united https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |