<blockquote>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=181177" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a>, <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=811085" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/elextr">@elextr</a>: the ProjectPrefs structure is actually not exposed to the plugin API therefore I agree to elextr and would like to keep the setter and getter function.</p>
</blockquote>
<p>I tend to agree accessor functions are technically superior, I was just pointing out that it's different from most (all?) of the rest of the API. I have no objection to leaving the functions, only with the doc-comments not explaining properly what the functions do in isolation.</p>
<blockquote>
<p>But I renamed the item project_session to use_project_session_files, renamed the function names to and extended the functions doc comment a bit. I hope that's sufficient.</p>
</blockquote>
<p>I still have no idea what it does (without going to lookup that preference in the manual). Also it's probably not a good idea to refer to a private struct member in the public API. A good doc-comment can stand on its own to explain what it does, or at least refer to another thing in the API docs, IMO.</p>
<p>After looking in the manual for that preference, which I never realized (and don't understand why it) exists, what if it was something like:</p>
<div class="highlight highlight-source-c"><pre><span class="pl-c"><span class="pl-c">/*</span>*</span>
<span class="pl-c"> * Controls whether currently opened files are stored in the project file.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * If @value is @c TRUE, this causes the opened files to be persisted when</span>
<span class="pl-c"> * the project is closed and re-opened, or when @c FALSE none of the</span>
<span class="pl-c"> * opened files will be re-opened when a project is re-opened.</span>
<span class="pl-c"> *</span>
<span class="pl-c"> * @param value Whether or not to persist the list of open files in the project file.</span>
<span class="pl-c"> * </span>
<span class="pl-c"> * @see project_get_persist_open_files</span>
<span class="pl-c"> * @since 1.36 (240)</span>
<span class="pl-c"> <span class="pl-c">*/</span></span>
<span class="pl-k">void</span> <span class="pl-en">project_set_persist_open_files</span>(gboolean value);</pre></div>
<p>Whenever writing doc-comments, IMO it's best to imagine yourself a total n00b looking at the documentation for that one function without knowing anything else about the project's internals or other parts, and whether it would make any sense.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2234?email_source=notifications&email_token=AAIOWJ7MFCE23VFBWOZKGVDQCWPLXA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQNGY#issuecomment-517932699">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ6OFEPHEXIMKKG6LILQCWPLXANCNFSM4IHNIU3Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJZ23RDUDIZVTB53N7TQCWPLXA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQNGY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2234?email_source=notifications\u0026email_token=AAIOWJ7MFCE23VFBWOZKGVDQCWPLXA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQNGY#issuecomment-517932699",
"url": "https://github.com/geany/geany/pull/2234?email_source=notifications\u0026email_token=AAIOWJ7MFCE23VFBWOZKGVDQCWPLXA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PQNGY#issuecomment-517932699",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>