From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/14518 Path: news.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.gnus.user Subject: Re: More on format=flowed Date: Mon, 03 Jan 2011 01:55:56 +0100 Message-ID: <87k4imyfdv.fsf@savara.sat.thregr.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294016181 12398 80.91.229.12 (3 Jan 2011 00:56:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 00:56:21 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Mon Jan 03 01:56:17 2011 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZYif-00060T-92 for gegu-info-gnus-english@m.gmane.org; Mon, 03 Jan 2011 01:56:17 +0100 Original-Received: from localhost ([127.0.0.1]:58525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZYie-0002GE-Lp for gegu-info-gnus-english@m.gmane.org; Sun, 02 Jan 2011 19:56:16 -0500 Original-Received: from [140.186.70.92] (port=41807 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZYia-0002E6-VE for info-gnus-english@gnu.org; Sun, 02 Jan 2011 19:56:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZYiZ-0001nH-MQ for info-gnus-english@gnu.org; Sun, 02 Jan 2011 19:56:12 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:35045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZYiZ-0001n7-9Q for info-gnus-english@gnu.org; Sun, 02 Jan 2011 19:56:11 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PZYiX-0005x0-I1 for info-gnus-english@gnu.org; Mon, 03 Jan 2011 01:56:09 +0100 Original-Received: from 88-149-142-246.dynamic.ngi.it ([88.149.142.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Jan 2011 01:56:09 +0100 Original-Received: from wavexx by 88-149-142-246.dynamic.ngi.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Jan 2011 01:56:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 88-149-142-246.dynamic.ngi.it User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:aS4wUGAYVtbxJu9LOrtwiT80hy4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:14518 Archived-At: On Sun, 02 Jan 2011 20:32:31 +0100, Lars Magne Ingebrigtsen wrote: >> (defun harden-newlines () >> (save-excursion >> (goto-char (point-min)) >> (while (search-forward "\n" nil t) >> (put-text-property (1- (point)) (point) 'hard t)))) > > So, basically, you make all the newlines hard. Isn't the point of > `use-hard-newlines' that you can mix and match hard and soft newlines? I guess the point of `use-hard-newlines' is to preserve the concept of soft and hard newlines when the text is being automatically manipulated by auto-fill. Just as a note, `longlines-mode' is a twist on the concept that performs word wrapping with soft newlines, but stores hard newlines only (simulating the effect of word-wrap). Is this mode still needed at all? The point of format=flowed is to have flowed text however, when reading *and* writing if the user so desires. For instance, when a flowed message is decoded in flow-fill.el, hard newlines aren't restored. This means that you can't actually make *use* of the distinction (a cheap hack would have been turning on `longlines-mode' in the article buffer with mixed hard/soft newlines). At least with `fill-flowed-display-column' I can force the unquoting so that I can still use word-wrap, but that's sub-optimal. Either fully support soft newlines, or use word-wrap and be done. >> word-wrap t >> use-hard-newlines t)))) > > You're mixing `use-hard-newlines' with `word-wrap', and the two don't > really mix that well. I think. Turning `use-hard-newlines' on is just a hack to force Gnus into generating a flowed message. Internally `fill-flowed-encode' unwraps all soft newlines and then rewraps then using `fill-region'. That's completely unnecessary with word-wrap (there are no more soft newlines). I simply skip the first step by marking all lines as hard. When lines longer than `message-fill-column' are seen, the body should be encoded automatically with format=flowed, or quoted-printable. But I can't see any variable that can regulate the final message encoding.