Subject: 24.1; Problem chaining archive-mode and tar-mode.

From: Mihir <[email-masked]>
Date: Fri, 07 Dec 2012 07:15:42 +0530

I was editing a debian binary package (.deb). Finding the file opens it
in archive-mode, then finding the file 'data.tar.gz' opens it in
tar-mode. I proceeded to edit the file, which produced a warning message
reminding me to go and save the buffer for 'data.tar.gz'. However, when
I attempted to save the buffer for 'data.tar.gz', I got an error message
saying, "Symbol's value as variable is void: archive-ar-write-file-member".

I think this is because of a conflict between the hooks added to
'write-file-functions' by archive-mode and tar-mode. I notice this is
handled in archive-mode by this line in arc-mode.el:

(remove-hook 'write-contents-functions 'archive-write-file t))

which suggests that a similar fix might help in this case.

I am aware that it is better practice to simply regenerate the .deb
file, but this is a bug in Emacs nonetheless.

In GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-10-31 on ubuntu, modified by Debian
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -O2'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -g -g'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 1 ; 3 2 0 1 ; 0 c

Recent messages:
("emacs" "-f" "report-emacs-bug")
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/etc/emacs/xcscope hides /usr/share/emacs/24.1/site-lisp/cscope/xcscope
/usr/share/emacs/24.1/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/etc/emacs/xcscope hides /usr/share/emacs/site-lisp/xcscope
/usr/share/emacs/24.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/24.1/site-lisp/flim/hex-util hides /usr/share/emacs/24.1/lisp/hex-util
/usr/share/emacs/24.1/site-lisp/flim/md4 hides /usr/share/emacs/24.1/lisp/md4
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.1/lisp/textmodes/rst
/usr/share/emacs/24.1/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.1/lisp/textmodes/ispell
/usr/share/emacs/24.1/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.1/lisp/textmodes/flyspell
/usr/share/emacs/24.1/site-lisp/flim/ntlm hides /usr/share/emacs/24.1/lisp/net/ntlm
/usr/share/emacs/24.1/site-lisp/flim/hmac-md5 hides /usr/share/emacs/24.1/lisp/net/hmac-md5
/usr/share/emacs/24.1/site-lisp/flim/sasl-ntlm hides /usr/share/emacs/24.1/lisp/net/sasl-ntlm
/usr/share/emacs/24.1/site-lisp/flim/sasl-cram hides /usr/share/emacs/24.1/lisp/net/sasl-cram
/usr/share/emacs/24.1/site-lisp/flim/hmac-def hides /usr/share/emacs/24.1/lisp/net/hmac-def
/usr/share/emacs/24.1/site-lisp/flim/sasl-digest hides /usr/share/emacs/24.1/lisp/net/sasl-digest
/usr/share/emacs/24.1/site-lisp/flim/sasl hides /usr/share/emacs/24.1/lisp/net/sasl

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)