SUMMARY I'm trying to use the build plugin to compile my LaTeX documents. It works fine, but whenever I close Kate and start it up again I lose all my build targets that I configured STEPS TO REPRODUCE 1. Enable build plugin 2. open build output section (bottom) 3. go to target settings tab 4. add a new target 5. change the build command from the default (make) to xelatex %f 6. close kate 7. open kate 8. open build output section (bottom) 9. go to target settings tab OBSERVED RESULT Build targets are all reset to default EXPECTED RESULT My custom build targets are saved when kate is closed SOFTWARE/OS VERSIONS Latest ArchLinux packages ADDITIONAL INFORMATION I tried to add the custom build targets in a kate session, but that didn't save and restore the custom build targets either when re-opening kate
Thanks for the report. I think the problem is that you have not created a session specific to this task, and when you close and restart you open up the default session that does not have your settings. So save the session and reopen this session when you want to compile your LaTeX document. (Sessions -> Save Session) Does that help?
I tried it with a session as well and it didn't work either. I attached a recording
Created attachment 133259 [details] kate_build_plugin.mp4
That is strange... I tried the same thing and it worked. Can you run Kate from the terminal and see if you get any error messages? Use kdebugdialog5 to ensure that you have debug output enabled for Kate (enable all just in case) Thanks, Kåre
Created attachment 133354 [details] full debug log I turned on all debugging in kdebugsettings and wrote the output to this log file. I then did these steps: 1. open kate with a file from terminal `kate catering.tex` 2. open build plugin bottom window and add a debug with name XeLaTeX, then change the default build command from `make` to `xelatex %f` 3. build once 4. save session as `new test` 5. close kate 6. start kate again (not in this log file) and observe de default build configuration
Thanks for the info! Hmm, really odd... I can't find anything (except the missing sonnet plugins) I do have a small suspicion that it could be your installation/setup that is broken somehow, but I do not know... Have you tried to add more "target sets"?
Yes, but they all disappear and return tot the default values, once I close Kate and start it up again. Where does kate save this build plugin information (so I can check if it's in there while kate is still open)? Also, all the settings of the external plugins save/load fine between closing and restarting. So I put my build commands in the external tools for now... but I would like to use the build plugin to define multiple targets (C++, LaTeX, VueJS, etc...)
(It's a new laptop, that I just received last week and just installed Arch Linux on, so it's a fresh install with barely any history in it (1 week of history max)
The build plugin configuration should be in session files under ~/.local/share/kate/sessions/ in each session file there should be a section [Plugin:katebuildplugin:MainWindow:0] Here is one example Ii have [Plugin:katebuildplugin:MainWindow:0] 0 BuildCmd build=make -j10 0 BuildCmd config=cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ../ 0 BuildCmd upload=make upload 0 BuildPath=/home/sars/sketchbook/car 0 Target=Target Set 0 Target Default= 0 Target Names=build,upload,config Active Target Command=1 Active Target Index=0 NumTargets=1 Show Marks=false
Yeah I found it. I did this: 1. start kate 2. change the build plugin command to xelatex %f and name to test 3. close kate 4. open ~/.local/share/kate/sessions/*name* [Plugin:katebuildplugin:MainWindow:0] 0 BuildCmd build=xelatex %f 0 BuildCmd clean=make clean 0 BuildCmd config=cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local ../ 0 BuildPath= 0 Target=Test 0 Target Default= 0 Target Names=build,clean,config Active Target Command=0 Active Target Index=0 NumTargets=1 Show Marks=false 5. start kate 6. build plugin information is reset again to default 7. close kate 8. open ~/.local/share/kate/sessions/*name* [Plugin:katebuildplugin:MainWindow:0] 0 BuildCmd build=make 0 BuildCmd clean=make clean 0 BuildCmd config=cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local ../ 0 BuildPath= 0 Target=Target Set 0 Target Default= 0 Target Names=build,clean,config Active Target Command=0 Active Target Index=0 NumTargets=1 Show Marks=false So it seems like the data from the session is not loaded correctly at startup and it loads the default, and then when I close kate, then those default setting are written back to the session file
To fix this we would have to know what happens in kate/addons/katebuild-plugin/plugin_katebuild.cpp line 237 What does Kate read here? The thing is, for me this works fine....
It doesn't even enter this method. I tried to std::cout the numTargets int but it never printed to the terminal, then I put a std::cout before the cg.readEntry in this function but it never printed that either I then grepped the method and I guessed the katepluginmanager.cpp to handle this in line 126 where it does interface->readSessionConfig(group) I put a std::cout before the if (auto interface = qobject_cast ...blablabla...) and a std::cout after this if statement, and I see the one before the if statement printed 9 times whereas the one inside the if statement that's supposed to call the readSession called 0 times.
(I just checked out the kate source code from github and compiled it and am testing by running the kate binary in the bin directory)
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Added info in previous comment
The build plugin was massively overhauled for 22.12. Can you check if the issue is still reproducible?
I am currently not running Kate for my dev work, so I don't have it installed anymore. However, if I do in the future start using Kate again, then I can always file a new report if the problem still persists. Probably best to close this issue for now, unless someone else wants to test this. Thank you for taking the time to reply to this old issue.
Thanks, if you notice any issues feel free to reopen.