From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Longlines and insert Date: Mon, 14 Nov 2005 21:12:00 -0500 Message-ID: <87hdaebqxb.fsf@stupidchicken.com> References: <874q6fa1t0.wl%david.wallin@ul.ie> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132020847 9896 80.91.229.2 (15 Nov 2005 02:14:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Nov 2005 02:14:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 15 03:13:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EbqJ5-0003so-HX for ged-emacs-devel@m.gmane.org; Tue, 15 Nov 2005 03:12:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EbqJ4-0005N0-OR for ged-emacs-devel@m.gmane.org; Mon, 14 Nov 2005 21:12:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EbqIs-0005M2-Jh for emacs-devel@gnu.org; Mon, 14 Nov 2005 21:12:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EbqIq-0005LJ-Uq for emacs-devel@gnu.org; Mon, 14 Nov 2005 21:12:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EbqIq-0005LF-Sa for emacs-devel@gnu.org; Mon, 14 Nov 2005 21:12:08 -0500 Original-Received: from [18.95.5.42] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EbqIq-0006xS-QO for emacs-devel@gnu.org; Mon, 14 Nov 2005 21:12:08 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 1E8911E4318; Mon, 14 Nov 2005 21:12:02 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: <874q6fa1t0.wl%david.wallin@ul.ie> (David Wallin's message of "Mon, 14 Nov 2005 11:47:39 +0000") 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:45986 Archived-At: I got a bug report from a user who had longlines-mode turned on for text-mode and all its derivatives, and found that it didn't play well with `M-x mail'. (The fact that longlines was originally written as a hack is sadly apparent when situations like this arise...) > (add-hook 'text-mode-hook 'longlines-mode) > > I have to disable longlines in mail-mode-hook to reenable it in > wl-mail-setup-hook. This seems to be because of some filling > operations when mail-mode is initialized. Don't know, is this a > problem with longlines or mail-mode? > > The second problem is bothering me more. It has to do with attaching > a binary file when editing an email. It looks like a space is turned > into a hard newline The problem is that mail-setup inserts the header fields by calling (insert "blahblah\n") The inserted newlines are not marked as hard, so longlines gets confused. I could fix this by going through sendmail.el and adding (newline) to all these places. But maybe a more wide-reaching solution is called for. One possibility is to define a new variable `insert-filters', to store a list of filter functions to run on strings before they are inserted (analogous to `buffer-substring-filters'). I don't know if this is too invasive a change, especially before a release, and just for the sake of longlines mode. What do people think?