#4 \b is being ignored

open
nobody
None
5
2008-03-19
2008-03-19
Gustavo Delfino
No

In MATLAB GUI

>> disp('a');disp('b')
a
b
>> disp('a');disp(sprintf('\bb'))
ab
>>

In emacs:

>> disp('a');disp('b')
a
b
>> disp('a');disp(sprintf('\bb'))
a
b
>>

The output should be the same on both environments. This affects my testing framework, where I first print "testing A ..." and then I add the "OK" or "Fail".

Regards,

Gustavo Delfino

Discussion

  • Logged In: NO

    This isn't simply a problem with the emacs, I get this running matlab from the terminal. As a workaround to your problem, use fprintf instead of disp. There is no linefeed be default.