unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: 31.0.50; shell, virtualenv
Date: Mon, 16 Dec 2024 09:51:52 +0100	[thread overview]
Message-ID: <1c08db0b-270c-48e0-a5e0-6092bfee40ef@easy-emacs.de> (raw)

Have in init a command like that:

(defun aktivate-My-shell-virtualenv-root()
   (interactive)
   (when (boundp 'My-shell-virtualenv-root)
     (unless (string= "" My-shell-virtualenv-root)
       (dired My-shell-virtualenv-root)
       (setq default-directory My-shell-virtualenv-root)
       (shell)
       (virtualenv-activate My-shell-virtualenv-root))))

When calling this, get an error like:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
   find-file-name-handler(nil file-remote-p)
   file-remote-p(nil)
   with-connection-local-variables-1(#f(compiled-function () #<bytecode 
0x16056352af86ac49>))
   shell()
   (if (string= "" My-shell-virtualenv-root) nil (dired 
My-shell-virtualenv-root) (setq default-directory 
My-shell-virtualenv-root) (shell) (virtualenv-activate 
My-shell-virtualenv-root))
   (progn (if (string= "" My-shell-virtualenv-root) nil (dired 
My-shell-virtualenv-root) (setq default-directory 
My-shell-virtualenv-root) (shell) (virtualenv-activate 
My-shell-virtualenv-root)))
   (if (boundp 'My-shell-virtualenv-root) (progn (if (string= "" 
My-shell-virtualenv-root) nil (dired My-shell-virtualenv-root) (setq 
default-directory My-shell-virtualenv-root) (shell) (virtualenv-activate 
My-shell-virtualenv-root))))
   aktivate-My-shell-virtualenv-root()

The error goes away, when the custom-file is loaded manually before 
evaluating.

A bug?

Cheers,

Andreas

GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.16.0) of 2024-12-11




             reply	other threads:[~2024-12-16  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16  8:51 Andreas Röhler [this message]
2024-12-16  9:20 ` 31.0.50; shell, virtualenv Jean Louis

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=1c08db0b-270c-48e0-a5e0-6092bfee40ef@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    /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).