emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
Cc: Org mode <emacs-orgmode@gnu.org>, emacs-devel@gnu.org
Subject: Re: Alinea filling (hanlding of explicit line-breaks)‏
Date: Sun, 13 Mar 2011 17:34:05 -0400	[thread overview]
Message-ID: <jwvsjuqn213.fsf-monnier+emacs@gnu.org> (raw)
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")

> 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

  reply	other threads:[~2011-03-13 21:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13 15:48 Alinea filling (hanlding of explicit line-breaks)‏ Vincent Belaïche
2011-03-13 21:34 ` Stefan Monnier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-13 13:49 Alinea filling (hanlding of explicit line-breaks) Vincent Belaïche
2011-03-12 21:09 Vincent Belaïche
2011-03-13  3:59 ` Stefan Monnier
2011-02-16  6:42 Vincent Belaïche
2011-02-16 15:02 ` Stefan Monnier
2011-02-14 21:30 Vincent Belaïche
2011-02-15 17:22 ` Stefan Monnier
2011-02-13  8:47 Vincent Belaïche
2011-02-14 18:16 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvsjuqn213.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=vincent.b.1@hotmail.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).