emacs-devel
[Top][All Lists]
Advanced

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

Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbo


From: Philip Kaludercic
Subject: Re: NonGNU ELPA: Conditions for accepting a potential new package 'rmsbolt' ?
Date: Tue, 27 Feb 2024 17:27:58 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> -(defun rmsbolt--convert-file-name-to-system-type (file-name)
>>> +(defun rmsbolt--convert-file-name-to-system-type (file-name) ;perhaps use
>>> `convert-standard-filename'?
>>
>> Right now, a contributor is trying to improve this area/enable tramp
>> support - so I'd like to keep this as stable as possible while they do
>> so.  But this is a great suggestion - I'll let them know about this function
>> and hopefully it will help them in their change as well!
>
> I haven't looked at the code but I'll point out that
> `convert-standard-filename` is meant to *define* the name of a "standard"
> file, so its argument is usually very static.
> It doesn't make sense to apply it to something like `buffer-file-name`
> which is already supposed to be a valid filename.

In that case I must have misunderstood something, my intention was to
find a function that would convert file names with forwards slashes to
the proper file delimiters on the current system.

> Also, I see:
>
>           (rmsbolt--convert-file-name-to-system-type
>            (shell-quote-argument
>
> which is very weird.  The reverse would make more sense.
>
> Also I think `shell-quote-argument` should be applied to most parts of
> `rmsbolt--demangle-command`.  This function is also odd in that it
> calls `rmsbolt--convert-file-name-to-system-type` on the files
> of the demangler but not those of the `mv`.

IIUC shell-quote-argument cannot be used, since rmsbolt is actually
creating a shell command out of a list, where each element of the list
is not necessarily a command line argument.  E.g. there were some places
where "&&" or ">" were being used, and quoting those would break the
intended functionality.  I have to admit that the process of creating
commands this way seems fragile, but there is a lot of code that would
take a while to rewrite and verify that it doesn't break anything.  (A
different idea would be to have a defstruct for each command that would be
prepared into a list and in the end executed in order, ideally using
some function like `process-file').

-- 
        Philip Kaludercic on peregrine



reply via email to

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