TITLE: A question on metric spaces
QUESTION [5 upvotes]: Let $X$ and $Y$ be two metric space and $f:X\to Y$ a function. Let $f:K\to Y$ be continuous for every compact set $K$ of $X$. Is $f$ continuous?

REPLY [2 votes]: The positive answer to this question should be seen as the result that every metric space, in fact every first countable space,  is a $k$-space, or to use another commonly used term, is compactly generated. 
The point is that that the category with objects Hausdorff topological  spaces and morphisms the functions continuous on compact subspaces has some convenient properties not held by the usual category of topological spaces. For example, in this category, the product of identification maps is an identification map. 
More background to this question is for example in the book Topology and Groupoids, Section 5.9, which also drops the Hausdorff assumption.