If you call an ad hoc meeting of your knitting buddies, it means the meeting was formed for one particular reason — to knit. Anything ad hoc is either done for one specific purpose, or in an impromptu, last-minute way.
Ad hoc comes from the Latin words meaning “for this.” Often the term is used as a criticism, in the sense that something done ad hoc is done hastily and can be ill thought out, serving only to address a problem in the short term. Government programs are often described as ad hoc, for example. But the term can also imply a sense of ingenuity, of impromptu brilliance, or of something happily care-free and devoid of fuss. Like your ad hoc knitting event!
for or concerned with one specific purpose“a coordinated policy instead of
ad hoc decisions”
specific(sometimes followed by `to’) applying to or characterized by or distinguishing something particular or special or unique
for one specific case“they were appointed
often improvised or impromptu“an
ad hoc committee meeting”
unplannedwithout apparent forethought or prompting or planning