<blockquote>
<p>It would probably be possible to add a document_before_open signal that provides the filename and returns true to continue opening and false to not do the open. Then you can stash the filename and stop the open until you are ready to do it.</p>
</blockquote>
<p>Thanks but it's not needed I think. As the open happens on clicking a row in the Workbench sidebar, I can make the catch there and move my project switching code in the "row-activate" callback before calling document-open (haven't looked at it for some time but should be possible).</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=AAIOWJ32ML6HMHT3IL4PEVTQCVPHJA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PMGXY#issuecomment-517915487">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ6CNHEM5CHDGVL36ATQCVPHJANCNFSM4IHNIU3Q">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ7CJZ47DSWMEH6STFDQCVPHJA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PMGXY.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=AAIOWJ32ML6HMHT3IL4PEVTQCVPHJA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PMGXY#issuecomment-517915487",
"url": "https://github.com/geany/geany/pull/2234?email_source=notifications\u0026email_token=AAIOWJ32ML6HMHT3IL4PEVTQCVPHJA5CNFSM4IHNIU32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PMGXY#issuecomment-517915487",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>