unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: karl@freefriends.org (Karl Berry)
To: emacs-devel@gnu.org
Cc: neldredge@math.ucsd.edu
Subject: vc making coding system nil, latexenc not protecting
Date: Mon, 24 Sep 2007 08:37:04 -0500	[thread overview]
Message-ID: <200709241337.l8ODb4D26498@f7.net> (raw)

[-- 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

             reply	other threads:[~2007-09-24 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 13:37 Karl Berry [this message]
2007-09-24 13:51 ` vc making coding system nil, latexenc not protecting 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

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=200709241337.l8ODb4D26498@f7.net \
    --to=karl@freefriends.org \
    --cc=emacs-devel@gnu.org \
    --cc=neldredge@math.ucsd.edu \
    /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).