I would like to ask a question. I was reading I John this morning and came to the verse where it says that if we say we have not sinned we make Him a liar and His word is not in us. I recognize that even though I have obeyed the gospel that I am still a sinner because I know I will never be perfect like Christ was. I try my best to confess my sins the moment I know I have committed one, although I feel I have a difficult time judging sin and temptation. For example, I pinched my finger on something and a thought of profanity popped up in my mind, although I didn’t say it because I know not to.
Anyway, the question that I have is that sometimes I’ll tell myself that at least I didn’t say any profanity. Am I saying that I have not sinned when I do this?
"This is the message we have heard from Him and announce to you, that God is Light, and in Him there is no darkness at all. If we say that we have fellowship with Him and yet walk in the darkness, we lie and do not practice the truth; but if we walk in the Light as He Himself is in the Light, we have fellowship with one another, and the blood of Jesus His Son cleanses us from all sin. If we say that we have no sin, we are deceiving ourselves and the truth is not in us. If we confess our sins, He is faithful and righteous to forgive us our sins and to cleanse us from all unrighteousness. If we say that we have not sinned, we make Him a liar and His word is not in us" (I John 1:5-10).
John is talking about a denial of having sinned. He is not talking about a momentary ignoring of a problem. For instance, there are a few religious groups that think that once you've reached a certain level of holiness that you cannot sin. Such would be a lie. You also find many people who deny that passages that call certain behaviors sinful really apply or that they mean something else. In those cases, they are saying God didn't mean what He said; in other words, that He lied. None of these apply to your situation.
Thoughts of using profanity are temptations to sin. Being tempted is not a sin, though obviously, it can easily lead to sin. "But each one is tempted when he is carried away and enticed by his own lust. Then when lust has conceived, it gives birth to sin; and when sin is accomplished, it brings forth death" (James 1:14-15). When you strongly desire to sin to the point that you basically decided to sin at some point in the future, that is called "lust." Because you have accepted sin, lust is wrong, even though you haven't actually committed the sin. But in your case, you know that profanity is wrong, so when the thought popped up, you rejected it, which is the proper thing to do.