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:34:00 +0200 Message-ID: <468204D8.8010700@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 1182926371 1645 80.91.229.12 (27 Jun 2007 06:39:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2007 06:39:31 +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:29 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 1I3RBZ-0004Hn-Jy for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2007 08:39:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3RBZ-00023P-4b for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2007 02:39:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I3RB3-0001p1-5F for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I3RB2-0001mc-0y for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3RB1-0001mS-S4 for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:55 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I3RB0-000069-V9 for emacs-devel@gnu.org; Wed, 27 Jun 2007 02:38:55 -0400 Original-Received: (qmail invoked by alias); 27 Jun 2007 06:38:53 -0000 Original-Received: from N767P009.adsl.highway.telekom.at (EHLO [62.47.39.201]) [62.47.39.201] by mail.gmx.net (mp046) with SMTP; 27 Jun 2007 08:38:53 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/hkdsdwC/haVSi50OInCiX/RsTOtOyjB1UIbJznZ wMo9RTy6QpKe4R 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:73913 Archived-At: > > Is your suggestion to fix this by disabling the modification hooks in > > Finsert_file_contents around the call to `format-decode'? > > Either in Finsert_file_contents or within `format-decode'. > > I think it is ok to disable them unconditionally inside `format-decode'. > Decoding is sufficiently low level that it probably makes no sense > to expect them to run these hooks. > > Then Finsert_file_contents can run the hooks just once for the > (decoded) text that is ultimately inserted. Agreed. > > I'm not sure what to do with `after-insert-file-functions' though. The > current documentation suggests that these are handled the same way as > the `format-decode' based functions. If you want to keep the current > behavior for them, this should be documented throughly. That means, the > documentation should say that functions in `after-insert-file-functions' > have to take care of narrowing, `buffer-undo-list', after-change hooks, > and the like. > > With the current plan, they don't have to deal with undo or change > hooks. We have a plan for dealing with functions called by `format-decode'. We do not have a plan yet for dealing with `after-insert-file-functions'. Shall we treat functions there the same way we treat functions called by `format-decode'? If so we would have to deal with this right in `Finsert_file_contents'. Or shall we keep things as they are? In this case the documentation should say the things mentioned above. > How do they have "take care of" narrowing? When I insert the contents of a file with `visit-flag' nil the buffer should be reasonably narrowed to work only on the inserted text as in `decode-coding-inserted-region'. Currently, neither `format-alist' nor `after-insert-file-functions' handling provides such a service. The functions there are supposed to do the narrowing themselves.