unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: John Sullivan <john@wjsullivan.net>
Cc: emacs-devel@gnu.org
Subject: Re: python.el: why remove '' from sys.path?
Date: Sun, 15 Mar 2009 21:07:04 -0400	[thread overview]
Message-ID: <871vsy8edj.fsf@cyd.mit.edu> (raw)
In-Reply-To: <87eiwy7atr.fsf@ashbery.wjsullivan.net> (John Sullivan's message of "Sun, 15 Mar 2009 17:09:04 -0400")

John Sullivan <john@wjsullivan.net> writes:

> Why wouldn't the answer be to move '' to the end of sys.path, so that
> overloading the emacs module with something malicious in the current
> directory wouldn't be possible? Or how about checking the permissions of
> the current directory before removing '' from the path? Or checking an
> expected hash of the emacs and other imported-by-default modules?
>
> Having the current working directory be in the python path is pretty
> important to me and I think to other people as well. Moreover having the
> emacs python shell behave too differently from the standard python shell
> is a hassle.

I'm open to revisiting this.  IIRC, the issue with checking permissions
before removing '' from sys.path is that we weren't sure this would DTRT
on platforms like Windows.  As for moving '' to the end of sys.path,
that would itself be an incompatibility.

One thing to keep in mind here is that it may not be obvious to the user
that she is executing python code---if I understand correctly, the
python shell can be launched automatically when eldoc mode is on.




  reply	other threads:[~2009-03-16  1:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 18:40 python.el: why remove '' from sys.path? Eric Hanchrow
2009-03-13 18:58 ` Eric Hanchrow
2009-03-15 21:09   ` John Sullivan
2009-03-16  1:07     ` Chong Yidong [this message]
2009-03-16  1:46       ` John Sullivan

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=871vsy8edj.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=john@wjsullivan.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).