it's actually infinitive but when infinitives (-mek) are used with suffixes that starts with a vowel they become -me like a gerund. Here it has accusative (-i) so that's why.
Elma yemeyi unuttum. -> I forgot to eat an apple.
Elma yemeye geldim. -> I came to eat an apple.
Elma yemekte ısrar ettim. -> I insisted on eating an apple.
Elma yemekten bıktım. -> I am fed up with eating an apple.
When the verb is an object you can use this structure. When it's an adverb you can use infinitives or gerunds depending on the function.
Its logic is actually very similar to the usage of nominative/accusative with direct objects. So if the infinitive represents an "indefinite" action you use it as nominative.
Seni görmeyi dört gözle bekliyorum. - I am looking forward to seeing you. (we are talking about a specific/definite action of seeing which we already recognize)
Seni görmek istiyorum - I want to see you. (this is an indefinite/non-specific action of seeing. we do not know when, how many times or how. I just wanna see you sometime or now)
Türkçe öğrenmeyi seviyorum. - I love/like learning Turkish. (we talk about a general action of learning, not on one or two occasions but always in general)
Türkçe öğrenmek istiyorum. - I want to learn Turkish. (this is again nonspecific because just like you want an apple you want a learning of Turkish. Türkçe öğrenmeyi istiyorum is also possible if learning Turkish is something you have been talking about and the speakers already know about.
Seni aramayı unuttum. - I forgot to call you. (this is a specific action which we already know about so we use accusative)
it is not an exception it depends on the meaning.
I think the personal suffixes are only used if the predicate is not a verb (I am generalizing, I don't know if this is really a rule but there is a pattern); because then the predicate doesn't tell us about the "person", so the suffix on the gerund help us. Maybe someone can explain better but I'll explain with examples:
- elma yemem lazım : I need to eat an apple.
- elma yemen yasak: It is forbidden for you to eat an apple.
- elma yemem zor: It is difficult for me to eat an apple.
- elma yemene izin veriyorum: I let you eat an apple.
- elma yemeyi seviyorum: I like eating apples
- elma yemeyi unuttum: I forgot eating apples
- elma yemeye geldim: I came to eat apples
- elma yemeye gittim: I went (there) to eat apples.
- elma almaya gittim: I went to buy apples
I don't really see why it is yemeyi rather than yememi, although my answer was accepted, the computer rated that as a typo.
Surely it's yemek for the infinitive, giving yeme for the short infinitive to which m is added to give the first person and then i is added to make it accusative?
That's not true, at least for my English, though the meaning changes depending on whether you use an infinitive or a gerund:
- I forgot to eat an apple: I was supposed to eat an apple, but I didn't do it. I forgot that I had to do so.
- I forgot eating an apple: I ate an apple. But then I forgot doing so. I do not remember eating the apple. But I still ate it.