Setting background picture seems broken (2.11, Windows)?

Hi,
I’m in 2.11/Windows and I cannot get background pictures to work.

Steps to reproduce the problem:
Format->Page->Background Picture -> select a picture->File selection dialog ‘Background picture’ opens. Click on picture files and verify that the preview is showing correctly. Select a picture file, goes back to Dialog ‘Background picture selector’. No picture displayed on the left hand area, though file name is displayed correctly. OK brings you back to Dialog ‘Page format’, further Ok back to the page, with no background displayed.
What does work: Selecting a background color or a background pattern.

Any idea what I’m doing wrong? Any help is appreciated.

Hi @Pcstor and welcome to the forum!

Thanks for reporting this. I have tried on Linux and don’t have any problems setting a background picture. Perhaps someone on Windows can test? @pireddag?

It does not work, but it can be corrected in source mode by typing a colon after the drive letter; I tried both a .png and a .jpg image. I think it is worth reporting in the bug tracker; could one of you two (@jeroen or @Pcstor) do it?
Please @Pcstor let me know if setting the background in this way works for you.
In the tests that I did on Windows, after setting the picture to a file, the file selector disappeared; it appeared again after I changed from “picture” to “unchanged”, and it had in the file name field still the file I had chosen first (it does not look at the file name in the page-this-bg-color environment variable.

Hi pireddag,
I’m happy to assist:

  1. adding the colon after the drive letter in source mode works.
  2. Re-opening the format->page dialog shows picture background reset to ‘pattern’. If I change that to ‘picture’ the picture file dialog opens, with the original picture and settings intact.
  3. If I confirm, Texmacs enters another assign-macro for page-this-bg-color into the document - again with the colon missing in the file name - which then overrides the corrected macro, so that the background picture is no longer shown.

So it seems that the issue is in the windows port: the colon (which is perfectly legal in Linux, but special for Windows) is filtered out too aggressively.

I can confirm that in also in Linux filenames with a colon in it don’t work for the background, or even when inserting images into the document.

Reported

https://savannah.gnu.org/bugs/?61466