emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* lists and fill-region
@ 2011-03-09 19:04 michael hohn
  2011-03-09 19:36 ` Matt Lundin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: michael hohn @ 2011-03-09 19:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

after upgrading to the current git head (from a version around 6.36),
fill-region produces wrong indentation for my lists.  Starting with

- one
  - very, very, very, very, very, very, very, very, very, very, very, very, long
  - short

and marking the second item via mark-paragraph followed by fill-region
results in

- one
  - very, very, very, very, very, very, very, very, very, very, very,
very, long
  - short

I have tried different settings for org-list-ending-method but this
doesn't change the result.

Has anybody seen this or know a fix?

Thank you,
Michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 19:04 lists and fill-region michael hohn
@ 2011-03-09 19:36 ` Matt Lundin
  2011-03-10  0:08   ` Nicolas
  2011-03-09 19:50 ` Bernt Hansen
  2011-03-10  0:03 ` Nicolas
  2 siblings, 1 reply; 10+ messages in thread
From: Matt Lundin @ 2011-03-09 19:36 UTC (permalink / raw)
  To: michael hohn; +Cc: emacs-orgmode

michael hohn <mhhohn@gmail.com> writes:

> Hi all,
>
> after upgrading to the current git head (from a version around 6.36),
> fill-region produces wrong indentation for my lists.  Starting with
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very, very, long
>   - short
>
> and marking the second item via mark-paragraph followed by fill-region
> results in
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very,
> very, long
>   - short

I can reproduce this. It occurs only when marking a region, not when
calling fill paragraph directly on the item.

A related bug: 

> - one
>   - very, very, very, very, very, very, very, very, very, very, very,
> very, long
>   - short

If one calls unfill-paragraph on the "very, very" line above, nothing
happens. In the past, unfill paragraph would turn the item into a single
line, which is very convenient for fixing improperly indented multi-line
items.

Best,
Matt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 19:04 lists and fill-region michael hohn
  2011-03-09 19:36 ` Matt Lundin
@ 2011-03-09 19:50 ` Bernt Hansen
  2011-03-09 20:06   ` Nick Dokos
  2011-03-10  0:03 ` Nicolas
  2 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-03-09 19:50 UTC (permalink / raw)
  To: michael hohn; +Cc: emacs-orgmode

michael hohn <mhhohn@gmail.com> writes:

> Hi all,
>
> after upgrading to the current git head (from a version around 6.36),
> fill-region produces wrong indentation for my lists.  Starting with
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very, very, long
>   - short
>
> and marking the second item via mark-paragraph followed by fill-region
> results in
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very,
> very, long
>   - short
>
> I have tried different settings for org-list-ending-method but this
> doesn't change the result.
>
> Has anybody seen this or know a fix?

Hi Michael,

This wraps okay for me.  I get the following:

--8<---------------cut here---------------start------------->8---
- one
  - very, very, very, very, very, very, very, very, very, very, very,
    very, long
  - short
--8<---------------cut here---------------end--------------->8---

Have you tried it with a minimal emacs setup?  Maybe it's something in
your customizations that affects this.

Regards,
-- 
Bernt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 19:50 ` Bernt Hansen
@ 2011-03-09 20:06   ` Nick Dokos
  2011-03-09 20:45     ` Bernt Hansen
  0 siblings, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2011-03-09 20:06 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: nicholas.dokos, emacs-orgmode, michael hohn

Bernt Hansen <bernt@norang.ca> wrote:

> michael hohn <mhhohn@gmail.com> writes:
> 
> > Hi all,
> >
> > after upgrading to the current git head (from a version around 6.36),
> > fill-region produces wrong indentation for my lists.  Starting with
> >
> > - one
> >   - very, very, very, very, very, very, very, very, very, very, very, very, long
> >   - short
> >
> > and marking the second item via mark-paragraph followed by fill-region
> > results in
> >
> > - one
> >   - very, very, very, very, very, very, very, very, very, very, very,
> > very, long
> >   - short
> >
> > I have tried different settings for org-list-ending-method but this
> > doesn't change the result.
> >
> > Has anybody seen this or know a fix?
> 
> Hi Michael,
> 
> This wraps okay for me.  I get the following:
> 
> - one
>   - very, very, very, very, very, very, very, very, very, very, very,
>     very, long
>   - short
> 
> Have you tried it with a minimal emacs setup?  Maybe it's something in
> your customizations that affects this.
> 

With fill-paragraph, I get what Bernt gets. With
mark-paragraph/fill-region, I get what Michael gets. This is with emacs
-q -l minimal.emacs. In both cases, I start with point at the beginning
of the very, very long line.

Org-mode version 7.5 (release_7.5.7.g4090.dirty)
GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2010-11-17 on alphaville

Nick

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 20:06   ` Nick Dokos
@ 2011-03-09 20:45     ` Bernt Hansen
  0 siblings, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2011-03-09 20:45 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, michael hohn

Nick Dokos <nicholas.dokos@hp.com> writes:

> Bernt Hansen <bernt@norang.ca> wrote:
>
>> michael hohn <mhhohn@gmail.com> writes:
>> 
>> > Hi all,
>> >
>> > after upgrading to the current git head (from a version around 6.36),
>> > fill-region produces wrong indentation for my lists.  Starting with
>> >
>> > - one
>> >   - very, very, very, very, very, very, very, very, very, very, very, very, long
>> >   - short
>> >
>> > and marking the second item via mark-paragraph followed by fill-region
>> > results in
>> >
>> > - one
>> >   - very, very, very, very, very, very, very, very, very, very, very,
>> > very, long
>> >   - short
>> >
>> > I have tried different settings for org-list-ending-method but this
>> > doesn't change the result.
>> >
>> > Has anybody seen this or know a fix?
>> 
>> Hi Michael,
>> 
>> This wraps okay for me.  I get the following:
>> 
>> - one
>>   - very, very, very, very, very, very, very, very, very, very, very,
>>     very, long
>>   - short
>> 
>> Have you tried it with a minimal emacs setup?  Maybe it's something in
>> your customizations that affects this.
>> 
>
> With fill-paragraph, I get what Bernt gets. With
> mark-paragraph/fill-region, I get what Michael gets. This is with emacs
> -q -l minimal.emacs. In both cases, I start with point at the beginning
> of the very, very long line.
>
> Org-mode version 7.5 (release_7.5.7.g4090.dirty)
> GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2010-11-17 on alphaville

Thanks Nick,

I can also reproduce this.  I was incorrectly using fill-paragraph the
first time.

Regards,
-- 
Bernt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 19:04 lists and fill-region michael hohn
  2011-03-09 19:36 ` Matt Lundin
  2011-03-09 19:50 ` Bernt Hansen
@ 2011-03-10  0:03 ` Nicolas
  2011-03-10  6:11   ` michael hohn
  2 siblings, 1 reply; 10+ messages in thread
From: Nicolas @ 2011-03-10  0:03 UTC (permalink / raw)
  To: michael hohn; +Cc: emacs-orgmode

Hello,

michael hohn <mhhohn@gmail.com> writes:

> after upgrading to the current git head (from a version around 6.36),
> fill-region produces wrong indentation for my lists.  Starting with
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very, very, long
>   - short
>
> and marking the second item via mark-paragraph followed by fill-region
> results in
>
> - one
>   - very, very, very, very, very, very, very, very, very, very, very,
> very, long
>   - short
>

I have pushed a fix for this case. Thanks for your report, it reminds me
filling in lists is still a bit fragile, and needs some care.

Regards,

-- 
Nicolas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-09 19:36 ` Matt Lundin
@ 2011-03-10  0:08   ` Nicolas
  2011-03-10  0:32     ` Matt Lundin
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas @ 2011-03-10  0:08 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode, michael hohn

Hello,

Matt Lundin <mdl@imapmail.org> writes:

> A related bug: 
>
>> - one
>>   - very, very, very, very, very, very, very, very, very, very, very,
>> very, long
>>   - short
>
> If one calls unfill-paragraph on the "very, very" line above, nothing
> happens. In the past, unfill paragraph would turn the item into a single
> line, which is very convenient for fixing improperly indented multi-line
> items.

Could you tell me if the problem with unfill-paragraph persists?  If it
does, as there is no unfill-paragraph in standard Emacs, could you
provide the definition you gave it?

Thanks.

Regards,

-- 
Nicolas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-10  0:08   ` Nicolas
@ 2011-03-10  0:32     ` Matt Lundin
  0 siblings, 0 replies; 10+ messages in thread
From: Matt Lundin @ 2011-03-10  0:32 UTC (permalink / raw)
  To: michael hohn; +Cc: emacs-orgmode

Nicolas <n.goaziou@gmail.com> writes:

> Hello,
>
> Matt Lundin <mdl@imapmail.org> writes:
>
>> A related bug: 
>>
>>> - one
>>>   - very, very, very, very, very, very, very, very, very, very, very,
>>> very, long
>>>   - short
>>
>> If one calls unfill-paragraph on the "very, very" line above, nothing
>> happens. In the past, unfill paragraph would turn the item into a single
>> line, which is very convenient for fixing improperly indented multi-line
>> items.
>
> Could you tell me if the problem with unfill-paragraph persists?  

The problem is solved in the most recent git. Thanks!

> If it does, as there is no unfill-paragraph in standard Emacs, could
> you provide the definition you gave it?

You are right. Sometimes it is difficult to remember where Emacs begins
and one's own customizations end. :)

Here is unfill-paragraph (grabbed from the emacswiki, I believe):

--8<---------------cut here---------------start------------->8---
(defun unfill-paragraph ()
  (interactive)
  (let ((fill-column (point-max)))
    (fill-paragraph nil)))
--8<---------------cut here---------------end--------------->8---

Thanks again,
Matt

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: lists and fill-region
  2011-03-10  0:03 ` Nicolas
@ 2011-03-10  6:11   ` michael hohn
  2011-03-10  8:55     ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: michael hohn @ 2011-03-10  6:11 UTC (permalink / raw)
  To: michael hohn, emacs-orgmode

>
> I have pushed a fix for this case. Thanks for your report, it reminds me
> filling in lists is still a bit fragile, and needs some care.
>
Thanks for the quick response!  The list filling is very nice already.

Cheers,
Michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: lists and fill-region
  2011-03-10  6:11   ` michael hohn
@ 2011-03-10  8:55     ` Bastien
  0 siblings, 0 replies; 10+ messages in thread
From: Bastien @ 2011-03-10  8:55 UTC (permalink / raw)
  To: michael hohn; +Cc: emacs-orgmode

michael hohn <mhhohn@gmail.com> writes:

>>
>> I have pushed a fix for this case. Thanks for your report, it reminds me
>> filling in lists is still a bit fragile, and needs some care.
>>
> Thanks for the quick response!  The list filling is very nice already.

Indeed -- and I cannot thank Nicolas enough for all the work he does in
this area.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-10  8:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 19:04 lists and fill-region michael hohn
2011-03-09 19:36 ` Matt Lundin
2011-03-10  0:08   ` Nicolas
2011-03-10  0:32     ` Matt Lundin
2011-03-09 19:50 ` Bernt Hansen
2011-03-09 20:06   ` Nick Dokos
2011-03-09 20:45     ` Bernt Hansen
2011-03-10  0:03 ` Nicolas
2011-03-10  6:11   ` michael hohn
2011-03-10  8:55     ` Bastien

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).