Taking a look at the 'Build Log' I get with a
foo.tex test file, it seems Gummi actually compiles
.foo.tex.swp, which is hidden on Unix due to the leading
., and which has extension
.tex. So TeX is showing you the correct information. For example, with demo file
foo.tex I get log
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
entering extended mode
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian,
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
p/pdftex.map}] (/tmp/.foo.tex.aux) )</usr/local/texlive/2012/texmf-dist/fonts/t
Output written on /tmp/.foo.tex.pdf (1 page, 11541 bytes).
SyncTeX written on /tmp/.foo.tex.synctex.gz.
Transcript written on /tmp/.foo.tex.log.
I'm afraid I don't have a solution (other than 'use a different editor'), as there does not seem to be a Gummi setting to alter this behaviour.
The edited question asks for a 'flexible' approach based on Herbert's code. With the restriction that this assumes a simple case (the file name contains only a single
. to separate the extension, except if it starts
.where Gummi is in use):
.in the file name? Do we need to cope with a hidden file which is not one created by Gummi?
.texor start with
.or the source have the