#4132 breaks indentation in displayed functions in certain cases #4486
Open
Description
opened on May 12, 2021
Put the following code in a file test.g
:
SetPrintFormattingStatus( "*stdout*", false );
Display(x -> x);
and execute gap test.g
.
Observed behaviour
The output is:
function ( x )
return x;
end
Expected behaviour
The output should be:
function ( x )
return x;
end
Notes
- I have bisected this to Fix a long standing bug which prevented
SetPrintFormattingStatus( "*stdout*", false );
from working as expected #4132 (e62d395). - In the REPL this problem does not occur, that's why putting the code into a file is important.
- Some background why I am interested in this:
- I have
SetPrintFormattingStatus( "*stdout*", false );
in my gaprc because I'd like my terminal to reflow long lines if I change the size of my terminal. - I want to stringify functions and print them to files. For this, I would like to have indentation but not line breaks due to long lines, so I would like to set
SetPrintFormattingStatus
tofalse
without losing the indentation.
- I have
Metadata
Assignees
Labels
No labels
Activity