emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-list-indent-offset only works partially
@ 2011-10-18  8:53 Sébastien Delafond
  2011-10-18  9:33 ` Michael Brand
  2011-10-18 21:00 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Sébastien Delafond @ 2011-10-18  8:53 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

from Debian bug #645214 (http://bugs.debian.org/645214):

  org-mode doesn't seems to honour correctly the org-list-indent-offset
  variable (a recent addition). See the following steps:

  1- Run "emacs -q"
  2- M-x org-mode 
  3- M-x set-variable org-list-indent-offset 8
  4- open /tmp/t.org
  5- Write the following
  - item 1
  [TAB]- item 2

  When you press [TAB], "- item 2" is indented only two spaces right,
  not 8 as org-list-indent-offset describes, thats seems to be a
  bug. But now, if over the item 2 line you do

  6- M-left 
  7- M-right

  The "- item 2" will be correctly indented 8 spaces to the right. So
  org-list-indent-offset is correctly working in this case.

There wasn't any patch provided by the submitter.

Cheers,

--Seb

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

* Re: org-list-indent-offset only works partially
  2011-10-18  8:53 org-list-indent-offset only works partially Sébastien Delafond
@ 2011-10-18  9:33 ` Michael Brand
  2011-10-19  6:57   ` Michael Brand
  2011-10-18 21:00 ` Nicolas Goaziou
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Brand @ 2011-10-18  9:33 UTC (permalink / raw)
  To: Sébastien Delafond; +Cc: emacs-orgmode

Hi all

I would like to suggest to treat this together with a similar issue:

1- Run "emacs -q"
2- M-x org-mode
3- open /tmp/t.org
4- Write the following
- 1 :: item 1
[TAB]- item 2

When you press [TAB], "- item 2" is indented 7 spaces right. But I
would expect it to be indented the same 2 spaces as if over the item 2
line you do

5- M-left
6- M-right

Michael

On Tue, Oct 18, 2011 at 10:53, Sébastien Delafond <sdelafond@gmail.com> wrote:
> Hello,
>
> from Debian bug #645214 (http://bugs.debian.org/645214):
>
>  org-mode doesn't seems to honour correctly the org-list-indent-offset
>  variable (a recent addition). See the following steps:
>
>  1- Run "emacs -q"
>  2- M-x org-mode
>  3- M-x set-variable org-list-indent-offset 8
>  4- open /tmp/t.org
>  5- Write the following
>  - item 1
>  [TAB]- item 2
>
>  When you press [TAB], "- item 2" is indented only two spaces right,
>  not 8 as org-list-indent-offset describes, thats seems to be a
>  bug. But now, if over the item 2 line you do
>
>  6- M-left
>  7- M-right
>
>  The "- item 2" will be correctly indented 8 spaces to the right. So
>  org-list-indent-offset is correctly working in this case.
>
> There wasn't any patch provided by the submitter.

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

* Re: org-list-indent-offset only works partially
  2011-10-18  8:53 org-list-indent-offset only works partially Sébastien Delafond
  2011-10-18  9:33 ` Michael Brand
@ 2011-10-18 21:00 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2011-10-18 21:00 UTC (permalink / raw)
  To: Sébastien Delafond; +Cc: emacs-orgmode

Hello,

Sébastien Delafond <sdelafond@gmail.com> writes:

> from Debian bug #645214 (http://bugs.debian.org/645214):
>
>   org-mode doesn't seems to honour correctly the org-list-indent-offset
>   variable (a recent addition). See the following steps:
>
>   1- Run "emacs -q"
>   2- M-x org-mode 
>   3- M-x set-variable org-list-indent-offset 8
>   4- open /tmp/t.org
>   5- Write the following
>   - item 1
>   [TAB]- item 2
>
>   When you press [TAB], "- item 2" is indented only two spaces right,
>   not 8 as org-list-indent-offset describes, thats seems to be a
>   bug. But now, if over the item 2 line you do
>
>   6- M-left 
>   7- M-right
>
>   The "- item 2" will be correctly indented 8 spaces to the right. So
>   org-list-indent-offset is correctly working in this case.

There is no bug here. 

The important thing to notice is that you are using TAB before inserting
the second bullet. Org understands that you want to indent the current
empty line into the current item (how could it tell you're going to add
an item?).

If you want to trigger `org-list-indent-offset' correctly, first insert
the bullet, then tabulate.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-list-indent-offset only works partially
  2011-10-18  9:33 ` Michael Brand
@ 2011-10-19  6:57   ` Michael Brand
  2011-10-19 11:08     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Brand @ 2011-10-19  6:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas

Now I understand that

- 1 :: item 1
[TAB]- item 2

works as expected, when assuming that you don't want the space after
the "-" to change the indentation similar to Emacs Electric C but want
to keep only TAB, C-c and the modified cursor keys to change the
indentation. BTW, were there considerations or discussions about
"electric indentation" for lists (space after the "-")?

So, for what I want to do I have to use

- 1 :: item 1
-[TAB]item 2

Is the following also doing what is expected?

- 1 :: item 1
[TAB]-[TAB][TAB]item 2

Michael

On Tue, Oct 18, 2011 at 11:33, Michael Brand <michael.ch.brand@gmail.com> wrote:
> Hi all
>
> I would like to suggest to treat this together with a similar issue:
>
> 1- Run "emacs -q"
> 2- M-x org-mode
> 3- open /tmp/t.org
> 4- Write the following
> - 1 :: item 1
> [TAB]- item 2
>
> When you press [TAB], "- item 2" is indented 7 spaces right. But I
> would expect it to be indented the same 2 spaces as if over the item 2
> line you do
>
> 5- M-left
> 6- M-right
>
> Michael
>
> On Tue, Oct 18, 2011 at 10:53, Sébastien Delafond <sdelafond@gmail.com> wrote:
>> Hello,
>>
>> from Debian bug #645214 (http://bugs.debian.org/645214):
>>
>>  org-mode doesn't seems to honour correctly the org-list-indent-offset
>>  variable (a recent addition). See the following steps:
>>
>>  1- Run "emacs -q"
>>  2- M-x org-mode
>>  3- M-x set-variable org-list-indent-offset 8
>>  4- open /tmp/t.org
>>  5- Write the following
>>  - item 1
>>  [TAB]- item 2
>>
>>  When you press [TAB], "- item 2" is indented only two spaces right,
>>  not 8 as org-list-indent-offset describes, thats seems to be a
>>  bug. But now, if over the item 2 line you do
>>
>>  6- M-left
>>  7- M-right
>>
>>  The "- item 2" will be correctly indented 8 spaces to the right. So
>>  org-list-indent-offset is correctly working in this case.
>>
>> There wasn't any patch provided by the submitter.

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

* Re: org-list-indent-offset only works partially
  2011-10-19  6:57   ` Michael Brand
@ 2011-10-19 11:08     ` Nicolas Goaziou
  2011-10-19 16:52       ` Michael Brand
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2011-10-19 11:08 UTC (permalink / raw)
  To: Michael Brand; +Cc: emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> Hi Nicolas
>
> Now I understand that
>
> - 1 :: item 1
> [TAB]- item 2
>
> works as expected, when assuming that you don't want the space after
> the "-" to change the indentation similar to Emacs Electric C but want
> to keep only TAB, C-c and the modified cursor keys to change the
> indentation. BTW, were there considerations or discussions about
> "electric indentation" for lists (space after the "-")?

C-c C-c changes indentation by side-effect. Its purpose is to repair the
current list, which is broken if you use "[TAB]-".

Also don't forget M-RET to insert an new item. I strongly suggest that
binding which does a lot more than simply adding one bullet (renumbering
if necessary, updating of checkboxes, etc.). I usually do M-RET and
possibly TAB until the item has the correct indentation.

Knowing that, I don't see any necessity for an "electric indentation".
Though, to answer your question, I don't think this has ever been
discussed.

> So, for what I want to do I have to use
>
> - 1 :: item 1
> -[TAB]item 2

"M-RET TAB" will be enough.

> Is the following also doing what is expected?
>
> - 1 :: item 1
> [TAB]-[TAB][TAB]item 2

I don't know what is expected here. Again, since you press "[TAB]-"
you're creating a broken list. First use C-c C-c to repair it, then you
can expect something out of it.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-list-indent-offset only works partially
  2011-10-19 11:08     ` Nicolas Goaziou
@ 2011-10-19 16:52       ` Michael Brand
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Brand @ 2011-10-19 16:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas

Thanks for the explanations, it helps me to get the right perspective
to all the various possibilities. And the reread of the manual about
Plain lists reminded me of org-M-RET-may-split-line that I will
configure now.

Michael

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

end of thread, other threads:[~2011-10-19 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18  8:53 org-list-indent-offset only works partially Sébastien Delafond
2011-10-18  9:33 ` Michael Brand
2011-10-19  6:57   ` Michael Brand
2011-10-19 11:08     ` Nicolas Goaziou
2011-10-19 16:52       ` Michael Brand
2011-10-18 21:00 ` Nicolas Goaziou

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