Before printing the indefinite article of a thing?

How can I run a rule that goes before this happens? “Before printing the name of a thing” runs after the indefinite article has already been printed. I tried this too:

Before printing the name of a thing (this is the before indefinite articles rule):
	say "foo";
	
The before indefinite articles rule is listed first in the before printing the name rulebook.

It seems that the indefinite article is not printed in the printing the name activity? How can I intercept it?

It’s a variable. Just set it to a value.

I need to change the variable or change item described to proper or improper named dynamically based on the conditions surrounding item described.

So there’s no way to do this? I’ve been going completely bananas on this, and nothing seems to be able to be inserted before the indefinite article gets printed.

Maybe you can hack something with a text substitution? Say this:

The indefinite article of a thing is usually "[hack]"

and then put whatever code you want in a “To say hack:” phrase.

I wasn’t able to get that to work either. The primary use case I have is that I want to not have a printed name printing at all in some dynamic cases, but when the thing is not proper-named, rules that prevent the printed name just end up preventing the name, but not the article… so I end up with stuff like “This is some text about the the thing”… where it would say “This is some text about the other thing the thing”… that first “the” should also not happen, but it is.

It is very hard for me to get a use case of this extracted from the thousands of lines in my overall application to share it… I know this sounds suspect, but I’m sure at this point there isn’t a glitch in those thousands of lines though. Everything works right now, no other breakages or anything weird. The printing of things works as expected, its just that the article of the thing that is being asked to not be printed is still there… just the article, but not the other, main half of the printed name…

I don’t really know I6, but I know enough about code in general that from what I can tell in the Printing.i6t file, that the printing of the article and the printing of the rest of the name are not exposed separately to I7. I don’t know enough I6 to remedy that, and it looks like a very complex piece of code, even for someone that does know I6… maybe it’s hopeless, the behavior is just so embedded at a core functionality level. I don’t know…

Ok, sorry for the double-post, but here is a very similar use case to the above that was easier to extract at least something to share.

Here, I’m using Numbered Disambiguation Choices by Aaron Reed (also using Disambiguation Control by Jon Ingold). I’m making modifications to it because I don’t want this to happen:

“What do you want to look: the 1) apple, the 2) orange…”, I’m trying to get this to happen “What do you want to look: 1) the apple, 2) the orange…”.

The same problem with other places where I’m trying to control things happening before a printed name where there is an indefinite article is present here… that there doesn’t seem to be a way to inject logic right before the article is printed. Once it is printed, it’s too late to do anything, and if the item described is proper-named before you try to run the logic, it doesn’t seem to be able to be inserted. Here’s my feeble attempt at a hack, but I’m sure it’s all wrong:

A thing can be numbered_disambiguation_proper_cleaned.

Before asking which do you mean:
	repeat with x running through relevant things:
		if x is not proper-named:
			now x is numbered_disambiguation_proper_cleaned;
			now x is proper-named;
			
After asking which do you mean:
	now every thing that is numbered_disambiguation_proper_cleaned is proper-named;
	now every thing that is numbered_disambiguation_proper_cleaned is not numbered_disambiguation_proper_cleaned;

First before printing the name of something (called macguffin) while asking which do you mean (this is the New Numbered Disambiguation Choices preface disambiguation objects with numbers rule):
	if macguffin is not listed in match list:[this is here because possessive nouns like "Bob's thing" end up flagging "1) Bob's 1) Thing" with how I have set up possessives to display more dynamically]
		do nothing;
	otherwise:
		if disambiguation-busy is false:
			now disambiguation-busy is true;
			repeat with x running through match list:
				if x is macguffin:
					add macguffin to the list of disambiguables, if absent;
				now the disambiguation id of macguffin is the number of entries in list of disambiguables;
			if print-or-construct-bool is true:
				say "[before disambiguation number text][the number of entries in list of disambiguables][after disambiguation number text]";
				if macguffin is numbered_disambiguation_proper_cleaned:
					now macguffin is not numbered_disambiguation_proper_cleaned;
					now macguffin is not proper-named;
					say "[indefinite article of macguffin]";

I guess “[indefinite article of x]” doesn’t work in any case… which is also complicating things here, so maybe this example isn’t very good, but I just don’t know how to fix this at all it seems.