From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Longlines and insert Date: Tue, 15 Nov 2005 23:27:19 -0500 Message-ID: <87y83pgqxl.fsf-monnier+emacs@gnu.org> References: <874q6fa1t0.wl%david.wallin@ul.ie> <87hdaebqxb.fsf@stupidchicken.com> <200511152241.20666.pogonyshev@gmx.net> <873blxjysz.fsf-monnier+emacs@gnu.org> <8764qt9u85.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132115297 31359 80.91.229.2 (16 Nov 2005 04:28:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2005 04:28:17 +0000 (UTC) Cc: Kevin Rodgers , Paul Pogonyshev , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 05:28:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EcEtQ-0002mb-4C for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2005 05:27:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcEtP-0005iR-CA for ged-emacs-devel@m.gmane.org; Tue, 15 Nov 2005 23:27:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EcEtG-0005iJ-Da for emacs-devel@gnu.org; Tue, 15 Nov 2005 23:27:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EcEtE-0005i7-U5 for emacs-devel@gnu.org; Tue, 15 Nov 2005 23:27:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcEtE-0005i4-Qs for emacs-devel@gnu.org; Tue, 15 Nov 2005 23:27:20 -0500 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EcEtE-0003lO-M6 for emacs-devel@gnu.org; Tue, 15 Nov 2005 23:27:20 -0500 Original-Received: from alfajor ([67.71.33.38]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20051116042719.XQXN2981.tomts43-srv.bellnexxia.net@alfajor>; Tue, 15 Nov 2005 23:27:19 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 867D62FDAA; Tue, 15 Nov 2005 23:27:19 -0500 (EST) Original-To: Chong Yidong In-Reply-To: <8764qt9u85.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 15 Nov 2005 21:55:54 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:46076 Archived-At: >> Maybe longlines-mode could provide a variable >> "longlines-inserted-LF-are-hard" and then use it in an >> after-change-functions hook to mark all inserted LF as hard when that >> variable is non-nil. >> >> I'd guess that the variable should be non-nil by default and only bound to >> nil at a few specific spots, hopefully all of them in longlines.el. > The problem with using an after-change-function is that the function > is only told that the text was changed in a particular region, not > what the change was. There is no way to tell whether a soft newline > encountered in that region is a legit soft newline, or one produced by > an (insert "foo\n") call. If the `len' argument to the after-change-function is zero, it means it's an insert. Now my suggestion is probably bogus indeed 'cause I know next to nothing about longlines-mode. E.g. I'm not sure what you mean by "a legit soft newline". Stefan