From unknown Sun Jun 15 01:07:10 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Mail-Followup-To: Kevin Ryde , 5440@debbugs.gnu.org Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jan 2010 23:06:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5440 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@debbugs.gnu.org id=B.126411510327211 (code B ref -1); Thu, 21 Jan 2010 23:06:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2010 23:05:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NY65H-00074q-Ay for submit@debbugs.gnu.org; Thu, 21 Jan 2010 18:05:03 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NY652-00074S-RG for submit@debbugs.gnu.org; Thu, 21 Jan 2010 18:05:01 -0500 Received: from mail.gnu.org ([199.232.76.166]:44749 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NY64y-0001M7-RR for submit@debbugs.gnu.org; Thu, 21 Jan 2010 18:04:45 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NY64w-0004tK-Eo for submit@debbugs.gnu.org; Thu, 21 Jan 2010 18:04:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:59870) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NY64w-0004tE-88 for submit@debbugs.gnu.org; Thu, 21 Jan 2010 18:04:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NY64w-00043x-07 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 18:04:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NY64r-0003z9-Cj for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 18:04:41 -0500 Received: from [199.232.76.173] (port=50350 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY64r-0003z4-71 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 18:04:37 -0500 Received: from mailout1-12.pacific.net.au ([125.255.80.131]:41059 helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NY64q-0004sA-5G for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2010 18:04:36 -0500 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id A98745204C5 for ; Fri, 22 Jan 2010 10:04:30 +1100 (EST) Received: from blah.blah (ppp20D8.dyn.pacific.net.au [61.8.32.216]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 95C5F8C4D for ; Fri, 22 Jan 2010 10:04:28 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1NY63e-0001kK-4L for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2010 10:03:22 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Date: Fri, 22 Jan 2010 10:03:21 +1100 Message-ID: <87sk9z3vt2.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) --=-=-= The way build_annotations() makes `format-annotate-function' use the same temp buffer " *Format Temp 0*" on each call is not reentrant. If TO-FN from the format-alist does anything that writes another buffer with a buffer-file-format then the buffer which TO-FN is supposed to be working on is clobbered. foo.el below illustrates the problem. Evaluating it writes a /tmp/x containing THIS IS FORMAT ONE this is buffer yyy text where I expected it to be THIS IS FORMAT TWO hello world The `message's emitted by my-one-encode and my-two-encode show they get the same " *Format Temp 0*" buffer. The latter is what you get in /tmp/x if taking away the "/tmp/y" blob within `my-two-encode'. I expect this wouldn't arise often in practice, but it ought to be reasonably easy to make build_annotations() (or wherever) do better in the management of temporary buffers. I expect it's a matter of finding the right place in the write crunching that temp buffers used can be killed. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=foo.el Content-Transfer-Encoding: quoted-printable (add-to-list 'format-alist '(my-one "My format." nil ;; no automatic decode my-one-decode my-one-encode t ;; encode modifies the region nil)) ;; write removes from buffer-file-formats (defun my-one-decode (beg end) end) (defun my-one-encode (beg end buffer) (message "my-one-encode in %S" (current-buffer)) (save-excursion (save-restriction (narrow-to-region beg end) (insert "THIS IS FORMAT ONE\n") (point-max)))) (add-to-list 'format-alist '(my-two "My format." nil ;; no automatic decode my-two-decode my-two-encode t ;; encode modifies the region nil)) ;; write removes from buffer-file-formats (defun my-two-decode (beg end) (save-excursion (save-restriction (narrow-to-region beg end) (goto-char beg) (if (looking-at "THIS IS FORMAT TWO\n") (delete-region (match-beginning 0) (match-end 0))) (point-max)))) (defun my-two-encode (beg end buffer) (message "my-two-encode in %S" (current-buffer)) (save-excursion (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (insert "THIS IS FORMAT TWO\n") (save-current-buffer (find-file "/tmp/y") (format-decode-buffer 'my-one) (erase-buffer) (insert "this is buffer yyy text\n") (save-buffer) (kill-buffer nil)) (point-max)))) (progn (find-file "/tmp/x") (format-decode-buffer 'my-two) (erase-buffer) (insert "hello world\n") (save-buffer) (kill-buffer nil) (find-file "/tmp/x")) --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-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/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' 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_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t --=-=-=-- From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2016 04:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kevin Ryde Cc: 5440@debbugs.gnu.org Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.14690756103274 (code B ref 5440); Thu, 21 Jul 2016 04:34:02 +0000 Received: (at 5440) by debbugs.gnu.org; 21 Jul 2016 04:33:30 +0000 Received: from localhost ([127.0.0.1]:59182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ5ft-0000qk-KK for submit@debbugs.gnu.org; Thu, 21 Jul 2016 00:33:29 -0400 Received: from mail-qk0-f169.google.com ([209.85.220.169]:35071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQ5fr-0000qW-St for 5440@debbugs.gnu.org; Thu, 21 Jul 2016 00:33:28 -0400 Received: by mail-qk0-f169.google.com with SMTP id s63so64132346qkb.2 for <5440@debbugs.gnu.org>; Wed, 20 Jul 2016 21:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=8189A3ueOjEb30frzswYoJV8bxxSxKiD51OHHCPoxPQ=; b=cvp2atJtB9P12FtLuTt57xoGdlDOVjGyTCaB3zCJjl1bqY9OcDCLAup0gs9yy02f6S E1ihyIf3vmgrfouqh/3mv2aoC4KNg6qrsQd0qrd81QeJH3yhQZ8rh8h6IIPf5evDM8K+ Bs4et+q0JF4p5itYHtJdEDToBIQGpXYWNnMFfuda4o46skgYIiKG2aoRuPSeoI/YATfG ABSe3a7xAXt7keCAxvIa5rxkdJsEVT/bS6W6v8fgHqDt9DZQSwDbaXEj63+NR/8BfSDd Psy8sGrq58gelZsIy5f+JwGaq31A+O1bB81+rtNpaz2Cg2O/4ihbgFIcKfvnndo90E6d eYqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=8189A3ueOjEb30frzswYoJV8bxxSxKiD51OHHCPoxPQ=; b=RMX+nXtDfP4l+1STQYnCImwwcO9zb49hbhKTXX9it/3mmpEmVB0+irxxh6hoKytWzo 8maDosk5L1fFAi6Ua6n+v5K90ebfYyGvzBPN3Wmra+POVofG2WvjZwdyLTnORqlfmmDJ Vf56FO46bnvgeGh3VKqrUMifRqHiy8doQOKs3dAl/Dv1zLUzwt+XcfuDGHBAKIB//0MT ZhpnO6Vbq4vgSSEGZ5JVYwhpasFK/0d5G60MBk0y+SuU3ikm4c6FRP+bZOjmseESggkB TuDHUtxcCaiIMf1uXFSzj0XQL39ly5YfNu+ZlDBJaao4MJrP5ZaV85QejR6hVEye3zdE u2hg== X-Gm-Message-State: ALyK8tJ243E/Pd8UuKW+M3GM5El3RdCd0Pt/IckGchnmKwkDn+GTygWY0ECNKXiMyjAdWQ== X-Received: by 10.55.88.68 with SMTP id m65mr22717011qkb.205.1469075601823; Wed, 20 Jul 2016 21:33:21 -0700 (PDT) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id g29sm3354139qtg.12.2016.07.20.21.33.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 21:33:18 -0700 (PDT) From: Andrew Hyatt References: <87sk9z3vt2.fsf@blah.blah> Date: Thu, 21 Jul 2016 00:33:17 -0400 In-Reply-To: <87sk9z3vt2.fsf@blah.blah> (Kevin Ryde's message of "Fri, 22 Jan 2010 10:03:21 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This reproduces on Emacs 25. But I wonder if this should be a wishlist instead of a bug. As the original report notes, decoding a buffer while encoding another buffer doesn't seem like a normal use-case. If no one objects in the next few weeks, I can wishlist this. Making it a minor-severity bug also seems reasonable to me. Kevin Ryde writes: > The way build_annotations() makes `format-annotate-function' use the > same temp buffer " *Format Temp 0*" on each call is not reentrant. If > TO-FN from the format-alist does anything that writes another buffer > with a buffer-file-format then the buffer which TO-FN is supposed to be > working on is clobbered. > > foo.el below illustrates the problem. Evaluating it writes a /tmp/x > containing > > THIS IS FORMAT ONE > this is buffer yyy text > > where I expected it to be > > THIS IS FORMAT TWO > hello world > > The `message's emitted by my-one-encode and my-two-encode show they get > the same " *Format Temp 0*" buffer. The latter is what you get in > /tmp/x if taking away the "/tmp/y" blob within `my-two-encode'. > > I expect this wouldn't arise often in practice, but it ought to be > reasonably easy to make build_annotations() (or wherever) do better in > the management of temporary buffers. I expect it's a matter of finding > the right place in the write crunching that temp buffers used can be > killed. > > > (add-to-list 'format-alist '(my-one > "My format." > nil ;; no automatic decode > my-one-decode > my-one-encode > t ;; encode modifies the region > nil)) ;; write removes from buffer-file-formats > > (defun my-one-decode (beg end) > end) > > (defun my-one-encode (beg end buffer) > (message "my-one-encode in %S" (current-buffer)) > > (save-excursion > (save-restriction > (narrow-to-region beg end) > > (insert "THIS IS FORMAT ONE\n") > > (point-max)))) > > > (add-to-list 'format-alist '(my-two > "My format." > nil ;; no automatic decode > my-two-decode > my-two-encode > t ;; encode modifies the region > nil)) ;; write removes from buffer-file-formats > > (defun my-two-decode (beg end) > (save-excursion > (save-restriction > (narrow-to-region beg end) > > (goto-char beg) > (if (looking-at "THIS IS FORMAT TWO\n") > (delete-region (match-beginning 0) (match-end 0))) > > (point-max)))) > > (defun my-two-encode (beg end buffer) > (message "my-two-encode in %S" (current-buffer)) > > (save-excursion > (save-restriction > (narrow-to-region beg end) > > (goto-char (point-min)) > (insert "THIS IS FORMAT TWO\n") > > (save-current-buffer > (find-file "/tmp/y") > (format-decode-buffer 'my-one) > (erase-buffer) > (insert "this is buffer yyy text\n") > (save-buffer) > (kill-buffer nil)) > > (point-max)))) > > > (progn > (find-file "/tmp/x") > (format-decode-buffer 'my-two) > (erase-buffer) > (insert "hello world\n") > (save-buffer) > (kill-buffer nil) > (find-file "/tmp/x")) > > > > In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) > of 2009-09-14 on raven, modified by Debian > configured using `configure '--build=i486-linux-gnu' '--host=i486-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/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' > > 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_AU > value of $XMODIFIERS: nil > locale-coding-system: iso-latin-1-unix > default-enable-multibyte-characters: t From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2016 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrew Hyatt Cc: 5440@debbugs.gnu.org, user42@zip.com.au Reply-To: Eli Zaretskii Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.14691112531285 (code B ref 5440); Thu, 21 Jul 2016 14:28:01 +0000 Received: (at 5440) by debbugs.gnu.org; 21 Jul 2016 14:27:33 +0000 Received: from localhost ([127.0.0.1]:60558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQEwj-0000Ka-DK for submit@debbugs.gnu.org; Thu, 21 Jul 2016 10:27:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQEwd-0000KF-Gf for 5440@debbugs.gnu.org; Thu, 21 Jul 2016 10:27:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQEwX-0002FE-Kw for 5440@debbugs.gnu.org; Thu, 21 Jul 2016 10:27:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQEwX-0002Ec-HX; Thu, 21 Jul 2016 10:27:17 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4918 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bQEwU-0007TD-CQ; Thu, 21 Jul 2016 10:27:15 -0400 Date: Thu, 21 Jul 2016 17:27:21 +0300 Message-Id: <838twvysl2.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Andrew Hyatt on Thu, 21 Jul 2016 00:33:17 -0400) References: <87sk9z3vt2.fsf@blah.blah> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: Andrew Hyatt > Date: Thu, 21 Jul 2016 00:33:17 -0400 > Cc: 5440@debbugs.gnu.org > > This reproduces on Emacs 25. But I wonder if this should be a wishlist > instead of a bug. As the original report notes, decoding a buffer > while encoding another buffer doesn't seem like a normal use-case. > > If no one objects in the next few weeks, I can wishlist this. Making it > a minor-severity bug also seems reasonable to me. I agree. I also suggest to amend the documentation to make this issue more explicitly mentioned. The ELisp manual already says -- Variable: format-alist This list contains one format definition for each defined file format. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^ "Only one format definition per format." But I think it won't do any harm to specifically warn about violating that. Thanks. From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jul 2016 05:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 5440@debbugs.gnu.org, user42@zip.com.au Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.146933677822131 (code B ref 5440); Sun, 24 Jul 2016 05:07:01 +0000 Received: (at 5440) by debbugs.gnu.org; 24 Jul 2016 05:06:18 +0000 Received: from localhost ([127.0.0.1]:35208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRBcH-0005ks-Qk for submit@debbugs.gnu.org; Sun, 24 Jul 2016 01:06:18 -0400 Received: from mail-qt0-f182.google.com ([209.85.216.182]:34221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRBcE-0005ke-6C for 5440@debbugs.gnu.org; Sun, 24 Jul 2016 01:06:16 -0400 Received: by mail-qt0-f182.google.com with SMTP id u25so81858019qtb.1 for <5440@debbugs.gnu.org>; Sat, 23 Jul 2016 22:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dS1HYb9oaPG81Pj6LiTykQ0Mk5ibg0fqfAVPGZUEWlM=; b=hljyL+b1eBm8x7aoQjkoLhKQlg7a5qVKAnGZWYyo933RJKx3+mHSCDpxfnRyxLA+dO lmx/Qgz2F7T4fmmnMwQ2C8YOsm5n9Mt/0joADU9ybbfnu+HAnEXrWHWgM3onRA7w8+dy VRhxJehLSMpwy9xM2an9bUJLhVFnFsRf0J0PaWmDbxdBVsqZElu0sQWMUX5lGXEwftKd wdu8uASQHX84jMoI0IhSOG7TqBlQusJiYaN2Wv5LXVZEEQJDfjK8lF97L5lQWJUKRzUO Nn9I1L7s6MhWtEkGZR990GCK5xPzopV1sohZRqga8+nPufyGJDYPn7g8ZwnDxyXOWFSZ vXdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=dS1HYb9oaPG81Pj6LiTykQ0Mk5ibg0fqfAVPGZUEWlM=; b=K4HdzaqxSARsjF650n21dhghSeLwCnLo4nmFwNh0ebMyGWl+R1BQs1CqZT5dy0han/ 3L7ip5drdtsap7edDTEKvIbvtBMVU4KX9mxbrtnYzMpKEtV2xh9jxw/V875h3QEWuRGa LdmQSPaq+YP+XzjRJPUojE19Q/fEMxhI/+TO1C4pj7LH8vnVeOf80wTgYUhEPli8QPne akDnN7gLCG7mRJDsHp9O5Unh3KYLqqVSTM9ORlomwy2RbdR4cviRRKnao1oD4Kzj7t7U csgVoaz5mOVfsq3/rEiiVDJEuQd6/3FMDc6VxeDeNE2MBWhTM7jdY7BwnatFm9gMtxnL lrgg== X-Gm-Message-State: AEkoouvN1zIJnHfUWFrHI4fG9Ei2tWubxGKEUNDBOZsy/U1Hz2x2lOqZKoftMY3NQD/tig== X-Received: by 10.237.39.34 with SMTP id n31mr12384214qtd.55.1469336768733; Sat, 23 Jul 2016 22:06:08 -0700 (PDT) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id u44sm11831532qtc.27.2016.07.23.22.06.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jul 2016 22:06:06 -0700 (PDT) From: Andrew Hyatt References: <87sk9z3vt2.fsf@blah.blah> <838twvysl2.fsf@gnu.org> Date: Sun, 24 Jul 2016 01:06:05 -0400 In-Reply-To: <838twvysl2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jul 2016 17:27:21 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> From: Andrew Hyatt >> Date: Thu, 21 Jul 2016 00:33:17 -0400 >> Cc: 5440@debbugs.gnu.org >> >> This reproduces on Emacs 25. But I wonder if this should be a wishlist >> instead of a bug. As the original report notes, decoding a buffer >> while encoding another buffer doesn't seem like a normal use-case. >> >> If no one objects in the next few weeks, I can wishlist this. Making it >> a minor-severity bug also seems reasonable to me. > > I agree. I also suggest to amend the documentation to make this issue > more explicitly mentioned. The ELisp manual already says > > -- Variable: format-alist > This list contains one format definition for each defined file > format. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ^^^^^^ > > "Only one format definition per format." But I think it won't do any > harm to specifically warn about violating that. > > Thanks. I think the original bug report had one format definition for each defined file format, but was manipulating a file in one format while in another format function. How about I change the documentation to just warn not to manipulate other files in FROM-FN here? From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jul 2016 14:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrew Hyatt Cc: 5440@debbugs.gnu.org, user42@zip.com.au Reply-To: Eli Zaretskii Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.146937033721821 (code B ref 5440); Sun, 24 Jul 2016 14:26:01 +0000 Received: (at 5440) by debbugs.gnu.org; 24 Jul 2016 14:25:37 +0000 Received: from localhost ([127.0.0.1]:35944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRKLZ-0005fs-4p for submit@debbugs.gnu.org; Sun, 24 Jul 2016 10:25:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRKLX-0005fg-Mr for 5440@debbugs.gnu.org; Sun, 24 Jul 2016 10:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRKLO-0000KW-KH for 5440@debbugs.gnu.org; Sun, 24 Jul 2016 10:25:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRKLO-0000KO-HG; Sun, 24 Jul 2016 10:25:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3395 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bRKLM-0003Ou-IU; Sun, 24 Jul 2016 10:25:25 -0400 Date: Sun, 24 Jul 2016 17:25:37 +0300 Message-Id: <83twfft8ny.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Andrew Hyatt on Sun, 24 Jul 2016 01:06:05 -0400) References: <87sk9z3vt2.fsf@blah.blah> <838twvysl2.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: Andrew Hyatt > Cc: user42@zip.com.au, 5440@debbugs.gnu.org > Date: Sun, 24 Jul 2016 01:06:05 -0400 > > > -- Variable: format-alist > > This list contains one format definition for each defined file > > format. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > ^^^^^^ > > > > "Only one format definition per format." But I think it won't do any > > harm to specifically warn about violating that. > > > > Thanks. > > I think the original bug report had one format definition for each > defined file format, but was manipulating a file in one format while in > another format function. That's more than one format in disguise. > How about I change the documentation to just warn not to manipulate > other files in FROM-FN here? Can you show a proposed patch? Thanks. From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jul 2016 04:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 5440@debbugs.gnu.org, user42@zip.com.au Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.1469419682587 (code B ref 5440); Mon, 25 Jul 2016 04:09:02 +0000 Received: (at 5440) by debbugs.gnu.org; 25 Jul 2016 04:08:02 +0000 Received: from localhost ([127.0.0.1]:36224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRXBR-00009K-PP for submit@debbugs.gnu.org; Mon, 25 Jul 2016 00:08:02 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:35529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRXBQ-000093-CE for 5440@debbugs.gnu.org; Mon, 25 Jul 2016 00:08:00 -0400 Received: by mail-qt0-f180.google.com with SMTP id x25so90860646qtx.2 for <5440@debbugs.gnu.org>; Sun, 24 Jul 2016 21:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=L0fNqMqys17/TOqlfQeYUFPFJL0qEyUfIUlbNibo4ks=; b=GQLcx4ts5OyI7BnlSQfhDlr5ivgGZTS0zGSNKgKeFb2SlIrNOEYTJaAx7sL63RVG/h VVUweZDgZ1B3ie5w3lDcR3l2Lc4rYGw2U3JNTSyjfrBaLpCbPHq2yzv5UoceOXfssjYJ Le5INBSY/4YkAjNgr/Fi7k/wp086tcr3ipDKdZOu0V0szOM0KPjpLkH8NU15hOwwCFjv /H+6OVFQPcjMCxo9ag+K2xBQ49ovhmJumB5yVVsA15HI9y03OfDmk5ejbSN2RaRQn7yC MevGbfT8uuT3Ky7vnfXsH6PiuzCtQ8HS4Mfp2Z9oTG0rYWR/Wy/+vZnGMV/xjDFRxT16 Znhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=L0fNqMqys17/TOqlfQeYUFPFJL0qEyUfIUlbNibo4ks=; b=S7KlXrAV1MgPnmPvb67AJB1FQZuJT51qK9UxhAzxgUSM931EK9VZ09E0u4iSLwrnO7 CMKTNTVSKNDcFMe7zlUupYBRIhBEkN5ey/Z2EfnnCEHk4/NSp68EJYyjKDw4AcZMefyJ co9usB2Cr6oQP2VvbPOX7EZhGcAP8/XuukD4d4RjyehiteEyM8hATGRJ7axIs3oggp85 jAHvQS52yeGzBjPmJ2lO0jeLBYiP2EXZa+JXvP1k9G7Cmr7Q+zr6mx5lbK5eoBJdOCfS 7arzOEgHIh1Hc4JYOtAZXZnmPCmmgZtWJ2XluU5nqzpfrv36H7kjPh4fqsVVpG3OeqfW zyuA== X-Gm-Message-State: AEkoout+wkzRkXXFwbqmPGuTa0ot2+WFvZQLBoQv1n+r9zkdws496rz8HFnpPgVmXSyIKw== X-Received: by 10.200.56.155 with SMTP id f27mr26147685qtc.26.1469419674820; Sun, 24 Jul 2016 21:07:54 -0700 (PDT) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id j38sm14281514qtj.35.2016.07.24.21.07.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jul 2016 21:07:52 -0700 (PDT) From: Andrew Hyatt References: <87sk9z3vt2.fsf@blah.blah> <838twvysl2.fsf@gnu.org> <83twfft8ny.fsf@gnu.org> Date: Mon, 25 Jul 2016 00:07:50 -0400 In-Reply-To: <83twfft8ny.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 24 Jul 2016 17:25:37 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Andrew Hyatt >> Cc: user42@zip.com.au, 5440@debbugs.gnu.org >> Date: Sun, 24 Jul 2016 01:06:05 -0400 >> >> > -- Variable: format-alist >> > This list contains one format definition for each defined file >> > format. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > ^^^^^^ >> > >> > "Only one format definition per format." But I think it won't do any >> > harm to specifically warn about violating that. >> > >> > Thanks. >> >> I think the original bug report had one format definition for each >> defined file format, but was manipulating a file in one format while in >> another format function. > > That's more than one format in disguise. > >> How about I change the documentation to just warn not to manipulate >> other files in FROM-FN here? > > Can you show a proposed patch? > > Thanks. Attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Warn-against-unintentional-recursion-in-formatting.patch Content-Description: format-alist docs patch >From 18eb654c4541a49f415d4826974fd2c216f2c2db Mon Sep 17 00:00:00 2001 From: Andrew Hyatt Date: Sun, 24 Jul 2016 23:58:47 -0400 Subject: [PATCH] Warn against unintentional recursion in formatting. Change documentation for format-alist to warn against formatting when formatting, which leads to incorrect results.. --- doc/lispref/files.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index f3650a4..5763380 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3238,7 +3238,9 @@ Format Conversion Round-Trip One responsibility of @var{from-fn} is to make sure that the beginning of the file no longer matches @var{regexp}. Otherwise it is likely to -get called again. +get called again. Also, @var{from-fn} must not involve other buffers or +files other than the one being decoded, or else formatting may happen +during formatting, leading to incorrect results. @item to-fn A shell command or function to encode data in this format---that is, to @@ -3269,6 +3271,10 @@ Format Conversion Round-Trip positions. All this takes place without modifying the buffer. @end itemize +@var{to-fn} must not involve other buffers or files other than the one +being encoded, or else formatting may happen during formatting, +leading to incorrect results. + @item modify A flag, @code{t} if the encoding function modifies the buffer, and @code{nil} if it works by returning a list of annotations. -- 2.4.9 (Apple Git-60) --=-=-=-- From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jul 2016 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrew Hyatt Cc: 5440@debbugs.gnu.org, user42@zip.com.au Reply-To: Eli Zaretskii Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.146946456810374 (code B ref 5440); Mon, 25 Jul 2016 16:37:01 +0000 Received: (at 5440) by debbugs.gnu.org; 25 Jul 2016 16:36:08 +0000 Received: from localhost ([127.0.0.1]:37125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRirP-0002hG-NO for submit@debbugs.gnu.org; Mon, 25 Jul 2016 12:36:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRirL-0002gk-MN for 5440@debbugs.gnu.org; Mon, 25 Jul 2016 12:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRirD-00065z-Cg for 5440@debbugs.gnu.org; Mon, 25 Jul 2016 12:35:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRirD-00065t-9K; Mon, 25 Jul 2016 12:35:55 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4842 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bRirC-0005xa-9g; Mon, 25 Jul 2016 12:35:54 -0400 Date: Mon, 25 Jul 2016 19:35:41 +0300 Message-Id: <83shuxu142.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Andrew Hyatt on Mon, 25 Jul 2016 00:07:50 -0400) References: <87sk9z3vt2.fsf@blah.blah> <838twvysl2.fsf@gnu.org> <83twfft8ny.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.3 (------) > From: Andrew Hyatt > Cc: user42@zip.com.au, 5440@debbugs.gnu.org > Date: Mon, 25 Jul 2016 00:07:50 -0400 > > diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi > index f3650a4..5763380 100644 > --- a/doc/lispref/files.texi > +++ b/doc/lispref/files.texi Thanks. A couple of comments: > @@ -3238,7 +3238,9 @@ Format Conversion Round-Trip > > One responsibility of @var{from-fn} is to make sure that the beginning > of the file no longer matches @var{regexp}. Otherwise it is likely to > -get called again. > +get called again. Also, @var{from-fn} must not involve other buffers or > +files other than the one being decoded One of these 2 "others" should be deleted, I think. > or else formatting may happen > +during formatting, leading to incorrect results. I would say something like otherwise the internal buffer used for formatting might be overwritten. > +@var{to-fn} must not involve other buffers or files other than the one > +being encoded, or else formatting may happen during formatting, > +leading to incorrect results. Same here. From unknown Sun Jun 15 01:07:10 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Jul 2016 01:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 5440@debbugs.gnu.org, user42@zip.com.au Received: via spool by 5440-submit@debbugs.gnu.org id=B5440.146949560731801 (code B ref 5440); Tue, 26 Jul 2016 01:14:01 +0000 Received: (at 5440) by debbugs.gnu.org; 26 Jul 2016 01:13:27 +0000 Received: from localhost ([127.0.0.1]:37378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRqw3-0008Gq-3Y for submit@debbugs.gnu.org; Mon, 25 Jul 2016 21:13:27 -0400 Received: from mail-qt0-f174.google.com ([209.85.216.174]:35384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRqvz-0008Gc-Nv for 5440@debbugs.gnu.org; Mon, 25 Jul 2016 21:13:25 -0400 Received: by mail-qt0-f174.google.com with SMTP id x25so109245018qtx.2 for <5440@debbugs.gnu.org>; Mon, 25 Jul 2016 18:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Tb3I8MGtROj5hbv077g6ZVKFC4zeX4OINd+AQB3Ay6w=; b=Kr1ytFvWSaNxCU0mAmBtgpE9CfNUVcTCKr6CjJNa+nnID4kiOqZRS6dXKFobDwV6d3 thK+ewozM1eE2j9/Khq4KkqfPS6369sDsdFQCZnpg5zV3c4hiQKo/cWCwYo4e2dpbPd/ l0mAME9rdWmkxBv2Pe1NhxnAIgm5CvcUqNp7kETkybmqfKnsdBMXIBFE8Eq0Pg1s5g47 xXF94EimTpMEHsFO7YVmQajohRCv4EwlTkHi9SRCyyCniWIqTH4JvU9smGv+/YiI4G0H CKn+bOo50mfnZLlr5nxuTAiCXyxRDiAqc3y9CHJR34L/tEcQLTysW70S3E57v9W19BQF fGTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Tb3I8MGtROj5hbv077g6ZVKFC4zeX4OINd+AQB3Ay6w=; b=Q+vy+ZvT3NAxxCaCBGyjQ8ddUyOTH0xvKLpKXnfw1otIQrzqhVbHbq5JSrmFW6fMSR uElSwl1rXZAq4TtVT4kPlzdZCsV1v2MMafdVJglzhyAfdaNDYON8cm8dLc/02BSgRiZE YZCIOENrNyXoanlvMPEPdQrw5dQLbfl8SvxC+4W8QULJ0FF7Jbw1nOprzYyApmduWN7B QEEZRe/WQpw5P1vh0oenrCoafrQh30dQCD8GD5XFmJPiKGKHboyEX1m2FbLA09OT4g8W OLtckfGkRriDe25w6svIRmTq1TIMCcCBpt0UQGIUwahXZkMSIsdRQakwl90na35U6eIt LQOA== X-Gm-Message-State: AEkoouvQC+ccBOu2qGAEOjUghl3Fog9zojc1s39Puq99UcVV3JyTVw70fgAyhqpvRbzaoA== X-Received: by 10.200.48.112 with SMTP id g45mr34754494qte.70.1469495598313; Mon, 25 Jul 2016 18:13:18 -0700 (PDT) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id 73sm17403062qtc.16.2016.07.25.18.13.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 18:13:16 -0700 (PDT) From: Andrew Hyatt References: <87sk9z3vt2.fsf@blah.blah> <838twvysl2.fsf@gnu.org> <83twfft8ny.fsf@gnu.org> <83shuxu142.fsf@gnu.org> Date: Mon, 25 Jul 2016 21:13:14 -0400 In-Reply-To: <83shuxu142.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 25 Jul 2016 19:35:41 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> From: Andrew Hyatt >> Cc: user42@zip.com.au, 5440@debbugs.gnu.org >> Date: Mon, 25 Jul 2016 00:07:50 -0400 >> >> diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi >> index f3650a4..5763380 100644 >> --- a/doc/lispref/files.texi >> +++ b/doc/lispref/files.texi > > Thanks. A couple of comments: > >> @@ -3238,7 +3238,9 @@ Format Conversion Round-Trip >> >> One responsibility of @var{from-fn} is to make sure that the beginning >> of the file no longer matches @var{regexp}. Otherwise it is likely to >> -get called again. >> +get called again. Also, @var{from-fn} must not involve other buffers or >> +files other than the one being decoded > > One of these 2 "others" should be deleted, I think. Done > >> or else formatting may happen >> +during formatting, leading to incorrect results. > > I would say something like > > otherwise the internal buffer used for formatting might be > overwritten. Done > >> +@var{to-fn} must not involve other buffers or files other than the one >> +being encoded, or else formatting may happen during formatting, >> +leading to incorrect results. > > Same here. Done. Thanks for the suggestions. I'll submit this and close out the bug. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 25 21:37:41 2016 Received: (at control) by debbugs.gnu.org; 26 Jul 2016 01:37:41 +0000 Received: from localhost ([127.0.0.1]:37397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRrJV-0000Ow-20 for submit@debbugs.gnu.org; Mon, 25 Jul 2016 21:37:41 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:34654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRrJT-0000Oj-En for control@debbugs.gnu.org; Mon, 25 Jul 2016 21:37:39 -0400 Received: by mail-qk0-f175.google.com with SMTP id o67so180134622qke.1 for ; Mon, 25 Jul 2016 18:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:from:subject; bh=G+i+51ql3qdzlX6pC5NWwdE/AVqWChcIsB3XIOcnDKY=; b=Xh2yyDqtapwQCNUFicC/fnJsFFh/TuC0nr7JvV9v856qVR7dPiVdf/hePEM0+Ki0X7 Rhv0edRtuAC+f9qdoHkXHxGXzRnLOI0cIPUHMP97Q3AN/b8ja5YjFKpM23PUPNrXsySJ MVV4xzBDnUxza700i6t3XesEKnSeaeHx3Gm+BaVJJyxWvmXCxtXKTiraVYWgjlolG5Up TuW2yW0lougtVyE8pGXCWxfbVq/bhAKDyeTGJ/SHTZ83rAsFiFlQ8L4FkLW6hIwQ1Qry qhFV6YqcTWjeBawOlCjcyqPJh6nQeUlmNz3QKrqmObARHmJthLKvjUKJfgoUC4V1ntsZ YHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:message-id:to:from:subject; bh=G+i+51ql3qdzlX6pC5NWwdE/AVqWChcIsB3XIOcnDKY=; b=ZMhkJ2UoCjNHFK8+3mDLZ0dCTy3fozecAmSmX42rxZJERMJ4SSVNYdJkpbsbUiEpqI AHstQl04laVdM/9qrVSCIvT6D5cUR5s/NrEIe2jHK0FgQ5ctCCZcirY/XyVU+Uj9RGHY wOp5wuLQuVUjQh6D1c3rlKL5kOR/rvgsVdwJ+K8/tU8VrINgB7qeCs0GuuPEk/TyNJeM C1ydmOC6hJnil2Kf1vG3ASwyR/IoHNgcGJ/sMzO4wORfU/LVZQfm6Y+wawue+/Ige/oG KTwtCFtmJsY5KKzg5j490zFKs/oBxBtBSKGOvSstGAO9HnoFUfb+zMpHLGk34OCM23gk Njvg== X-Gm-Message-State: AEkoout5QFinPeI3bZP8G2vwh00rlxFpdd+ajQvcq9IkjqFmwVuIBM7M2IvwE4Cf6ShoDw== X-Received: by 10.55.217.89 with SMTP id u86mr26221616qki.114.1469497053692; Mon, 25 Jul 2016 18:37:33 -0700 (PDT) Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id 128sm17467060qke.10.2016.07.25.18.37.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 18:37:31 -0700 (PDT) Date: Mon, 25 Jul 2016 21:37:30 -0400 Message-Id: To: control@debbugs.gnu.org From: Andrew Hyatt Subject: control message for bug #5440 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 5440 notabug close 5440