From: Steve Moreau <moreau.steve@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: Moving from org-mode 6.33/7.9.3 to 8.3.2
Date: Mon, 30 Nov 2015 08:05:03 +0100 [thread overview]
Message-ID: <CAD9K4eBKFPVSci7Y75Pxhtjso4MwkYqnFNemdEUAhvTW79NXxA@mail.gmail.com> (raw)
In-Reply-To: <87two4lbw6.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]
Hi Nicolas,
Thanks for you answer.
OK, I understand. That explains why I needed to add blank lines between
list items before to fill region, such as:
- item1
- item2
This is a new paragraph
I have 2 more questions for you please.
Let say I would like to give a hand and try to improve the org-fill-region
to deal with this case.
- Would it be local to fill-region only, as I would suspect, or would it
put a mess around because it is used in some other contexts I am not aware
of, and would it be something interesting for the org-mode according to you?
- If you wanted to develop it, would you surround it with a when condition
so that user can disable it?
Thanks,
Steve
2015-11-29 22:43 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
> Hello,
>
> Steve Moreau <moreau.steve@free.fr> writes:
>
> > Indeed, the org-setup-filling was concerned.
> >
> > *Before:*
> >
> > (append fill-nobreak-predicate
> > '(org-fill-paragraph-separate-nobreak-p
> > ...
> >
> > (defvar org-element-paragraph-separate) ; org-element.el
> > (defun org-fill-paragraph-separate-nobreak-p ()
> > "Non-nil when a new line at point would end current paragraph."
> > (looking-at (substring org-element-paragraph-separate 1)))
> >
> > *After:*
> >
> > 'org-fill-paragraph-separate-nobreak-p' predicate removed and the
> previous
> > function has been deleted
> >
> > The following code has been added:
> >
> > (let ((paragraph-ending (substring org-element-paragraph-separate 1)))
> > (org-set-local 'paragraph-start paragraph-ending)
> > (org-set-local 'paragraph-separate paragraph-ending))
> >
> >
> > Could someone explain to me why the function has been removed?
>
> It was removed because `org-element-paragraph-separate' is not enough to
> find the boundaries of a paragraph, e.g.,
>
> - item1
> - item2
> This is a new paragraph
>
> It is usually not a problem except for `fill-region', as you noticed.
> However, I do not know how to plug our own functions into `fill-region'.
>
> We could replace `fill-region' with `org-fill-region', tho.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>
[-- Attachment #2: Type: text/html, Size: 3059 bytes --]
next prev parent reply other threads:[~2015-11-30 7:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 16:56 Moving from org-mode 6.33/7.9.3 to 8.3.2 Steve Moreau
2015-11-27 17:32 ` John Hendy
2015-11-27 18:13 ` John Hendy
[not found] ` <CAD9K4eCt9Gha63gaWagEsihPSJzttE5aBh_BFV0aoG0DXPs--A@mail.gmail.com>
[not found] ` <CA+M2ft9ApGTz8ogGaCxCfejAnhWW2Hwuj1X7ZwWg_VvMkmzAmA@mail.gmail.com>
2015-11-28 17:15 ` Steve Moreau
2015-11-29 14:44 ` Steve Moreau
2015-11-29 21:43 ` Nicolas Goaziou
2015-11-30 7:05 ` Steve Moreau [this message]
2015-11-30 14:53 ` Nicolas Goaziou
2015-12-01 7:33 ` Steve Moreau
2015-12-01 19:09 ` Samuel Wales
2015-12-01 22:31 ` Nicolas Goaziou
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=CAD9K4eBKFPVSci7Y75Pxhtjso4MwkYqnFNemdEUAhvTW79NXxA@mail.gmail.com \
--to=moreau.steve@free.fr \
--cc=emacs-orgmode@gnu.org \
/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).