[tex-k] Wrong fix of bug S950 in TeX (and MF)

Igor Liferenko igor.liferenko at gmail.com
Wed Sep 20 14:09:59 CEST 2023


Hi, Karl

I just tried to make any sense from the change S950,
therefore I proposed my fix.
But if you say that TeX should work this way, it follows
that the change S950 is completely useless, because
*original* TeX already works this way without the change S950.

Petr Olsak in his analysis at
https://tex.stackexchange.com/questions/552166
(which you refer to) writes about `name', which is set to
zero. But `name' (aka `cur_input.name_field') is completely
irrelevant in this case.

He writes:
"It creates the file name (which may be sent to an editor) from
input_stack[base_ptr].name_field but this is the same as
cur_input.name_field and it was set to zero."

Wrong!
`input_stack[base_ptr].name_field' is not the same as `cur_input.name_field'
(at the point where file name is sent to an editor).
This can be demonstrated by applying this change to original tex.web
@x
@.You want to edit file x@>
  slow_print(input_stack[base_ptr].name_field);
  print(" at line "); print_int(line);
@y
@.You want to edit file x@>
  slow_print(input_stack[base_ptr].name_field);
  print(" which has string number ");
print_int(input_stack[base_ptr].name_field);
@z

The output:
  You want to edit file h.tex which has string number 1346
(i.e., `input_stack[base_ptr].name_field' is not zero)

Please help me understand when the change S950 will have any effect
(i.e., is there any scenario when the line "You want to edit file..."
will not be printed).

Regards,
Igor

P.S.
You can obtain original TeX by cloning
  https://github.com/igor-liferenko/tex
and just running `make'


More information about the tex-k mailing list.