From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.devel Subject: Issue with format-alist (Buglet?) Date: Wed, 6 Aug 2008 10:31:40 +0200 Message-ID: <20080806083140.GA12719@tomas> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1218011174 16430 80.91.229.12 (6 Aug 2008 08:26:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2008 08:26:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 06 10:27:05 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KQeMK-0004TA-6E for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2008 10:27:04 +0200 Original-Received: from localhost ([127.0.0.1]:40273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQeLO-00085U-NU for ged-emacs-devel@m.gmane.org; Wed, 06 Aug 2008 04:26:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQeKc-0007US-Ah for emacs-devel@gnu.org; Wed, 06 Aug 2008 04:25:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQeKa-0007TO-G2 for emacs-devel@gnu.org; Wed, 06 Aug 2008 04:25:17 -0400 Original-Received: from [199.232.76.173] (port=32829 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQeKZ-0007TG-Sk for emacs-devel@gnu.org; Wed, 06 Aug 2008 04:25:15 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:54253 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQeKZ-0005wV-AR for emacs-devel@gnu.org; Wed, 06 Aug 2008 04:25:15 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id CC4DE9009B; Wed, 6 Aug 2008 10:31:40 +0200 (CEST) Content-Disposition: inline User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102116 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have got a small problem with format-alist, which I call like so: | (add-to-list 'format-alist | (list "ZEIT-k4c" | "ZEIT k4 cooked XML" | "^<\\?xml[^>]*>[^<]*
" | 'am-parse-region | 'am-unparse-region-other-buffer | t | 'am-mode) | nil | (lambda (x y) (equal (car x) (car y)))) Note that the sixth parameter is t -- i.e. I do modify the list in am-unparse-region-other-buffer. When the original buffer contains read-only stuff (i.e. some text with the read-only property set), the second attempt to save fails. It seems that the buffer " *Format Temp 0*" is kept around and its contents can't be overwritten because of the (copied). My Emacs is a fairly recent CVS checkout (three hours ago, GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-08-06 on tingklik). Here's the output of "report Emas bug": It seems that the pre-save format function can't be called twice when there is text marked read-only in the original buffer If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/share/emacs/23.0.60/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.10) of 2008-08-06 on tingklik Windowing system distributor `The X.Org Foundation', version 11.0.1040200= 0 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_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: am-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t use-hard-newlines: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: (only . t) Recent input: C-x C-f Z E a m a m - m o d e =20 =20 =20 =20 =20 =20 =20 =20 C-x C-f S i e m =20 =20 =20 =20 S i=20 e =20 =20 =20 =20 SPC C-x C-s C-x=20 C-s C-x b SPC F =20 =20 =20 =20 C-g M-x r e p o r Recent messages: Loading /home/tomas/.emacs.d/lisp/am/am-buffer.el (source)...done Loading /home/tomas/.emacs.d/lisp/am/am-xml.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Loading vc-git...done call-interactively: End of buffer am mode on Wrote /home/tomas/Siemens copy-to-buffer: Text is read-only Quit Making completion list... Regards - -- tom=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFImWFsBcgs9XrR2kYRAjj3AJ9VEnE/yL0oQF0YK9q/9B4TGutGdQCdEFQ8 evmCstNMSp3qO1wvMfzr9IU=3D =3D2ZcS -----END PGP SIGNATURE-----