konqueror - file preview of "some" assembler not detected as plain-text
All, This is a very strange circumstance. dumping C++ to assembler *without* optimization produces file previewed as plain-text in konqueror file preview. E.g. files created with: g++ -S -masm=intel -O0 -std=c++17 -o asm/findhyphen-0-cstr.asm findhyphen.cpp The preview for file findhyphen-0-cstr.asm is shown as plain text with proper syntax highlight in konqueror. However if you use any optimization, e.g. -O1 through -Ofast the file is recognized as "Unknown" in konqueror and previews as hex instead of plain-text. The compile string would be: g++ -S -masm=intel -O1 -std=c++17 -o asm/findhyphen-1-cstr.asm findhyphen.cpp In konqueror preview, the first line is shown in the hex preview as: 0000:0000 | 09 2E 66 69 6C 65 09 22 66 69 6E 64 68 79 70 68 | ..file."findhyph (which is all valid plain-text as is the rest of the file) All editors (including kwrite and kate) open the text as a proper plain-text assembler file with proper highlight in contrast to what konqueror preview shows. I never recall this happening before. All file utilities see nothing but plain-text as well, e.g. $ file findhyphen-1-cstr.asm findhyphen-1-cstr.asm: assembler source, ASCII text or $ head -n 5 findhyphen-1-cstr.asm .file "findhyphen.cpp" .intel_syntax noprefix .text .section .rodata.str1.1,"aMS",@progbits,1 .LC0: I can't explain any possible reason why konqueror preview choose "Unknown" type for findhyphen-1-cstr.asm and plain-text for findhyphen-0-cstr.asm, but something is wrong. I'll try attaching the text file here. -- David C. Rankin, J.D.,P.E.
On 7/20/22 01:02, David C. Rankin wrote:
This is a very strange circumstance. dumping C++ to assembler *without* optimization produces file previewed as plain-text in konqueror file preview. E.g. files created with:
Also note, C files dumped to assembler as displayed properly as plain-text in konqueror - no matter what optimization is used, so this is unique to g++ with optimization for C++ sources dumped to assembler. -- David C. Rankin, J.D.,P.E.
On 7/20/22 01:09, David C. Rankin wrote:
On 7/20/22 01:02, David C. Rankin wrote:
This is a very strange circumstance. dumping C++ to assembler *without* optimization produces file previewed as plain-text in konqueror file preview. E.g. files created with:
Also note, C files dumped to assembler as displayed properly as plain-text in konqueror - no matter what optimization is used, so this is unique to g++ with optimization for C++ sources dumped to assembler.
Digging further, It seems that kcontrol "File Association" is missing the assembler source type. I added an 'x-assemsrc' as part of the 'text' group with '*.asm' and '*.s' extensions and associated kate/kwrite for opening and left embedding set to follow the 'text' group to display with the Embedded Advanced Text Editor (katepart) This must be a change and must be something that was dropped from the default konqueror setup. I'll start 15.0 and see if it has anything next time I put that drive back in the computer. -- David C. Rankin, J.D.,P.E.
participants (1)
-
David C. Rankin