Hi,
Is there a way to make sure the project option under 'Session':
'Save editor info only for project files'
is always checked whenever I start a new project ?
Michael.

Mailing lists / lazarus / 2024-12
4 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
Is there a way to make sure the project option under 'Session':
'Save editor info only for project files'
is always checked whenever I start a new project ?
Michael.
In the Project Options window there is a checkbox in the corner called "Set compiler options as default", but as the name suggests it does not save the options from the "Project Options" category, which is where your setting belongs. ?
So I can only recommend you to use "Project Templates". It is more complicated, but it even allows you to customize what your default main file will look like and much more. ?
https://wiki.freepascal.org/Project_Templates
?
?
?
?
?
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20241205/f496eb45/attachment.htm>
I thought of this (I wrote the Project Templates functionality, after all...), but as far as I know a template project cannot be set as a 'default project' at startup.
I have 'Simple program' as the startup project.
Hm. Maybe I should simply create a descendant of the 'simple program' class and see if I can change the setting in code. Then I can set that as my start project...
In each case, it seems to me that the other settings (not compiler related) also should be settable as default.
Michael.
The template project is also configured as a startup project in the options: IDE Options > Environment > IDE Startup > combobox "New Project Type". ?
But if you can/want to change the IDE sources, then it is enough to add the line "AProject.Flags := AProject.Flags + [pfSaveOnlyProjectUnits];" to the "TProjectSimpleProgramDescriptor.InitProject" method of the "ide/projectdescriptortypes.pas" unit. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20241205/6d6d025a/attachment.htm>