[LyX/master] Amend(1) 689f26d2: Add default path to server pipe (cmake build)
Stephan Witt
st.witt at gmx.net
Sun Apr 19 08:16:28 UTC 2020
Am 19.04.2020 um 10:13 schrieb Stephan Witt <st.witt at gmx.net>:
>
> Am 18.04.2020 um 20:11 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.
>
> Sorry, this was not true. It will break the default server pipe lookup
> of lyxeditor for a virgin user environment.
>
> The serverpipe entry in saved users preferences is written only on a explicit
> change of this entry by the user. The location of the pipe is derived from
> the installed lyxrc.dist then.
To be more explicit: the lookup in user preferences fails and the pipe location
must be guessed. This guess uses the installed lyxrc.dist.
> This works with absolute paths only.
> The lyxeditor script cannot know the correct replacement for $$UserDir.
>
> So I cannot change that on Mac.
>
> Stephan
>
>>
>> Furthermore I have some problems with it:
>>
>> 1. I’d name the variable UserDir to match the meaning of it.
>> 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. The use
>> case of the pipe on a Mac is to communicate with the PDF viewer
>> Skim. 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.
>>
>> Stephan
More information about the lyx-devel
mailing list