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:26:58 +0100 Organization: Arne Joergensen -- http://arnested.dk/ Message-ID: <87psmkz6bx.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 1137953023 9705 80.91.229.2 (22 Jan 2006 18:03:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2006 18:03:43 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 22 19:03:41 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 1F0jYn-0004xQ-8o for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 19:03:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0jaj-0007QO-0Y for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2006 13:05:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0hbb-0006ma-8h for emacs-devel@gnu.org; Sun, 22 Jan 2006 10:58:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0hQ6-0002Sq-9j for emacs-devel@gnu.org; Sun, 22 Jan 2006 10:46:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0gH2-0002fr-GT for emacs-devel@gnu.org; Sun, 22 Jan 2006 09:32:57 -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 1F0gLb-0003We-VN for emacs-devel@gnu.org; Sun, 22 Jan 2006 09:37:40 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1F0gEH-00079Z-QG for emacs-devel@gnu.org; Sun, 22 Jan 2006 15:30:05 +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:30:05 +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:30:05 +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 User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) 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 Cancel-Lock: sha1:6LrT8/WyenvQ5KjBefnCUdb/Z+4= 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:49397 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 --=-=-=--