Manuel Gómez <mgrojo@gmail.com> writes:
El 28/1/23 a las 20:05, Stephen Leake escribió:
Manuel Gómez <mgrojo@gmail.com> writes:
Thanks. Now, I am able to set it in this way:
alr config --set --global editor.cmd 'emacs
--eval=(ada-build-prompt-select-prj-file"${GPR_FILE}") ${GPR_FILE}'
I'm glad that works; thanks for the feedback.
Note that there is no space between the function and the string
argument. Otherwise, Alire splits the argument and Emacs is not able
to evaluate it correctly. Don't know if that could be considered a bug
in Alire or not, but I couldn't find a proper way to escape the space.
The space problem sounds like a bug, but it could be in your shell
rather than in Alire. It's simpler just to edit the alire config file
directly; it's ~/.config/alire/config.toml
When the config file is edited and space added:
$ alr edit
Editing crate with: ['emacs'
'--eval=(ada-build-prompt-select-prj-file', '"play_2048.gpr")',
'play_2048.gpr']
This should be:
'--eval=(ada-build-prompt-select-prj-file, "play_2048.gpr")',
All one arg to emacs.
And then Emacs errors:
command-line-1: End of file during parsing
This is telling you it is missing a closing paren in the eval arg.
That can be attributed to Alire, it's splitting the command assuming
spaces as separator, so command lines containing spaces inside
arguments are not supported. Using shell syntax (e.g. single quotes)
inside the config file doesn't work either.
Hmm. Does that mean you tried what I suggest above?