From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.devel Subject: Re: fill-paragraph ill designed Date: Tue, 25 Aug 2015 11:50:03 +0200 Message-ID: <55DC3A4B.6040708@online.de> References: <55DC2621.4030905@online.de> <87bndvivq6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1440496244 3071 80.91.229.3 (25 Aug 2015 09:50:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 09:50:44 +0000 (UTC) Cc: Tassilo Horn To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 25 11:50:37 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 1ZUAsH-0001Tp-3x for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 11:50:37 +0200 Original-Received: from localhost ([::1]:59022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUAsE-0003s9-O0 for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 05:50:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUArp-0003jY-L6 for emacs-devel@gnu.org; Tue, 25 Aug 2015 05:50:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUAro-0005we-Kq for emacs-devel@gnu.org; Tue, 25 Aug 2015 05:50:09 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.130]:62542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUArk-0005kR-Rp; Tue, 25 Aug 2015 05:50:04 -0400 Original-Received: from [192.168.178.31] ([95.119.32.249]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MJoZ6-1ZT4wB3xkC-0019M6; Tue, 25 Aug 2015 11:50:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <87bndvivq6.fsf@gnu.org> X-Provags-ID: V03:K0:4H6MB/VY4F/bovMD/Ah0iOEGIkqQulrS0CWR+UAUAUp/H/6i8UW qH4tanohGa/apfezWzhzLYBX2ouk9vU/CY6dZexcYk5LvP1xD+7I6wO4h7KYYFdEciaEXFF 0qmsGHA/N+xB0W1bdUvrTOdqt0kJrQaIdP6IQUi+68HdiPrswkokZTMUZIDEpG4P/0x2TNS BJwH4750Qg6nj0aq8dsVA== X-UI-Out-Filterresults: notjunk:1;V01:K0:LXkE+pJKoTI=:FrgXbrM1Mp/NOyDLIKrTaz 1e4lYJrk1htGH+XIjsQNMcZpkBfIq62gyOYZ7AfLaDhC1OZ66mPSzwxA9qtV+iWl5HYrEdART Yd/WOPL2yxn8PjvfMsVxnnjzI+WAKnayX9HMGqqGrW5kxs6M6BWXJKD0q4NvDs7Hb1Mhv3Hcq Z0JWc+DEvbuHRUS/yBaCHLf2UJx6mxuttJqksp0IoKMy89myRrHW5IMuA+ZBPWk3eoiuJQThL O1Wx9O1/rg9Aa3edYV6f6Dqm/ZYdp9FghfXHXHzxQuM7hoTm+J0QIFaeWw3dWPW2233A95yK4 ApyVtd/t4NpCagX53YcFKzMHxsB+ni5msCNEg1EVxx7Z/TBddto5Di9irqPK+Su+PYlB7kIpf z4LRgt/ASTbVTZ7oETgkIXg8W2/YlaB7efmy2H/+VpdSjkRZIRNXqMNOhTq+A0yva6SeDl3HZ yloJGbwOa4xc1EY4zHZ7gMS6qpmXgdXDUrOr2QccSKiipHiQBj8aa0bSWJzmXfPxRaHpG7pYQ LQ66WDNsF+Gmqk+e3kJ9lRaeqf/wZXHATKRU5MXbm/dCnflNFdCxVFeZs48wx0ODFXHN1GkyD BhlqFmKegQi9AGC6JpRbOhCjEtttFF6bi7TkNZc9/klSqLOnL3E1L4Bw+lA7EDsrwmiglEzGn Oh/fu6rC5MQXL+ok9wjjtpGe7febyoWMUhJcUKq4Qe6G6Wuq4BfAVEDShV1fQ/Uo33eyJPo4q bIQsgZ2W4tvbY7Fp X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 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:189147 Archived-At: Am 25.08.2015 um 11:05 schrieb Tassilo Horn: > Andreas Röhler writes: > >> There are many issues, uncertain/unsound decisions inside this piece >> of code. >> >> Let's start with fill-paragraph-function. >> >> If fill-paragraph-function is set, it must be assumed a valid function >> and be used. > That's not what the documentation says: > > ,----[ C-h f fill-paragraph RET ] > | fill-paragraph is an interactive compiled Lisp function in ‘fill.el’. > | > | [...] > | > | The REGION argument is non-nil if called interactively; in that > | case, if Transient Mark mode is enabled and the mark is active, > | call ‘fill-region’ to fill each of the paragraphs in the active > | region, instead of just filling the current paragraph. > `---- > > So if there is an active region, `fill-paragraph' just calls > `fill-region', and then the `fill-paragraph-function' is irrelevant. Yeah, but that's unhappy. Where the global fill-paragraph should know from, what's needed in a special mode, what special modes want to do with strings? Other way around: any fill-paragraph-function is free to check for region as done here. >> So it must precede that clause: >> >> (and region transient-mark-mode mark-active > If `fill-paragraph' would call `fill-paragraph-function' also in this > case, then there are two options: > > (1) `fill-paragraph's documentation stays what it is, and then every > `fill-paragraph-function' ever going to be defined has to handle > the active region case and call `fill-region'. That's completely up to the mode how to proceed then. There too many unforseen cases - just keep the way free, keep Emacs expandable. > (2) `fill-paragraph' can't specify any special behavior for the case > where the region is active. If it's all up to fill-paragraph-function, global fill-paragraph would be out of the way. > It might just say that it itself > behaves differently with an active region when f-p-f is nil. > > Option (1) is useless, and option (2) is confusing and might lead to > inconsistent behavior, e.g., in some modes `M-q' with an active region > fills the region (because f-p-f is nil or a function which considers the > active region case) and in some other modes it just fills the current > paragraph (because f-p-f is set to some function which doesn't consider > the active region case). > > Bye, > Tassilo > Cheers, Andreas