From: Paul Rudin <paul-sqPYmOVXOov10XsdtD+oqA@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: list items not treated as such.
Date: Fri, 04 Oct 2013 19:47:19 +0100 [thread overview]
Message-ID: <874n8w50w8.fsf@rudin.co.uk> (raw)
In-Reply-To: 87li298013.fsf@gmail.com
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 :)
next prev parent reply other threads:[~2013-10-04 18:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-10-06 19:47 ` Carsten Dominik
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=874n8w50w8.fsf@rudin.co.uk \
--to=paul-sqpymovxoov10xsdtd+oqa@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).