Am Sat, 18 Apr 2020 22:49:18 +0200 schrieb Kornel Benko <[email protected]>:
> Am Sat, 18 Apr 2020 22:11:36 +0200 > schrieb Stephan Witt <[email protected]>: > > > Yes, it’s possible. But not at the same location. /Applications/LyX.app is > > 2.3 or 2.4 > > but not at the same time. And Skim looks there as I said. > > > > One can change Skim’s preference to look at some other place - > > but unfortunately there is no automatic solution for this. > > > > It doesn’t matter what version is used. lyxeditor is able to lookup the > > pipe location > > to direct the reverse lookup command of Skim to the running LyX instance. > > What could be done to make lyxeditor independent is: > Before lyx calls some external program (e.g. Skim), lyx sets an environment > variable, > for instance 'LYX_SERVER_PIPE'. Skim may call lyxeditor, and I suppose, the > environment > is inherited, so that also lyxeditor gets it. > Instructing lyxeditor to consider it should not be that difficult. > > Kornel We already do similar for lyxclient. See ServerSocket.cpp:68 setEnv("LYXSOCKET", address_.absFileName()); so we could use "LYXPIPES", see attached Kornel
diff --git a/src/Server.cpp b/src/Server.cpp
index 5fb089d758..5511aa263e 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -1059,11 +1059,14 @@ void ServerCallback(Server * server, string const & msg)
server->callback(msg);
}
Server::Server(string const & pipes)
: numclients_(0), pipes_(pipes, this, &ServerCallback)
-{}
+{
+ // Info for possible use in lyxeditor
+ setEnv("LYXPIPES", pipes);
+}
Server::~Server()
{
// say goodbye to clients so they stop sending messages
pgpdsKHMI2d2O.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list [email protected] http://lists.lyx.org/mailman/listinfo/lyx-devel
