How to fix spacing if allowing "examine [things]"?

I’ve run into this issue a couple of times. Here’s a brief example to demonstrate the issue:


Place is a room.

A lamp is in Place. A rock is in place.

Understand “examine [things]” as examining.

fooing is an action applying to one thing. Understand “foo [thing]” or “foo [things]” as fooing.

To foo is a verb.

Report fooing something:
say “[They] [foo] exquisitely!”

test me with “x all / take all / foo all”[/code][/spoiler]

which results in:

Why are there extra line breaks for the output of “x all”, but for “foo all”? Is it because examining prints during the carry out rules instead of the report rules? Is there any way to fix this once and for all?

Clearly not. Changing fooing to a report-rule model does not cause extra line breaks.

The "lamp: " prefix output ends with “[run paragraph on]”, so I guess the difference has something to do with the different state of the print system after that versus a paragraph break.

You could read Printing.i6t a few times and see if that helps. Personally, I hit the point where Graham says “For some years now, ‘spacing bugs’ […] have been the least welcome in the Inform bugs database” and give up.

You mean “to a carry out-rule model,” right? If so, then yes, I see that’s true (and probably should have tried it myself before posting).

Yeah, fast typing, sorry.

Thank you for the pointer, zarf. That’s not actually it, but it’s been a very educational week [edit: day – it only felt like a week!] chasing this issue through the I6 source (and discovering that the online documentation for the i6t files is significantly out of date). I can see why these are the least favorite kind of bug.

I still haven’t gotten to the root cause, but I did come up with a relatively simple fix for my own actions:

[code]To set suppress interrule line breaks:
(- say__pc = (say__pc | PARA_NORULEBOOKBREAKS); -)

To unset suppress interrule line breaks: [didn’t actually need to use this, as it seems to be cleared on its own frequently enough]
(- say__pc = (say__pc - (say__pc & PARA_NORULEBOOKBREAKS)); -)

First Report fooing (this is the set suppress interrule breaks for report fooing rule):
set suppress interrule line breaks.[/code]

It even works 90% on the Standard Rules examining action, but some oddness in the way that action’s rules communicate with each other means that they would have to be rebuilt to suppress the stray breaks 100% – e.g. by reducing the number of rule transitions and/or making them aware of the multiple object list so they can do line breaks differently in multi-action “>X ALL” vs. single-action “>X IT” scenarios.

I want to say that it would be better if there were no calls to RulebookParBreak() between rules in a rulebook’s routine, and instead they were placed at the start of the body of individual rules. That way DivideParagraphPoint() would be called in response to a definite need for it instead of in anticipation of some later rule requiring it. I’m not sure how much havoc that would wreak with other compensating breaks that seem to be in the works, but I think it would generally be OK since single-rule rulebooks don’t seem to have any serious issues.

Thanks for this tip; I’m wrestling with some spacing issues this weekend, and this helped with a couple of them.

Glad to hear it! What are the other issues?