From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: fill-paragraph ill designed Date: Fri, 28 Aug 2015 08:30:26 +0200 Message-ID: <87y4gv9b7h.fsf@gnu.org> References: <55DC2621.4030905@online.de> <55DD5D02.9090407@online.de> <87bndule6e.fsf@gnu.org> <55DDAF7D.4000809@online.de> <87a8temdei.fsf@gnu.org> <55DDED47.8080700@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440743926 8240 80.91.229.3 (28 Aug 2015 06:38:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2015 06:38:46 +0000 (UTC) Cc: Andreas =?utf-8?Q?R=C3=B6hler?= , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 28 08:38:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZVDJ3-0001yp-Dm for ged-emacs-devel@m.gmane.org; Fri, 28 Aug 2015 08:38:33 +0200 Original-Received: from localhost ([::1]:46234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVDJ2-0003a2-Iv for ged-emacs-devel@m.gmane.org; Fri, 28 Aug 2015 02:38:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVDIz-0003ZY-N2 for emacs-devel@gnu.org; Fri, 28 Aug 2015 02:38:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVDIw-0008Pg-Ge for emacs-devel@gnu.org; Fri, 28 Aug 2015 02:38:29 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVDIw-0008PY-DC for emacs-devel@gnu.org; Fri, 28 Aug 2015 02:38:26 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 290FD207B4 for ; Fri, 28 Aug 2015 02:30:30 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 28 Aug 2015 02:30:30 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=2SnPfI9Wxyy7bHNSP0GrfSQ8Rd4=; b=BxJp3 BivwIxe3joiK9xdCpsUfa6vRItQa3ocUak/CuJb+dWc0AfMzNN3DeF/VW4oMBpMO 3bkw9zGBiMazCKoy//GXVmkExQC/fx3O0zHADrQLv4d1fEb8PPfestnb0Z41/zad yKQ+dflUko5NCSWFqQ+2FngJQLLYYD2z3Zgd2Y= X-Sasl-enc: jCkIhRB30QtAZDypJ9AM6ce1q1wcqqyMoHWLSGLxHjHO 1440743429 Original-Received: from thinkpad-t440p (unknown [2.160.110.50]) by mail.messagingengine.com (Postfix) with ESMTPA id F0CEEC0001A; Fri, 28 Aug 2015 02:30:28 -0400 (EDT) Mail-Followup-To: Stefan Monnier , Andreas =?utf-8?Q?R=C3=B6hler?= , emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Thu, 27 Aug 2015 12:35:47 -0400") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189242 Archived-At: Stefan Monnier writes: >>> and call `fill-paragraph-function' on them. >> Can't see that. May you point me at? > > fill-region doesn't (and more importantly can't) delegate to > fill-paragraph-function since fill-paragraph-function doesn't take > begin/end arguments. Are you saying that there would be a problem if the region starts in the middle of a paragraph and/or ends in the middle of another paragraph? I didn't test but I think that case could be solved by narrowing to the region before doing the filling. But of course, then the first and last line would probably be filled beyond fill-column if the region starts/ends in the middle of a line. So the region could be extended or shrunken to complete lines before narrowing with the negative effect that two partial lines are either not filled or filled too much. So yes, it seems to be not possible to get it completely right. But IMHO that solution is still better than simply ignoring `fill-paragraph-function' and filling in a way which may break the syntax of the text. Bye, Tassilo