From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francois Fleuret Newsgroups: gmane.emacs.devel Subject: New tex-bibtex-file in tex-mode.el to take into account TeX-master Date: Mon, 22 Dec 2008 01:53:33 +0100 Message-ID: <18766.58637.52194.417250@moose.fleuret.org> 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 1229918133 15262 80.91.229.12 (22 Dec 2008 03:55:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Dec 2008 03:55:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 22 04:56:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LEbuC-0000bq-VF for ged-emacs-devel@m.gmane.org; Mon, 22 Dec 2008 04:56:33 +0100 Original-Received: from localhost ([127.0.0.1]:47534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEbt0-0004QZ-9V for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2008 22:55:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEZ3l-0007tH-K2 for emacs-devel@gnu.org; Sun, 21 Dec 2008 19:54:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEZ3k-0007t4-Si for emacs-devel@gnu.org; Sun, 21 Dec 2008 19:54:13 -0500 Original-Received: from [199.232.76.173] (port=48288 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEZ3k-0007t1-NE for emacs-devel@gnu.org; Sun, 21 Dec 2008 19:54:12 -0500 Original-Received: from barracuda.idiap.ch ([192.33.221.13]:36233) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEZ3k-0006aQ-90 for emacs-devel@gnu.org; Sun, 21 Dec 2008 19:54:12 -0500 X-ASG-Debug-ID: 1229907220-5be2004b0000-uRBjzT X-Barracuda-URL: http://barracuda.idiap.ch:8000/cgi-bin/mark.cgi Original-Received: from mail02.vs.idiap.ch (localhost [127.0.0.1]) by barracuda.idiap.ch (Spam Firewall) with ESMTP id 1BD072B7F43 for ; Mon, 22 Dec 2008 01:53:40 +0100 (CET) Original-Received: from mail02.vs.idiap.ch ([172.17.90.82]) by barracuda.idiap.ch with ESMTP id qbIK9muKjzCl8S0j (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 22 Dec 2008 01:53:40 +0100 (CET) X-Barracuda-RBL-Trusted-Forwarder: 172.17.90.82 X-ASG-Whitelist: Client Original-Received: from idiap.ch (208-102.79-83.cust.bluewin.ch [83.79.102.208]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail02.vs.idiap.ch (Postfix) with ESMTPSA id 3654B805C; Mon, 22 Dec 2008 01:53:39 +0100 (CET) Original-Received: by idiap.ch (Postfix, from userid 1000) id 153868BC0CF; Mon, 22 Dec 2008 01:53:33 +0100 (CET) X-ASG-Orig-Subj: New tex-bibtex-file in tex-mode.el to take into account TeX-master X-Mailer: VM 8.0.11 under Emacs 22.2.1 (i486-pc-linux-gnu) X-Barracuda-Connect: UNKNOWN[172.17.90.82] X-Barracuda-Start-Time: 1229907224 X-Barracuda-Encrypted: AES256-SHA X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at idiap.ch X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-Mailman-Approved-At: Sun, 21 Dec 2008 22:55:14 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107167 Archived-At: Dear Emacs developers, I slightly modified tex-bibtex-file so that it takes into account the variable TeX-master. I guess it was a bug not to do so. Here it is: ---------------------------- snip snip ------------------------------- (defun tex-bibtex-file () "Run BibTeX on the current buffer's file." (interactive) (if (tex-shell-running) (tex-kill-job) (tex-start-shell)) (let (shell-dirtrack-verbose (tex-out-file (tex-append (or (and (boundp 'TeX-master) (file-name-nondirectory TeX-master)) (file-name-nondirectory (buffer-file-name))) "")) (file-dir (or (and (boundp 'TeX-master) (file-name-directory TeX-master)) (file-name-directory (buffer-file-name))))) (tex-send-command tex-shell-cd-command file-dir) (tex-send-command tex-bibtex-command tex-out-file)) (tex-display-shell)) ---------------------------- snip snip ------------------------------- Best, -- Francois Fleuret http://www.idiap.ch/~fleuret