emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: John Hendy <jw.hendy@gmail.com>, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: M-x fill-region equivalent for lists?
Date: Thu, 19 Sep 2013 10:48:10 -0500	[thread overview]
Message-ID: <CA+M2ft-J6L8mmcduvTqRrW47Jpd3GhRFPKJoeqJEbnRR11_=hg@mail.gmail.com> (raw)
In-Reply-To: <87hadgvp3z.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]

On Thu, Sep 19, 2013 at 9:54 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> John Hendy <jw.hendy@gmail.com> writes:
>
> [...]
>
>> Sort of. Screenshots attached:
>> - as-is.png is the text from my initial email just yanked into Emacs
>>
>> - uneven-start.png is the result of `M-x fill-paragraph` on that text
>>
>> - even-start.png is the result of `M-x fill-paragraph` on the text if
>> I make sure the start of every line is justified with two spaces, as
>> it would if I'd been writing that full line directly in an Org list
>> item and then deleted/shortened some of the lines.
>>
>> - default.org is me taking the original yanked text and arranging it
>> all on one line, then pressing space at the end of the line.
>>
>> So... if the start of the lines in an item aren't even, you get an
>> uneven fill,
>
> Yes, this is as expected, based on fill-paragraph's algorithm for what
> to fill and how to define the fill prefix.
>
>> and in both cases, the right ragged edge is more ragged
>> than Org would have done on it's own.
>
> Yes, this is true.  Happens to me as well.  The filling is different
> when using auto-fill and writing as compared with fill-paragraph
> afterwards.  I have never used fill-region so cannot compare.
>

If I select/mark a paragraph, `M-x fill-region` produces paragraphs
that are identical to typing them in Org and letting the line run past
my setting for the fill-column width. So fill-region works identically
to Org; fill-paragraph does not.

>> I didn't know about this
>> function and have just always used fill-region (not sure why!), so
>> thanks for suggesting it, as it's definitely getting things close.
>
> One step at a time... ;-)  Filling appears to be a somewhat stochastic
> process although I'm sure it isn't!

See attached before and after comparing regular paragraph behavior for
Org's default behavior if you fill past the fill-column setting, M-x
fill-region, and M-x fill-paragraph. Perhaps not the most exhaustive
test, but shows that for paragraphs, the behavior of all three is the
same. I did the same for lists, but I suppose we already knew from my
previous email that Org and fill-paragraph don't agree.

>
> Having said this, I have now moved completely to org-indent with
> visual-line-mode and I no longer need to fill anything, when in org mode
> as opposed to message mode like this email...

Hmm. I'll have to look into that!


John

>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
>

[-- Attachment #2: before.png --]
[-- Type: image/png, Size: 38476 bytes --]

[-- Attachment #3: after.png --]
[-- Type: image/png, Size: 40391 bytes --]

  reply	other threads:[~2013-09-19 15:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18  1:49 M-x fill-region equivalent for lists? John Hendy
2013-09-18  9:15 ` Eric S Fraga
2013-09-18 15:31   ` John Hendy
2013-09-19 14:54     ` Eric S Fraga
2013-09-19 15:48       ` John Hendy [this message]
2013-09-19 19:15         ` Eric S Fraga
2013-09-18 15:32   ` John Hendy
2013-09-18 17:06     ` Nick Dokos
2013-09-19 14:48     ` [OT] mail followup to (was Re: M-x fill-region equivalent for lists?) Eric S Fraga
2013-09-19 15:40       ` John Hendy
2013-09-19 19:07         ` Eric S Fraga
2013-09-19 19:38           ` John Hendy
2013-09-20 11:18           ` Sebastien Vauban
2013-09-23 18:52             ` Eric S Fraga

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='CA+M2ft-J6L8mmcduvTqRrW47Jpd3GhRFPKJoeqJEbnRR11_=hg@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --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).