From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: Alinea filling (hanlding of explicit =?utf-8?q?line-breaks=29?= =?utf-8?b?4oCP?= Date: Sun, 13 Mar 2011 17:34:05 -0400 Message-ID: References: <8039mrt41m.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300052072 3299 80.91.229.12 (13 Mar 2011 21:34:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2011 21:34:32 +0000 (UTC) Cc: Org mode , emacs-devel@gnu.org To: Vincent =?iso-8859-1?Q?Bela=EFche?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 13 22:34:26 2011 Return-path: Envelope-to: ged-emacs-devel@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 1PysvZ-0001X3-Ro for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2011 22:34:25 +0100 Original-Received: from localhost ([127.0.0.1]:46251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PysvU-0000XD-70 for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2011 17:34:12 -0400 Original-Received: from [140.186.70.92] (port=38649 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PysvQ-0000X8-8J for emacs-devel@gnu.org; Sun, 13 Mar 2011 17:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PysvP-0003br-4o for emacs-devel@gnu.org; Sun, 13 Mar 2011 17:34:08 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:17634 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PysvP-0003bh-2J; Sun, 13 Mar 2011 17:34:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAOvUfE3O+IG+/2dsb2JhbACmFXjAEoViBJVM X-IronPort-AV: E=Sophos;i="4.62,312,1297054800"; d="scan'208";a="96196382" Original-Received: from 206-248-129-190.dsl.teksavvy.com (HELO pastel.home) ([206.248.129.190]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 13 Mar 2011 17:34:05 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 6604958ED9; Sun, 13 Mar 2011 17:34:05 -0400 (EDT) In-Reply-To: <8039mrt41m.fsf@gmail.com> ("Vincent =?iso-8859-1?Q?Bela=EFch?= =?iso-8859-1?Q?e=22's?= message of "Sun, 13 Mar 2011 16:48:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:137198 gmane.emacs.orgmode:39323 Archived-At: > But it seems that it does not exactly does the job this way: if the > argument sign is <0 and you are in the middle of a paragraph, then, > unless the paragraph is at beginning of buffer you are going to the > character before the 1st one, rather than to the 1st character of > paragraph. Actually, IIRC, it only goes to the previous line if that line is empty. > So, it seems that you are indeed going to and end of paragraph with > arg > 0, but that with arg < 0, the what happens is more fuzzy. Yes, indeed. But I don't think fill.el depends on this detail of forward-paragraph's behavior. > Now, I am a bit confused about what should be the correct behaviour of > the fill-forward-paragraph-function: is that the following: > - arg < 0: goto beginning of paragraph arg+1, with paragraph 0 = current > - arg > 0 : goto beginning of paragraph arg-1, with paragraph 0 = > current I can't remember what forward-paragraph does for a 0 argument, but for positive arguments it goes to "the next Nth paragraph end" and for negative argument it goes to the next "Nth paragraph start". And fill.el only calls that function with values +1 and -1. More specifically, fill.el mostly does something like: (fill-region-as-paragraph (progn (forward-paragraph -1) (point)) (progn (forward-paragraph 1) (point))) -- Stefan