[LyX/master] Amend(1) 689f26d2: Add default path to server pipe (cmake build)

Stephan Witt st.witt at gmx.net
Sat Apr 18 19:11:28 UTC 2020


Am 18.04.2020 um 21:00 schrieb Kornel Benko <kornel at lyx.org>:
> 
> Am Sat, 18 Apr 2020 20:11:01 +0200
> schrieb Stephan Witt <st.witt at gmx.net>:
> 
>> Am 18.04.2020 um 15:58 schrieb Kornel Benko <kornel at lyx.org>:
>>> 
>>> Am Sat, 18 Apr 2020 11:47:18 +0200
>>> schrieb Stephan Witt <st.witt at gmx.net>:
>>> 
>>>> Am 18.04.2020 um 08:50 schrieb Kornel Benko <kornel at lyx.org>:  
>>>>> 
>>>>> commit 0135682fca9bcdbf4f355aa6ef4e6f78b4e8b49b
>>>>> Author: Kornel Benko <kornel at lyx.org>
>>>>> Date:   Sat Apr 18 09:06:56 2020 +0200
>>>>> 
>>>>>  Amend(1) 689f26d2: Add default path to server pipe (cmake build)
>>>>> 
>>>>>  Added handling for cygwin and win32
>>>>>  MacOSX is unchanged, Stephan could you look at it?    
>>>> 
>>>> Actually it was working on Mac w/o problem before. What should I look at?
>>>> What do you expect to happen and what shouldn’t happen?
>>>> 
>>>> Stephan
>>>> 
>>> 
>>> Yes, I expect it was working. At least for the default userdir.
>>> But what happens if you use different directory?
>>> 	$ lyx -userdir my_belowed_lyx_userdir  
>> 
>> There is no reason to do so on a Mac. And if one want to use that
>> it would be easy to use the appropriate serverpipe value there. 
>> 
>>> Could we, instead of
>>> 	\serverpipe "~/Library/Application Support/LyX at version_suffix@/.lyxpipe"
>>> use
>>> 	\serverpipe "$$User/.lyxpipe"
>>> in development/MacOSX/lyxrc.dist.in?  
>> 
>> Yes, we could. But it doesn’t change anything, AFAICS. 
> 
> Good.

It’s good that it changes nothing? :)

> 
>> Furthermore I have some problems with it:
>> 
>> 1. I’d name the variable UserDir to match the meaning of it.
> 
> I am using the var-name which already was used in lyx sources.
> (See ./src/support/filetools.cpp)
> (And yes, I saw it's inside a '#if 0')
> So 'UserDir' feels better.
> 
>> 2. The aim of the pipe is to tell LyX something.
>> 
>> So it should be easy to guess it’s location for other programs.
>> It shouldn't have a dynamic and unpredictable location.
> 
> This is neither dynamic nor unpredictable. The userdir should be known.
> The value does not change with the lunar phase.
> 
>> The use
>> case of the pipe on a Mac is to communicate with the PDF viewer
>> Skim.
> 
> That's OK, the pipe is used in linux with e.g. okular too.
> 
>> The viewer has a builtin default to send a message to LyX.
>> This is to look for the script lyxeditor at the well known location
>> /Applications/LyX.app/Contents/MacOS and run it with appropriate
>> parameters.
>> This script scans the user preferences for the serverpipe
>> and uses a sensible fallback if it is not found. Your proposal doesn’t
>> improve the situation. The problematic part is the assumption of Skim
>> where LyX is located.
> 
> You mean the uuserdir of lyx. But this problem is always there,
> regardless of my proposal.
> 
> Using lyx2.3 Skim finds the correct lyxeditor, but if you use lyx2.4 it does not.
> Or vice versa. You are never on the really safe side.

Why shouldn’t that work? I can install only one of the LyX versions at the same time 
at the „well known“ location. And then it works with the currently installed one.

Again, I don’t see what the goal or use case of your change is.

A developer should be able to modify the environment to fit the task to solve.
A user should be able to use it out-of-the-box w/o any trouble.

> I would like to have nearly same handling for unix, Windows and MacOSX, that's why.

That’s not possible anyway.

Stephan


More information about the lyx-devel mailing list