Changing standard reports

Geert Janssens geert.gnucash at
Wed Oct 19 10:31:34 EDT 2016

On Wednesday 19 October 2016 10:28:13 David T. via gnucash-devel wrote:
> Hello,
> Out of curiosity, how might one go about changing the contents of one
> of the standard reports included with GnuCash? I ask because I was
> interested in trying to change the General Ledger and General Journal
> reports to include more meaningful names in the window heading (see
> bugs 773168 and 773169). However, when I tried changing the text
> value of regrptname in the scm files for these reports, the GnuCash
> application subsequently failed to load (as in crashed on startup).
> Moreover, restoring the original text value or even the original scm
> file failed to restore operations; I had to reinstall the
> application. I was under the impression that the scm files were
> loaded at startup, but obviously I am mistaken.
> TIA,
> David

Hi David,

The general principle is exactly that: the scm file is loaded at 

There are additional details depending on your platform and version of 
guile in use.

When your installation of gnucash is built for guile 1.8.x, the scm 
files are indeed loaded at startup and interpreted on the fly. So on 
most platforms, replacing the scm file with a modified one in this 
scenario should have gnucash simply read the new scm file at startup. 
The one wrinkle I can think of in this case is on Windows: whatever in 
installed in the Program Files* directories can't just simply be 
modified. Windows uses some kind of virtual filesystem in that directory 
to manage user-made changes (even if done with admin rights). This 
virtual file system doesn't seem to play well with gnucash. I have seen 
other reports of failures when attempting to manually edit files in 
here. I'm not on Windows myself, so I don't know much more detail about 

Aside from Windows, most other platforms (including OS X) have switched 
to guile 2.x for use with gnucash. In this case the load scenario is 
slightly different because guile 2 compiles the scm files and reads the 
compiled files at load time instead of the scm (source) files. The 
gnucash source tree is configured such that all scm files are already 
compiled during the build of gnucash. So when running gnucash, the 
compiled scm files are already available and will be used. When you 
change an scm source file (as you did), guile will detect this and 
attempt to recompile it. It appears this part fails on your system for 
some reason. Copying the original file back will probably still trigger 
the attempt to recompile, because copying a file changes the modified 
time, which is exactly what guile checks to determine if a recompile is 
needed. That's why in your case only a reinstall fixed it.

Unfortunately this doesn't explain why the recompile failed. Perhaps 
John has more insight in this on OS X.



More information about the gnucash-devel mailing list