On my previous OS install, Debian Squeeze with FluxBox, my workflow was as follows:

With *.bib file open, I enter C-c C-c. The BibTeX command was recognized as necessary and ret executed it.

Then I would go back to the *.tex document, C-c C-c, and AUCTeX would recognize to execute LaTeX, C-c C-c again, and AUCTex would recognize to execute BibTeX, and a few more C-c C-c's and the PDF with bibliography would be viewed.

I recently updated the operating system to Debian Sid with xfce. Everything is working fine except that when I have a *.bib file open C-c C-c only brings up the View command. When a *.tex file is open the BibTeX command is never brought up using C-c C-c. However, when I enter the proper command manually everything works fine.

My .emacs is:

(set-face-foreground 'font-lock-comment-face "light blue")

(setq-default auto-fill-mode t)
(setq fill-column 120)

(setq make-backup-files nil)
(setq auto-save-default nil)

(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)

(setq auto-mode-alist (cons '("\\.m$" . matlab-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.oct$" . matlab-mode) auto-mode-alist))

(setq auto-mode-alist (cons '("\\.tex$" . TeX-latex-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.bib$" . TeX-latex-mode) auto-mode-alist))

(setq auto-mode-alist (cons '("\\.f03$" . fortran-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.f90$" . fortran-mode) auto-mode-alist))

(defun pdfevince ()
  (add-to-list 'TeX-output-view-style
               (quote ("^pdf$" "." "evince %o %(outpage)")))

(add-hook 'LaTeX-mode-hook 'pdfevince t)

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'TeX-PDF-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'auto-fill-mode)
(add-hook 'tex-mode-hook 'auto-fill-mode)
(add-hook 'tex-mode-hook 'flyspell-mode)
(add-hook 'bibtex-mode-hook 'flyspell-mode)

(add-hook 'LaTeX-mode-hook (lambda () (set-fill-column 120)))
(add-hook 'teX-mode-hook (lambda () (set-fill-column 120)))

(line-number-mode 1)
(column-number-mode 1)

(global-hl-line-mode 1)

Greatly indebted to any advice on this problem.

  • 1
    I have a line ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") within '(TeX-command-list — a list that’s too long to quote in full here. By the way, are you familiar with emacs.naquadah.org ? It’s one of Debian’s best kept secrets. – Thérèse Jul 28 '13 at 20:30
  • 2
    AUCTeX version? – giordano Jul 28 '13 at 20:31
  • @giordano the AucTeX version is 11.87-1. @Th\'er\'ese Thank you for the site recommendation, I'll look there. I had your BibTeX line in my .emacs but emacs complained on startup that the BibTeX function was not recognized. Are you saying you have the ("BibTeX" line within the (TeX-command-list statement? – Aikifuku Jul 28 '13 at 22:40
  • Yes. It may not need to be in .emacs, but check the TeX Command group of AUCTeX’s customization menu in case anything there looks odd; perhaps that will provide some clues. I suggested the site because I find emacs24 both more powerful and easier to use than emacs23 (which was both more powerful and easier to use than emacs22...). – Thérèse Jul 29 '13 at 0:22
  • @Aikifuku: I have the exact same problem with emacs24 and auctex11.87 on OSX, did you figure out a solution? – jonalm Aug 30 '13 at 16:00

Nothing is wrong with your init file. You need to configure AucTeX with the option ./configure <tab>--with-emacs, then just make and sudo make install.

Of course, in a perfect world emacs ought to be compiled by the user. But either way, this is assuming that your emacs is working as it should.

As a side note, you can always (add-to-list 'load-path "~/path/to/auctex-11.87/"), verify it with C-x C-e.

The easiest way to test it out, since we are dealing with bib files, is to make a small change in the bib file, say in one of the fields of either the author, or in the title of a miscellaneous item, or article, or book or whatever, and remember to save this bib file. Then go to your tex file and invoke C-c C-c again. It should return Command: (default BibTeX).

If it does not return the above Command: (default BibTeX) immediately, then, either your emacs was not compiled as it should have been compiled, or AucTeX needs to be compiled by one of the other options as outlined in http://www.gnu.org/software/auctex/manual/auctex.html#Installation .

  • Why would it be needed to recompile Emacs or AucTeX to have just to have this simple feature working? If I understand correctly the OP, he has both pieces of software working fine aside from the autodetection of the next command to run. Also, your answer does not indicate which options should be given to compile Emacs "as it should". Just compiling with the default options will just give the same result as what the distribution's maintainers packaged. – Georges Dupéron May 9 '16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.