I want to implement a script that I can call from my file explorer to be able to open a new frame with the chosen file (emacsclient -nc $1
), but only if the file does not already exist then I simply want to focus the right frame (or buffer). So how to I find out if a frame is already visible?
So far I tried to use this function get-buffer-window
(How to know my buffer's visible/focused status?) and call it with emacsclient -e, but I do not know what argument I should give it (I am an emacs newbie here btw :D).