The different usages of ことがある


If I understand correctly, the main usages of `ことがある` seem to be the
following:

  * `Verb(plain)+ことがある`: There are times when (I)
  * `Verb(past)+ことがある`: (I) have experienced (something) before

But after [this
question](https://japanese.stackexchange.com/questions/3847/difference-
between-%E8%87%AA%E5%88%86-and-%E8%87%AA%E5%88%86%E8%87%AA%E8%BA%AB-and-how-
to-reflect-their-difference-in-english), I'm starting to wonder when `ことがある`
means "there is a thing/there are things" instead of "there are times when".

When looking through Space ALC and Google searches, I'm thinking `～たいことがある`
might mean "there's a thing I want to (do)" and `～たくなることがある` "there are times
when I want to (do)" based on the way they're used, but I can't be sure.

> 書きたくなることがあります  
> "there are times I want to write" (?)
>
> 書きたいことがあります  
> "there are things I want to write" (?)

What are the different usages of `ことがある`? When does `ことがある` mean "there are
things" rather than "there are times when" and how can they be told apart?




The clause used in `...ことがある` is structurally ambiguous between an appositive
clause and a relative clause.

> 書きたくなることがあります  
>  1\. As appositive clause  
>  `書きたくなる` 'I become tempted to write something' is the content of the formal
> noun `こと` 'occasion'  
>  'There are occasions that I become tempted to write something.'  
>  2\. As relative clause  
>  The `こと` '(factual) thing' is the missing object of the relative clause
> `書きたくなる` 'I become tempted to write'  
>  'There are things that I become tempted to write.'

It is just as the same in English. Depending on whether you interpret the
English `write` in:

> There are occasions that I become tempted to write

as intransitive or transitive, you can interpret the clause as appositive or
relative, and will get the two meanings.




The clause used in `...ことがある` is structurally ambiguous between an appositive
clause and a relative clause.

> 書きたくなることがあります  
>  1\. As appositive clause  
>  `書きたくなる` 'I become tempted to write something' is the content of the formal
> noun `こと` 'occasion'  
>  'There are occasions that I become tempted to write something.'  
>  2\. As relative clause  
>  The `こと` '(factual) thing' is the missing object of the relative clause
> `書きたくなる` 'I become tempted to write'  
>  'There are things that I become tempted to write.'

It is just as the same in English. Depending on whether you interpret the
English `write` in:

> There are occasions that I become tempted to write

as intransitive or transitive, you can interpret the clause as appositive or
relative, and will get the two meanings.

