all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vc making coding system nil, latexenc not protecting
@ 2007-09-24 13:37 Karl Berry
  2007-09-24 13:51 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Karl Berry @ 2007-09-24 13:37 UTC (permalink / raw)
  To: emacs-devel; +Cc: neldredge

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 1699 bytes --]

Nate Eldredge (cc'd) reported a bug in emacs-22.1 when checking out
(C-x v v) an LaTeX file from RCS (exact recipe below); namely, getting
(wrong-type-argument arrayp nil)

There seem to be two problems, one in latexenc.el and one somewhere in VC.

The first is just a matter of defensive programming.  Nate tracked down
the error to the call of coding-system-base near the end of
lisp/international/latexenc.el:
                  (coding-system-base   ;Disregard the EOL part of the CS.
                   (with-current-buffer latexenc-main-buffer
                     (or coding-system-for-write buffer-file-coding-system))))

Both coding-system-for-write and buffer-file-coding-system are nil, and
thus coding-system-base throws the error.  It seems it would be
desirable to avoid the call and hence the error in this case -- if I
take out the call, for testing, everything goes through fine.  Or else
to change coding-system-base to be a no-op if its arg is nil.  I don't
know which would be better.


The second question is why both those variables are nil in the first
place.  After visiting the file, but before running CTRL-x v v,
buffer-file-coding-system is undecided-unix.  So somewhere within
vc-next-action it got set to nil.  I could not find where.  (Aside: too
bad edebug doesn't have watchpoints.)  Help?  coding-system-for-write is
always nil in this scenario, so it's not a factor.


Thanks for any help, and to Nate for his sleuthing.

Karl

Here is the recipe to reproduce the error; put the attached
template.tex,v file in the current directory first.

$ co template.tex   # with co -l, the error does not happen
$ emacs-22.1 -Q template.tex
CTRL-x v v
(observe arrayp error)


[-- Attachment #2: template.tex,v --]
[-- Type: application/octet-stream, Size: 241 bytes --]

head	1.1;
access;
symbols;
locks; strict;
comment	@% @;


1.1
date	2007.09.12.17.49.02;	author karl;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@\documentclass[12pt]{article}

\begin{document}

\end{document}
@

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-09-25 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24 13:37 vc making coding system nil, latexenc not protecting Karl Berry
2007-09-24 13:51 ` Andreas Schwab
2007-09-24 15:11 ` Nate Eldredge
2007-09-25 10:44   ` Richard Stallman
2007-09-24 21:32 ` Eli Zaretskii
2007-09-24 22:24   ` Karl Berry

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.