On Thu, Oct 12, 2023 at 10:02:00PM +0000, Philip Kaludercic wrote: > Maske writes: > > > Hi > > > > I have installed a package and I want to modify a function of it [...] > > so I have added the function modified in my init file. But, > > it doesn't work. The package behavior is not altered. [...] Apart from Philip's very valid points: - advice lets you change a function's behaviour, but still use the original function. This is usually what you want to do (this is *not*, however, what a packager should do, usually) - talk with the authors > > What would be the correct way? what is probably happening is that the package is loaded *after* your function definition in the init file, thus overwriting your definition. Since packages are often loaded lazily, you haven't always control of when it happens. To avoid that, you can either load the package explicitly before you do your function definition or (much better) look into `eval-after-load', which was made for such things. You'll have to do that also if you go the advice route: the function wants to exist before you attach some advice to it. Cheers -- t