From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arne =?iso-8859-1?Q?J=F8rgensen?= Newsgroups: gmane.emacs.devel Subject: Re: latexenc and `TeX-master' Date: Sun, 22 Jan 2006 15:24:42 +0100 Organization: Arne Joergensen -- http://arnested.dk/ Message-ID: <87y818z6fp.fsf@arnested.dk> References: <86169402-381A-4DAD-AF54-72DE99CD1959@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1137947950 26881 80.91.229.2 (22 Jan 2006 16:39:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2006 16:39:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 22 17:39:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F0iFA-0005fF-1T for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 17:39:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0iHj-0004FX-PH for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 11:41:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0hHF-0006w8-1m for emacs-devel@gnu.org; Sun, 22 Jan 2006 10:37:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0gI8-0002lc-O2 for emacs-devel@gnu.org; Sun, 22 Jan 2006 09:36:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0gC8-0002EA-K7 for emacs-devel@gnu.org; Sun, 22 Jan 2006 09:27:54 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1F0gGh-0002r5-P0 for emacs-devel@gnu.org; Sun, 22 Jan 2006 09:32:36 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F0g9K-0006Nj-Su for emacs-devel@gnu.org; Sun, 22 Jan 2006 15:24:59 +0100 Original-Received: from 213.237.94.152 ([213.237.94.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Jan 2006 15:24:58 +0100 Original-Received: from arne by 213.237.94.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Jan 2006 15:24:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 56 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213.237.94.152 X-Face: 5t,7/Y$&<1A_t.$vC2{pWZ{m@3_06; kcm]no{hgEL/}Uz(>XV6cl4}xO\v?-h3%>znNaZtq `~rf,GY1T%r=a.zH`hOb(-]'x)nI088Z&|e;V^h;/TShou User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:CwW485HqDShIZ7Dv8Jbv23VXlL8= 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:49396 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit David Reitter writes: > While it seems like the "TeX-master" statement is clearly wrong, I > think Emacs should tolerate that or give a useful error message rather > than bailing out. The patch below takes care of that. I think you have a good point. But it is probably better to check if the file is a regular and then also check if it is actually readable. Patch attached. Kind regards /arne -- Arne Jørgensen --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=latexenc.patch Content-Transfer-Encoding: 8bit Index: lisp/international/latexenc.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/international/latexenc.el,v retrieving revision 1.11 diff -u -p -r1.11 latexenc.el --- lisp/international/latexenc.el 2 Dec 2005 13:24:11 -0000 1.11 +++ lisp/international/latexenc.el 22 Jan 2006 14:22:40 -0000 @@ -1,6 +1,6 @@ ;;; latexenc.el --- guess correct coding system in LaTeX files -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. ;; Author: Arne J,Ax(Brgensen ;; Keywords: mule, coding system, latex @@ -156,7 +156,8 @@ coding system names is determined from ` "") ".tex" ".ltx" ".dtx" ".drv")) (if (and (null latexenc-main-file) ;Stop at first. - (file-exists-p (concat file ext))) + (file-regular-p (concat file ext)) + (file-readable-p (concat file ext))) (setq latexenc-main-file (concat file ext))))))) ;; try tex-modes tex-guess-main-file (when (and (not latexenc-dont-use-tex-guess-main-file-flag) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--