Bad news, the socket is riveted in, so unless you're prepared to drill the rivets out and a socket that hasn't already been riveted, you're hosed.

The A/C looks attached to the housing, which is weird - but I can't be sure.  However I cannot imagine a safe and legal way to disconnect the housing from the armored cable and connect the new one that wouldn't create a hidden junction.

Looking at the PDFs, you MIGHT be able to detach the ... I guess it's the transformer? and socket housing from the frame mounting and replace it.

Can the socket in my recessed light be replaced without replacing the entire framing kit?
The command \jobname usually print the file name without the path and extension, so inside a file called foo.tex will print just foo. With pdflatex foo.test or compiling from LaTeXila certainly I obtained this result. But from Gummi what I obtain is .foo.tex  

Does anyone know why Gummi compiles differently and how I could get the usual \jobname behavior in Gummi?

Edit:
Based on helpful answers of @JosephWright and @Herbert
I wonder if it is possible to do the \jobname correction in Gummi only if the source have the .swp extensión or .tex persist in \jobname. 

That is, I would like a solution like:

\makeatletter
\let\JobName\jobname
\ifthenelse{\equal{\detokenize{foo}}{\jobname}}
{}
{
\def\@JobName.#1.#2\@nil{#1}
\def\jobname{\expandafter\@JobName\JobName\@nil}
}
\makeatother


This conditional works to check if the jobname is foo or not, but I want a general solution, independent of the file name (not limited to the string foo). 
