On 10 Oct 2023, at 09:03, Simon Wright <simon.j.wright@mac.com> wrote:
I run the attached shell script; if the argument is "emacs", it configures "alr edit" to run a new copy of emacs; otherwise, GNATStudio.
Disadvantage: it opens emacs on the GPR, so you have to navigate to an Ada source before you can set the GPR as the one to use.
#!/bin/sh
case $1 in
emacs)
alr config --global --set editor.cmd 'open -n -a emacs ${GPR_FILE}'
;;
*)
alr config --global --set editor.cmd 'open -n -a gnatstudio -- ${GPR_FILE}'
;;
esac