From: Carsten Dominik <carsten.dominik@gmail.com>
To: Paul Rudin <paul@rudin.co.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: list items not treated as such.
Date: Sun, 6 Oct 2013 21:47:18 +0200 [thread overview]
Message-ID: <50CD1355-9F0B-4973-AB18-4BC2C70B97CC@gmail.com> (raw)
In-Reply-To: <874n8w50w8.fsf@rudin.co.uk>
[-- 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 --]
prev parent reply other threads:[~2013-10-06 19: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
2013-10-06 19:47 ` Carsten Dominik [this message]
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=50CD1355-9F0B-4973-AB18-4BC2C70B97CC@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=paul@rudin.co.uk \
/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).