From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: insert-file-contents and format-decode Date: Wed, 27 Jun 2007 08:33:35 +0200 Message-ID: <468204BF.3000404@gmx.at> References: <4666BF5F.5030301@gmx.at> <46753850.2090708@gmx.at> <46778ACB.1000704@gmx.at> <467E47AF.1080702@gmx.at> <4680B80E.5090709@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1182926348 1594 80.91.229.12 (27 Jun 2007 06:39:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2007 06:39:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 08:39:05 2007 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 1I3RB6-0004CE-KZ for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2007 08:39:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3RB5-0001ot-Ps for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2007 02:38:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3RB1-0001m4-Gw for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3RB0-0001jA-7M for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3RAz-0001it-U1 for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:53 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I3RAy-00005c-ME for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:53 -0400 Original-Received: (qmail invoked by alias); 27 Jun 2007 06:38:51 -0000 Original-Received: from N767P009.adsl.highway.telekom.at (EHLO [62.47.39.201]) [62.47.39.201] by mail.gmx.net (mp001) with SMTP; 27 Jun 2007 08:38:51 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/lfBZlVrblaE2Ii2NNrGrD5uAPRFVqJDKHfYYAqb fEBHJqUdf2M9cO User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:73912 Archived-At: > We'd have to distinguish the calls of `format-decode' by > > (1) `insert-file-contents' with `visit-flag' t > > In this case, format decoding should make no undo information, just as > inserting the visited file contents makes no undo information. A > newly visited file starts out with no undo information. > > (2) `insert-file-contents' with `visit-flag' nil > > This is the case where it is desirable to make just one undo entry for > the file contents as finally decoded. > > (3) functions within format.el (and maybe other functions) > > For this case, they should do nothing special about undo. > The primitives they call should make undo entries normally. The problem is that I have to communicate this information in my call to `format-decode'. Currently we have no way to distinguish cases (2) and (3) both have `visit-flag' nil. Either we set `visit-flag' to some constant (say `insert-file-contents-non-visit') for case (2) or provide an additional argument to `format-decode'.