From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#5562: Emacs 23.1 problem with "tex-bibtex-file" command Date: Sat, 13 Feb 2010 20:04:01 -0600 Message-ID: <19319.23057.478129.38527@regnitz.physics.niu.edu> References: <877hqh4m43.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1266114167 21875 80.91.229.12 (14 Feb 2010 02:22:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2010 02:22:47 +0000 (UTC) Cc: wodejianghu@gmail.com, 5562@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 03:22:43 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NgU8B-0005Fr-53 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2010 03:22:43 +0100 Original-Received: from localhost ([127.0.0.1]:54117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgU8A-0003iR-I4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Feb 2010 21:22:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgU85-0003hr-La for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2010 21:22:37 -0500 Original-Received: from [140.186.70.92] (port=59499 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgU84-0003hf-3S for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2010 21:22:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NgU83-0004ar-Gm for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2010 21:22:36 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35501) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgU83-0004an-Dc for bug-gnu-emacs@gnu.org; Sat, 13 Feb 2010 21:22:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NgTr3-00010X-N5; Sat, 13 Feb 2010 21:05:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: "Roland Winkler" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2010 02:05:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5562 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5562-submit@debbugs.gnu.org id=B5562.12661130673859 (code B ref 5562); Sun, 14 Feb 2010 02:05:01 +0000 Original-Received: (at 5562) by debbugs.gnu.org; 14 Feb 2010 02:04:27 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgTqU-00010C-SI for submit@debbugs.gnu.org; Sat, 13 Feb 2010 21:04:27 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgTqT-000101-1n for 5562@debbugs.gnu.org; Sat, 13 Feb 2010 21:04:25 -0500 Original-Received: from regnitz.physics.niu.edu (adsl-68-77-0-1.dsl.emhril.ameritech.net [68.77.0.1]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 49920215D2; Sun, 14 Feb 2010 03:04:17 +0100 (CET) In-Reply-To: <877hqh4m43.fsf@stupidchicken.com> X-Mailer: VM 8.2 trial under 23.1.90.1 (i686-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 13 Feb 2010 21:05:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35102 Archived-At: On Sat Feb 13 2010 Chong Yidong wrote: > Hi Roland, could you take a look at this bug report? I'm not sure there > is enough info to reproduce, but I'm not familiar with bibtex-mode. > Thanks. > > > In Emacs LaTeX mode, whenever I tried to invoke bibtex command on the > > current file by using C-c Tab (equivalent to issusing command > > "tex-bibtex-file"), emacs changed the current directory to the home > > directory and thus not being able to find the corresponding *.aux > > file. > > > > Note that I was actually using Emacs LaTeX mode, not AucTeX mode. I can reproduce the bug easily with "emacs -q" for all my LaTeX files. (Usually I use auctex instead of tex-mode.) But it's not clear to me, what the code is supposed to do. tex-bibtex-file calls tex-main-file, which returns a relative filename. If there is just one LaTeX file, it is this file's name (without any directory). But then the working directory for the bibtex command is what file-name-directory returns for the relative file name returned by tex-main-file. This directory is usually nil. So the working directory for the bibtex command becomes the $HOME directory and bibtex fails. I suggest, someone should look at this who is more familiar with what tex-mode.el is supposed to do. This is a bug that should be fixed before the next release.