emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* list items not treated as such.
@ 2013-09-29 18:40 Paul Rudin
  2013-09-29 18:56 ` Daniele Pizzolli
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Rudin @ 2013-09-29 18:40 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ


Example:

1. Some text that extends over more than one line, I'm not sure if the exact
   length is relevant.
   a) stuff; and then
   b) this item will not be recognised as a list item, which can be a bit of a
   pain, so if you're typing with auto-fill on it will be formatted like this,
   but really the second line should align underneath the text of the start of
   the item.
 

Is this working as intended? It seems wrong to me - if I type item b)
above it surely should fill properly?

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

* Re: list items not treated as such.
  2013-09-29 18:40 list items not treated as such Paul Rudin
@ 2013-09-29 18:56 ` Daniele Pizzolli
  2013-09-29 19:05   ` Paul Rudin
  0 siblings, 1 reply; 11+ messages in thread
From: Daniele Pizzolli @ 2013-09-29 18:56 UTC (permalink / raw)
  To: emacs-orgmode

On 09/29/2013 08:40 PM, Paul Rudin wrote:
>
> Example:
>
> 1. Some text that extends over more than one line, I'm not sure if the exact
>     length is relevant.
>     a) stuff; and then
>     b) this item will not be recognised as a list item, which can be a bit of a
>     pain, so if you're typing with auto-fill on it will be formatted like this,
>     but really the second line should align underneath the text of the start of
>     the item.
>
>
> Is this working as intended? It seems wrong to me - if I type item b)
> above it surely should fill properly?

Hello Paul,
Be sure to have this setting:

#+BEGIN_SRC emacs-lisp :results none
(setq org-list-allow-alphabetical t)
#+END_SRC

Regards,
Daniele

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

* Re: list items not treated as such.
  2013-09-29 18:56 ` Daniele Pizzolli
@ 2013-09-29 19:05   ` Paul Rudin
  2013-09-30  5:35     ` Paul Rudin
  2013-09-30 16:05     ` Daniele Pizzolli
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Rudin @ 2013-09-29 19:05 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Daniele Pizzolli <dan-zJXtmFUY6h0@public.gmane.org> writes:

> On 09/29/2013 08:40 PM, Paul Rudin wrote:
>>
>> Example:
>>
>> 1. Some text that extends over more than one line, I'm not sure if the exact
>>     length is relevant.
>>     a) stuff; and then
>>     b) this item will not be recognised as a list item, which can be a bit of a
>>     pain, so if you're typing with auto-fill on it will be formatted like this,
>>     but really the second line should align underneath the text of the start of
>>     the item.
>>
>>
>> Is this working as intended? It seems wrong to me - if I type item b)
>> above it surely should fill properly?
>
> Hello Paul,
> Be sure to have this setting:
>
> #+BEGIN_SRC emacs-lisp :results none
> (setq org-list-allow-alphabetical t)
> #+END_SRC

Yeah, I have that in my init.el, it's not a general problem with
alphabetic labels, it's only in some contexts that problem happens.
hitting alt-enter at the end of item a) works just fine for example - I
get the b) label inserted correctly for example.

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

* Re: list items not treated as such.
  2013-09-29 19:05   ` Paul Rudin
@ 2013-09-30  5:35     ` Paul Rudin
  2013-09-30 16:05     ` Daniele Pizzolli
  1 sibling, 0 replies; 11+ messages in thread
From: Paul Rudin @ 2013-09-30  5:35 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:

> Daniele Pizzolli <dan-zJXtmFUY6h0@public.gmane.org> writes:
>
>> On 09/29/2013 08:40 PM, Paul Rudin wrote:
>>>
>>> Example:
>>>
>>> 1. Some text that extends over more than one line, I'm not sure if the exact
>>>     length is relevant.
>>>     a) stuff; and then
>>>     b) this item will not be recognised as a list item, which can be a bit of a
>>>     pain, so if you're typing with auto-fill on it will be formatted like this,
>>>     but really the second line should align underneath the text of the start of
>>>     the item.
>>>
>>>
>>> Is this working as intended? It seems wrong to me - if I type item b)
>>> above it surely should fill properly?
>>
>> Hello Paul,
>> Be sure to have this setting:
>>
>> #+BEGIN_SRC emacs-lisp :results none
>> (setq org-list-allow-alphabetical t)
>> #+END_SRC
>
> Yeah, I have that in my init.el, it's not a general problem with
> alphabetic labels, it's only in some contexts that problem happens.
> hitting alt-enter at the end of item a) works just fine for example - I
> get the b) label inserted correctly for example.

Another data point on this. I have just noticed that if there is a blank
line prior to the first list item then things work as they should.

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

* Re: list items not treated as such.
  2013-09-29 19:05   ` Paul Rudin
  2013-09-30  5:35     ` Paul Rudin
@ 2013-09-30 16:05     ` Daniele Pizzolli
  2013-09-30 16:37       ` Paul Rudin
  1 sibling, 1 reply; 11+ messages in thread
From: Daniele Pizzolli @ 2013-09-30 16:05 UTC (permalink / raw)
  To: emacs-orgmode

On 09/29/2013 09:05 PM, Paul Rudin wrote:
> Daniele Pizzolli writes:

[]

> Yeah, I have that in my init.el, it's not a general problem with
> alphabetic labels, it's only in some contexts that problem happens.
> hitting alt-enter at the end of item a) works just fine for example - I
> get the b) label inserted correctly for example.

Hello Paul,
With my setup I experience the correct auto-fill.
Maybe you want to try a more recent version of org-mode?
Which one are you using now?

Regards,
Daniele

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

* Re: list items not treated as such.
  2013-09-30 16:05     ` Daniele Pizzolli
@ 2013-09-30 16:37       ` Paul Rudin
  2013-10-01  6:35         ` Paul Rudin
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Rudin @ 2013-09-30 16:37 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Daniele Pizzolli <dan-zJXtmFUY6h0@public.gmane.org> writes:

> On 09/29/2013 09:05 PM, Paul Rudin wrote:
>> Daniele Pizzolli writes:
>
> []
>
>> Yeah, I have that in my init.el, it's not a general problem with
>> alphabetic labels, it's only in some contexts that problem happens.
>> hitting alt-enter at the end of item a) works just fine for example - I
>> get the b) label inserted correctly for example.
>
> Hello Paul,
> With my setup I experience the correct auto-fill.
> Maybe you want to try a more recent version of org-mode?
> Which one are you using now?

Apparently:
Org-mode version 8.2 (8.2-4-ga1a0ac-elpa @ /home/paul/.emacs.d/elpa/org-20130923/)

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

* Re: list items not treated as such.
  2013-09-30 16:37       ` Paul Rudin
@ 2013-10-01  6:35         ` Paul Rudin
  2013-10-04 10:34           ` Paul Rudin
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Rudin @ 2013-10-01  6:35 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:

> Daniele Pizzolli <dan-zJXtmFUY6h0@public.gmane.org> writes:
>
>> On 09/29/2013 09:05 PM, Paul Rudin wrote:
>>> Daniele Pizzolli writes:
>>
>> []
>>
>>> Yeah, I have that in my init.el, it's not a general problem with
>>> alphabetic labels, it's only in some contexts that problem happens.
>>> hitting alt-enter at the end of item a) works just fine for example - I
>>> get the b) label inserted correctly for example.
>>
>> Hello Paul,
>> With my setup I experience the correct auto-fill.
>> Maybe you want to try a more recent version of org-mode?
>> Which one are you using now?
>
> Apparently:
> Org-mode version 8.2 (8.2-4-ga1a0ac-elpa @
> /home/paul/.emacs.d/elpa/org-20130923/)

A bit more experimentation. If I start with emacs -q I get the distro
packaged version, which is 7.8 on my system - and that works fine. So
the problem I refer to seems to have been introduced somewhere between
7.8 and 8.2. 

I suppose I should look at the code myself, but I have no familiarity
with it and thought someone else might know ...

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

* Re: list items not treated as such.
  2013-10-01  6:35         ` Paul Rudin
@ 2013-10-04 10:34           ` Paul Rudin
  2013-10-04 16:37             ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Rudin @ 2013-10-04 10:34 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:

(about lists)

Here is a test for this problem. Notice that if you change the "a)" to "1."
- for example - the test passes. So this is something specific to
alphabetically labelled list items.


(ert-deftest org-list-item-test ()
  (with-temp-buffer
    (org-mode)
    (let ((org-allow-alphabetical t)
	  (fill-column 70))
      (insert "1. some stuff\n"
	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
      (fill-paragraph)
      (should (not (equal (org-in-item-p) 1))))))

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

* Re: list items not treated as such.
  2013-10-04 10:34           ` Paul Rudin
@ 2013-10-04 16:37             ` Nicolas Goaziou
  2013-10-04 18:47               ` Paul Rudin
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-10-04 16:37 UTC (permalink / raw)
  To: Paul Rudin; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:

> Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:
>
> (about lists)
>
> Here is a test for this problem. Notice that if you change the "a)" to "1."
> - for example - the test passes. So this is something specific to
> alphabetically labelled list items.
>
>
> (ert-deftest org-list-item-test ()
>   (with-temp-buffer
>     (org-mode)
>     (let ((org-allow-alphabetical t)
> 	  (fill-column 70))
>       (insert "1. some stuff\n"
> 	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
>       (fill-paragraph)
>       (should (not (equal (org-in-item-p) 1))))))

Quoting `org-list-allow-alphabetical' docstring:

  This variable needs to be set before org.el is loaded.  If you
  need to make a change while Emacs is running, use the customize
  interface or run the following code, where VALUE stands for the
  new value of the variable, after updating it:

    (when (featurep 'org-element) (load "org-element" t t))

So let-binding it cannot work.


Regards,

-- 
Nicolas Goaziou

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

* Re: list items not treated as such.
  2013-10-04 16:37             ` Nicolas Goaziou
@ 2013-10-04 18:47               ` Paul Rudin
  2013-10-06 19:47                 ` Carsten Dominik
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Rudin @ 2013-10-04 18:47 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Nicolas Goaziou <n.goaziou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hello,
>
> Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:
>
>> Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org> writes:
>>
>> (about lists)
>>
>> Here is a test for this problem. Notice that if you change the "a)" to "1."
>> - for example - the test passes. So this is something specific to
>> alphabetically labelled list items.
>>
>>
>> (ert-deftest org-list-item-test ()
>>   (with-temp-buffer
>>     (org-mode)
>>     (let ((org-allow-alphabetical t)
>> 	  (fill-column 70))
>>       (insert "1. some stuff\n"
>> 	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
>>       (fill-paragraph)t
>>       (should (not (equal (org-in-item-p) 1))))))
>
> Quoting `org-list-allow-alphabetical' docstring:
>
>   This variable needs to be set before org.el is loaded.  If you
>   need to make a change while Emacs is running, use the customize
>   interface or run the following code, where VALUE stands for the
>   new value of the variable, after updating it:
>
>     (when (featurep 'org-element) (load "org-element" t t))
>
> So let-binding it cannot work.


Aha. So how do you test things like that? This seems to be OK. Is it?

(ert-deftest org-list-item-test ()
  (with-temp-buffer
    (org-mode)
    (let ((fill-column 70))
      (custom-set-variables '(org-list-allow-alphabetical t))
      (insert "1. some stuff\n"
	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
      (fill-paragraph)
      (should (not (equal (org-in-item-p) 1))))))


This also explains what I was seeing, as I was setting it in my init
file after org was loaded. I was lulled into a false sense of security
because some aspects of alphabetical list label work in this
circumstance.

All I need now is roman numeral list labels too :)

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

* Re: list items not treated as such.
  2013-10-04 18:47               ` Paul Rudin
@ 2013-10-06 19:47                 ` Carsten Dominik
  0 siblings, 0 replies; 11+ messages in thread
From: Carsten Dominik @ 2013-10-06 19:47 UTC (permalink / raw)
  To: Paul Rudin; +Cc: emacs-orgmode

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


On 4.10.2013, at 20:47, Paul Rudin <paul@rudin.co.uk> wrote:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
> 
>> Hello,
>> 
>> Paul Rudin <paul@rudin.co.uk> writes:
>> 
>>> Paul Rudin <paul@rudin.co.uk> writes:
>>> 
>>> (about lists)
>>> 
>>> Here is a test for this problem. Notice that if you change the "a)" to "1."
>>> - for example - the test passes. So this is something specific to
>>> alphabetically labelled list items.
>>> 
>>> 
>>> (ert-deftest org-list-item-test ()
>>>  (with-temp-buffer
>>>    (org-mode)
>>>    (let ((org-allow-alphabetical t)
>>> 	  (fill-column 70))
>>>      (insert "1. some stuff\n"
>>> 	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
>>>      (fill-paragraph)t
>>>      (should (not (equal (org-in-item-p) 1))))))
>> 
>> Quoting `org-list-allow-alphabetical' docstring:
>> 
>>  This variable needs to be set before org.el is loaded.  If you
>>  need to make a change while Emacs is running, use the customize
>>  interface or run the following code, where VALUE stands for the
>>  new value of the variable, after updating it:
>> 
>>    (when (featurep 'org-element) (load "org-element" t t))
>> 
>> So let-binding it cannot work.
> 
> 
> Aha. So how do you test things like that? This seems to be OK. Is it?
> 
> (ert-deftest org-list-item-test ()
>  (with-temp-buffer
>    (org-mode)
>    (let ((fill-column 70))
>      (custom-set-variables '(org-list-allow-alphabetical t))
>      (insert "1. some stuff\n"
> 	      "   a) an alphabetic list item with text longer that the current fill column so that it gets wrapped by fill-paragraph")
>      (fill-paragraph)
>      (should (not (equal (org-in-item-p) 1))))))
> 
> 
> This also explains what I was seeing, as I was setting it in my init
> file after org was loaded. I was lulled into a false sense of security
> because some aspects of alphabetical list label work in this
> circumstance.
> 
> All I need now is roman numeral list labels too :)

No chance!  :)

- Carsten

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

end of thread, other threads:[~2013-10-06 19:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-29 18:40 list items not treated as such Paul Rudin
2013-09-29 18:56 ` Daniele Pizzolli
2013-09-29 19:05   ` Paul Rudin
2013-09-30  5:35     ` Paul Rudin
2013-09-30 16:05     ` Daniele Pizzolli
2013-09-30 16:37       ` Paul Rudin
2013-10-01  6:35         ` Paul Rudin
2013-10-04 10:34           ` Paul Rudin
2013-10-04 16:37             ` Nicolas Goaziou
2013-10-04 18:47               ` Paul Rudin
2013-10-06 19:47                 ` Carsten Dominik

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