At Mon,  3 Jul 2023 07:26:39 -0400 (EDT) Robert Heller <hel...@deepsoft.com> 
wrote:

> 
> At Mon, 3 Jul 2023 11:28:18 +1000 David H <hell...@gmail.com> wrote:
> 
> > 
> > Hi Robert,
> > 
> > https://wiki.gnucash.org/wiki/Configuration_Locations doesn't help ?
> 
> Nope.  At least it doesn't help as far as I can tell.  It is a bit confusing 
> though.  It talks about $HOME/.gnucash and $HOME/.local/share/gnucash and I 
> am 
> not totally sure which is correct for V4.14.  I have determined that 
> $HOME/.local/share/gnucash/ is used for stylesheets-2.0, since that file in 
> that location gets updated after I fire up gnucash and exit.  It just doesn't 
> appear the config-user.scm ever gets loaded.

OK, running "gnucash --paths" on the command line reveals another location: 
$HOME/.config/gnucash, putting config-user.scm there seems to get it loaded, 
but I am getting the message:

WARNING: Use of `load' in declarative module (gnucash utilities).  Add 
#:declarative? #f to your define-module invocation.

What does this mean?

config-user.scm contains:

(display "Hello World (.config/gnucash)")
(newline)
(load "/home/heller/gnucash/dws-stylesheet.scm")
(let ((template (gnc:html-style-sheet-template-find "DWS")))
  (if template 
    (let ((options ((gnc:html-style-sheet-template-options-generator 
template))))

 (gnc:restore-html-style-sheet "Deepwoods Software Stylesheet" "DWS" options))))


/home/heller/gnucash/dws-stylesheet.scm starts with:


(define-module (gnucash report stylesheets DWS))

(use-modules (gnucash engine))
(use-modules (gnucash utilities))
(use-modules (gnucash core-utils))
(use-modules (gnucash app-utils))
(use-modules (gnucash report))
(use-modules (gnucash html))

and ends with:


(gnc:define-html-style-sheet
 'version 3.0
 'name (N_ "DWS")
 'renderer dws-renderer
 'options-generator dws-options)

(gnc:make-html-style-sheet "DWS" (N_ "DWS"))
    
Most of this file is just copied from 

.../gnucash-4.14/gnucash/report/stylesheets/footer.scm

with some added options added to the options function and some rendering code 
added to the renderer function.

What am I missing?

I'm beginning to think adding custom code is going to require hacking directly
on the source code and re-compiling. Really? (I may end up doing that anyway.)

> 
> > 
> > Cheers David H.
> > 
> > 
> > 
> > On Mon, 3 Jul 2023 at 10:50 am, Robert Heller <hel...@deepsoft.com> wrote:
> > 
> > > Which directory should config-user.scm be in?
> > >
> > > $HOME/.local/share/gnucash
> > > OR
> > > $HOME/.gnucash
> > >
> > > This is for Version 4.14, build under Linux (Ubuntu 22.04).
> > >
> > > I am not able to tell if the file is being loaded.  From what I can tell
> > > it is
> > > not loading config-user.scm.  This is the file name the wiki says to put
> > > user
> > > scheme code in, but I am doubtful about that. Is this really the correct
> > > file?
> > > I am not getting any indication that it is being loaded, not even 
> > > errors...
> > >
> > > --
> > > Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
> > > Deepwoods Software        -- Custom Software Services
> > > http://www.deepsoft.com/  -- Linux Administration Services
> > > hel...@deepsoft.com       -- Webhosting Services
> > >
> > > _______________________________________________
> > > gnucash-user mailing list
> > > gnucash-user@gnucash.org
> > > To update your subscription preferences or to unsubscribe:
> > > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > > -----
> > > Please remember to CC this list on all your replies.
> > > You can do this by using Reply-To-List or Reply-All.
> > >
> > 
> > 
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
hel...@deepsoft.com       -- Webhosting Services
                                                               
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to