It is a common mistake in looking at language to consider only the form, not the function. Just as a sentence is not a string of words, but a complex structure built up from words, so the meaning of an utterance is much more than sum of individual word meanings used for input.

Indeed, it would be impossible to use pronouns at all if this was not so. A pronoun by definition is a generic term with a wide range of applicability: proper names may denote individuals, but a word like 'she' or 'this' necessarily requires an inference to decide its reference. The inference is part of the meaning of the utterance, and normally it is automatic. Humans are very good at understanding language in normal use. Pragmatics is the branch of linguistics that studies how context, knowledge, and inference contribute to meaning.

Consider this sentence:

(1) I went to see Professor Jackson yesterday about my essay on Shakespeare. He was on the phone when I got to his office.

This is completely clear, and functionally unambiguous. There is no doubt whatsoever about the referent of 'he' and 'his', despite the fact that another formally suitable referent (the male human 'Shakespeare') occurs closer to the pronouns than the actual referent does.

We could say the utterance is 'formally ambiguous', but I am reluctant to do this, since ambiguity is commonly regarded as a bad thing, or in need of repair. Really, it is no more ambiguous than the string 'He was': when we hear this we don't yet know whether it's going to be followed by a predicate (e.g. 'on the phone', 'not there') or it's part of a compound verb (e.g. 'was talking to someone'). The parser in our brain probably builds multiple possible structures as an utterance is revealed, pruning away the possibilities that are excluded by subsequent material. (We don't actually know how the parser works.) In the case of 'was' we need to determine if it's copula or auxiliary; in the case of 'he' we need to determine its referent. Both processes are normally automatic and instantaneous.

The identification of reference is a matter of salience. What is salient as a possible referent is determined by numerous factors: position, grammar, emphasis, context, and knowledge, at least. Consider the following sentences spoken in a normal, unemphatic intonation:

(2) John gave the book to Bill, and he lent it to Mary.
(3) John gave the book to Bill, and he lent it to Mary too.
(4) John gave the book to Bill, and she lent it to Mary.
(5) John gave the book to Bill, and he then lent it to Mary.
(6) John lent the book to Bill, and he then gave it to Mary.

In (2), there being no other clues to saliency, we tend to read the 'he' as meaning the nearby Bill. Speech would clarify it with intonation, but in reading a story we'd probably decide on the 'Bill' reading. It is however a little ambiguous. In (3) there is no ambiguity any more: the grammar of 'too' requires a repetition of some kind to be identified, and Bill's lending it to Mary doesn't satisfy this requirement, so this reading is excluded. In (4) the grammar of 'she' prohibits identifying it with the only female referent in the sentence (i.e. it can't mean 'Mary lent it to herself'), so we know there is a salient female in the context: perhaps in a previous sentence, perhaps as the general topic of discussion. Or at least we know there ought to be: in the unlikely event that there is none such identifiable, then we would have to fall back on other explanations (Bill is female; or the author made an editing mistake).

All of these instant processes of understanding can be changed by intonation or emphasis: on the pronoun, on 'and', on the verb... Emphasis makes salience, and emphasis trumps position, though it doesn't trump all aspects of grammar: 'she lent it to Mary' can never mean 'Mary lent it to herself', however you say it.

In (5) the reference is clarified by the word 'then', but instead of this being part of its grammar, as with 'too', it's factual knowledge: after someone gives a book away, they're not in a position to lend it. 'Give' is ambiguous about whether it means 'lend' or 'give away' here, but this external knowledge makes Bill the likely lender in (5) whereas (6) is ambiguous.

To address now the example given in the previous write-up: this is quite clear and unambiguous, for reasons which should now be readily seen:

(7) I tend not to think of myself as a very good writer because I try to get another person to proofread each of my nodes. This may or may not improve my writing, but it does increase each node's quality.

As a pronoun 'this' has the formal ability to refer to any one of several nearby antecedent things: my tending not to think of myself...; my trying to get another person to...; or someone's proofreading each... . Grammatically it is excluded from its nearest potential referent, the plural 'my nodes'.

More subtly it is also grammatically excluded from referring to the singular 'each'. ('Each of my nodes is carefully crafted'; 'I write each of my nodes in biro then transcribe it onto the computer') The difference is in scope: 'it' can be a bound variable in the structure "for each node (I write it)", but 'this' has a true singular reference.

The example sentence is unambiguous because external knowledge eliminates all but one possibility. We know the sorts of things that improve writing: proofreading is one of them. My not thinking of myself as a good writer doesn't, nor does trying to enlist a proofreader.

But enlisting a proofreader does help writing. Can the 'this' refer to that? This is very subtle and I'm not sure of it, but consider these:

(8) I tried to get a proofreader, and this took two hours.
(9) I tried to get a proofreader, and this caught some spelling mistakes.
(10) I tried to get a proofreader, and this helped my writing.
(11) I try to get a proofreader, and this helps my writing.

Clearly in (8) it's the trying that takes two hours, and we don't know if any proofreading went on. Sentence (9) sounds very odd to me: but I can't tell whether it's because there's a grammatical prohibition on the pronoun reaching inside a 'try to' clause, or whether it's the pragmatics: when you say 'try to' you normally imply (under Grice's Maxims) failure of the trying, so we can infer that no proofreading took place. So the 'this' can't refer to it.

Now (10) falls into the same boat as (9): very odd; unlikely you'd say it. But (11) is normal because it's a habitual action. Sometimes the trying succeeds and sometimes it doesn't. But pretty definitely, writing is only improved on the occasions when proofreading takes place.

One more piece of practical knowledge and the story is complete. At this point there remain only two possible referents of 'this': either the proofreading, or the getting a proofreader on the occasions that trying to get one is successful. What else do humans know about this situation? This: That when you say you found someone to do something, they do it for you. (You could cancel this implicature by an extra clause like 'but the swine refused to help me', but if you don't, the implication holds.) So both possible references turn out to refer to the same situation.

And the amazing thing about language is that we understand all this instantly. There is no ambiguity in the example sentence. It is clear, and simple, and it is better writing than the alternatives that try to get out of imaginary problems by creating real problems such as redundancy and turgidness.