emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: Eli Zaretskii
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Tue, 20 Oct 2015 19:51:23 +0300

> From: address@hidden (Taylan Ulrich Bayırlı/Kammer)
> Cc: address@hidden
> Date: Tue, 20 Oct 2015 18:31:00 +0200
> 
> > This is not about non-Posix shells (although that aspect did start
> > this thread).  This is about using project-wide APIs for certain
> > standard jobs.  That should have been a no-brainer, because it makes
> > no sense to have several functions doing the same job in subtly
> > different ways.
> >
> > So you were politely requested to call that function for quoting shell
> > arguments in your package.  Doing that is the only thing that stands
> > in the way of accepting your package on ELPA.  AFAIK, there were no
> > other comments.
> >
> > If you think shell-quote-argument should be changed, feel free to
> > submit a patch proposal to that effect, and state there your reasons
> > for the changes.  If they are accepted, all Lisp programs in Emacs
> > that need to quote command arguments will work that way, and everybody
> > will win by having a better Emacs.
> 
> I've already provided an extensive explanation of the problem with
> shell-quote-argument, what the solution to that problem is, and provided
> a patch to apply that solution.
> 
> The patch was turned down.  (By you.)

That was about the documentation.  I understood, perhaps incorrectly,
that you also thought the code of the function needed some changes.
At least your alternative implementation quotes slightly differently,
e.g. it quotes even if the string doesn't need any quoting (because it
includes only characters from the Posix portable set).  It also quotes
'like this', whereas shell-quote-argument uses backslashes.

> > I cannot understand why you insist on tying your contribution with two
> > orthogonal issues: what and how should be quoted, and what should be
> > in the doc string.  By doing this, you prevent acceptance of your
> > package, which IMO is a pity.
> 
> I don't know what you mean with "what and how should be quoted."

See above; I hope now what I meant is clear.

> The doc string can serve as a clear declaration of strict safety
> guarantees that will make the function appropriate for my use case.
> Until that's done, the function is not appropriate for my use case
> because it does not declare the guarantees necessary for my use case.

Documentation cannot change what the code does.  If the function will
be appropriate after changing its doc string, it is appropriate now.

> In practical terms, as explained before, this means that someone editing
> the function in the future may insert bugs into it which, from what I've
> gathered from other posts in the thread, it indeed also had in the past.

Documentation cannot prevent such incidents.  However, we can make
this harder by adding tests for this function.  There already are 3
tests that use it, and we can add more if needed.  Patches to add such
tests are welcome.

The upshot is that it's a pity to hold off a package for reasons that
can and should be taken care of independently and orthogonally.

> It has also not been verified whether it's void of such bugs for systems
> other than POSIX, which is why I left declaring that to you; my patches
> were only adding the declaration of safety for POSIX, which I've made
> very sure of and gladly take responsibility for.

The test suite runs on all supported systems, including MS-Windows,
and the tests all succeed.  This function is quite old, so any
problems with it should have been reported long ago.  The issue with
an embedded newline doesn't exist on MS-Windows at all.

> All of these things I've already said before, multiple times, with
> different wording, every time as clearly as I could.

I'm still hoping you will change your mind.




reply via email to

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