From: "Arne Jørgensen" <arne@arnested.dk>
Subject: Re: latexenc and `TeX-master'
Date: Sun, 22 Jan 2006 15:26:58 +0100 [thread overview]
Message-ID: <87psmkz6bx.fsf@arnested.dk> (raw)
In-Reply-To: 86169402-381A-4DAD-AF54-72DE99CD1959@gmail.com
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
David Reitter <david.reitter@gmail.com> 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 <http://arnested.dk/>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: latexenc.patch --]
[-- Type: text/x-patch, Size: 1279 bytes --]
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 <arne@arnested.dk>
;; 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)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
prev parent reply other threads:[~2006-01-22 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-22 8:58 latexenc and `TeX-master' David Reitter
2006-01-22 14:24 ` Arne Jørgensen
2006-01-22 17:21 ` Arne Jørgensen
2006-01-23 9:54 ` David Reitter
2006-01-23 23:04 ` Arne Jørgensen
2006-01-23 14:31 ` Reiner Steib
2006-01-23 14:53 ` Arne Jørgensen
2006-01-22 14:26 ` Arne Jørgensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87psmkz6bx.fsf@arnested.dk \
--to=arne@arnested.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).