On Linux: Macro executing shell command.

I have trouble dealing with spaces in Macros when I execute a shell command.
In my macro I have the following command as an example

Sub TEST

Shell " bash -c ‘/usr/bin/emacs /home/testuser/Path With Space/Readme.txt’"

End Sub

There is no way for me to escape the spaces in
" path with space ".
and emacs opens but therefore cannot find the the file Readme.txt.

I tried all the valid bash escapes bhut it seems to clash with libreoffices shell command in macros which requires doublequotes and negates all valid bash escapes

How do I make the spaces be ignored in the path name so9 that emacs find the file ?

Hello,

On Ubuntu 20.04 and a directory named A Space Folder the simple text editor is Pluma. Each of these commands worked:

shell "bash -c 'pluma /home/My_Directory/A\ Space\ Folder/Tester'"

shell "bash -c 'pluma /home/My_Directory/""A Space Folder""/Tester'"

using \ to escape the space and quoting the directory name.

Thank you very much that solves it. I tried double quotes but never tried double-double quotes, no clue why that works but it does. I tried standard escapes such as '/ in front of spaces which always works without shell command in straight bash, but likewise dont know why the single backslash suddenly works here.

Anyway, boith works thanks. I was breaking my head over this pesky problem. Bash is a bit of an Art already and it becomes superstition once it is called by other programs.

When you want to include quotes within a quoted item, it needs to be double quoted.

@zimbodel: Please mark the answer as accepted. See guidelines for asking.

If I saw it I would have

@zimbodel,

Answers can be marked as answered or voted upon at any time.

I didnt see it so I didnt mark it.

@zimbodel,

Think I now understand what you are stating. See → How do I mark an Answer as correct?

Which has a link to here → How do I mark the best answer to my question on this site?

See here. Still the issue when I view your pages: Bug not fixed. How do I mark the best answer to my question on this site? - #13 by manj_k

So if I saw I would have marked it. Maybe fix the bug ?
It is still present at least in using firefox in Linux.

This is distracting from the question and answer and polutes the thread. Maybe we discuss it somewhere else such as in another bugreport ?

@zimbodel,

Bug fixed long ago.

Forget I ever asked you to mark the answer as accepted. Others don’t seem to have the problem.

Don’t see problem with Firefox, Chrome, Linux, Windows, Mac and much more.

You are weolcome
There is still no way for me to mark it as solved.
Thanks anyway.