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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25025: python-shell-calculate-command is wrong


From: Clément Pit--Claudel
Subject: bug#25025: python-shell-calculate-command is wrong
Date: Sat, 26 Nov 2016 21:35:10 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 2016-11-26 19:50, Noam Postavsky wrote:
> Well, CMD can also come from user input, so we would need some way for
> the user to specify a list of arguments. Currently that can work by
> entering a string that would be split by split-string-and-unquote. It
> might be more intuitive to actually use a shell and then the user
> would enter a shell command (though inserting a shell into things
> might bring more complications).

On that topic, I feel that Emacs is missing a solid, standard thing like 
python's shlex.  split-string-and-unquote is entirely inadequate to split shell 
commands (it's a great tool, but isn't a mistake to use it on user-supplied 
command lines?):

  (split-string-and-unquote "python -c 'print \"a\"'")
  ⇒ ("python" "-c" "'print" "a" "'")

John's eshell has such parsing features, but I've never seen them used in other 
packages; is there a good reason?

Cheers,
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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