From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Yeske Newsgroups: gmane.emacs.devel Subject: Re: Longlines and insert Date: Tue, 15 Nov 2005 15:33:31 -0800 Message-ID: <87wtj9o59w.fsf@cut.bc.hsia.telus.net> References: <874q6fa1t0.wl%david.wallin@ul.ie> <87hdaebqxb.fsf@stupidchicken.com> <200511152241.20666.pogonyshev@gmx.net> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1132097688 24106 80.91.229.2 (15 Nov 2005 23:34:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Nov 2005 23:34:48 +0000 (UTC) Cc: ihs_4664@yahoo.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 00:34:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EcAJP-0004dS-F1 for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2005 00:34:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcAJO-0003zH-LV for ged-emacs-devel@m.gmane.org; Tue, 15 Nov 2005 18:34:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EcAIy-0003tn-P5 for emacs-devel@gnu.org; Tue, 15 Nov 2005 18:33:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EcAIx-0003t9-2H for emacs-devel@gnu.org; Tue, 15 Nov 2005 18:33:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcAIw-0003t5-Tw for emacs-devel@gnu.org; Tue, 15 Nov 2005 18:33:34 -0500 Original-Received: from [199.185.220.220] (helo=priv-edtnes57.telusplanet.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EcAIw-0003p6-UW for emacs-devel@gnu.org; Tue, 15 Nov 2005 18:33:35 -0500 Original-Received: from cut.bc.hsia.telus.net ([207.216.180.100]) by priv-edtnes57.telusplanet.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20051115233333.ZCCX19657.priv-edtnes57.telusplanet.net@cut.bc.hsia.telus.net>; Tue, 15 Nov 2005 16:33:33 -0700 Original-To: Paul Pogonyshev In-reply-to: <200511152241.20666.pogonyshev@gmx.net> (message from Paul Pogonyshev on Tue, 15 Nov 2005 22:41:20 +0200) 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:46064 Archived-At: > Which I think could be fixed like this: > > (let ((hard-newline "\n")) > ;; see set-hard-newline-properties: > (put-text-property 0 1 'hard t hard-newline) > (put-text-property 0 1 'rear-nonsticky '(hard) hard-newline) > ... > (insert header hard-newline)) I think (and as far as I understood, Chong Yidong does too) that this is a welcoming message for future problems. You patch up a piece of code, while there are hundreds other lisp files, many of which insert newlines, some of which need to be hard. We probably need something generic. At the very least we need a convenience function to create a newline-string with the necessary properties already set, so we don't have to go over the lines above each time. Doesn't (newline) insert the right kind of newline based on the value of `use-hard-newlines'? Ryan