Arc Forumnew | comments | leaders | submitlogin
1 point by lojic 6094 days ago | link | parent

I think I found the problem. It looks like the auto-coding-alist is the culprit:

  (("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|exe\\|rar\\|ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|EXE\\|RAR\\)\\'" . no-conversion)
   ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion)
   ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion)
   ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
   ("\\.pdf\\'" . no-conversion)
   ("/#[^/]+#\\'" . emacs-mule))
Documentation:

Alist of filename patterns vs corresponding coding systems. Each element looks like (REGEXP . CODING-SYSTEM). A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading.

The settings in this alist take priority over `coding:' tags in the file (see the function `set-auto-coding') and the contents of `file-coding-system-alist'.



3 points by nex3 6094 days ago | link

Okay, here's a new solution:

  (dolist (coding auto-coding-alist)
    (when (and (string-match "[Aa][Rr][Cc]\\\\|" (car coding))
               (eq (cdr coding) 'no-conversion))
      (setcar coding (replace-match "" nil nil (car coding)))))
I'll replace the fix in arc.el.

-----

1 point by lojic 6094 days ago | link

Cool. And thanks for the great elisp examples - I'm just learning elisp (and Lisp in general), so every bit helps.

-----

1 point by nex3 6094 days ago | link

No problem :-).

In my experience, the most important thing to remember when learning elisp is "C-h f", followed by "C-h i m elisp RET".

-----

1 point by nex3 6094 days ago | link

Are you sure this is it? Because my solution (http://arclanguage.org/item?id=4536) works for me, and doesn't touch auto-coding-alist.

Edit: Oh, wait, maybe it's not working. Gah.

-----

1 point by lojic 6094 days ago | link

Yes, I'm sure :) I did:

  C-h v auto-code-alist
and clicked on the customize link, then removed arc, and everything works great.

If only pg used emacs :)

-----