all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Checkboxes for description lists
@ 2012-06-08  4:05 Robert Yates
  2012-06-09 13:43 ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Robert Yates @ 2012-06-08  4:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Ive been using org-mode for a while, and it is quite excellent!

I have a question about checkboxes I came across recently. What is the
reason for disallowing the commands for adding and toggling checkboxes
on descripton list items (that is "- partA :: partB" list items) ?
(attempting to do so results in the message "Cannot add a checkbox to
a description list item")

As stated in the manual this can be toggled using
org-list-automatic-rules, but toggling this for checkboxes also
changes the way checkbox statistics are updated. Would it be possible
to "decouple" these two things, so that checkbox manipulation for
description list items would be possible, but statistics would still
automatically be updated, or is there a connection between the two
that I have missed?

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

* Re: Checkboxes for description lists
  2012-06-08  4:05 Checkboxes for description lists Robert Yates
@ 2012-06-09 13:43 ` Nicolas Goaziou
  2012-06-12  9:37   ` Robert Yates
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-06-09 13:43 UTC (permalink / raw)
  To: Robert Yates; +Cc: emacs-orgmode

Hello,

Robert Yates <robert.francis.yates@gmail.com> writes:

> What is the reason for disallowing the commands for adding and
> toggling checkboxes on descripton list items (that is "- partA ::
> partB" list items) ?  (attempting to do so results in the message
> "Cannot add a checkbox to a description list item")

Good question.

I think I thought I had a good reason to do so when I implemented this
rule... Oh, well.

I removed this limitation in org-list.el and modified new exporters so
they handle checkboxes in description lists correctly (that is by adding
checkbox before the tag, not before the description). If it breaks
something beyond repair, I'll just revert the patch.

While at simplifying this `org-list-automatic-rules' variable, I think
that `indent' and `bullet' rules should be hard-coded too. There's no
real reason to make them configurable after all.

Then `org-list-automatic-rules' could be set to a boolean value and
renamed to `org-list-update-statistics-cookies' or something similar.

Any objection to that?


Regards,

-- 
Nicolas Goaziou

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

* Re: Checkboxes for description lists
  2012-06-09 13:43 ` Nicolas Goaziou
@ 2012-06-12  9:37   ` Robert Yates
  2012-06-12 13:06     ` Sebastien Vauban
  0 siblings, 1 reply; 11+ messages in thread
From: Robert Yates @ 2012-06-12  9:37 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

> I removed this limitation in org-list.el and modified new exporters so
> they handle checkboxes in description lists correctly (that is by adding
> checkbox before the tag, not before the description). If it breaks
> something beyond repair, I'll just revert the patch.

This seems to work well for my use cases, thanks!

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

* Re: Checkboxes for description lists
  2012-06-12  9:37   ` Robert Yates
@ 2012-06-12 13:06     ` Sebastien Vauban
  2012-06-12 13:29       ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastien Vauban @ 2012-06-12 13:06 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Robert and Nicolas,

Robert Yates wrote:
>> I removed this limitation in org-list.el and modified new exporters so
>> they handle checkboxes in description lists correctly (that is by adding
>> checkbox before the tag, not before the description). If it breaks
>> something beyond repair, I'll just revert the patch.
>
> This seems to work well for my use cases, thanks!

To go on with that subject, it seems we can't put footnotes in the left part
of the description. Is it intended?  Could that restriction be removed?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Checkboxes for description lists
  2012-06-12 13:06     ` Sebastien Vauban
@ 2012-06-12 13:29       ` Nicolas Goaziou
  2012-06-14  9:30         ` Sebastien Vauban
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-06-12 13:29 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> It seems we can't put footnotes in the left part of the
> description. Is it intended?  Could that restriction be removed?

That's not really intended, and the fix is easy, but I have a question
first: how would it be rendered in LaTeX?

Apparently,

  "\item[tag text\footnote{contents}] item's contents"

isn't valid.


Regards,

-- 
Nicolas Goaziou

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

* Re: Checkboxes for description lists
  2012-06-12 13:29       ` Nicolas Goaziou
@ 2012-06-14  9:30         ` Sebastien Vauban
  2012-06-18 10:45           ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastien Vauban @ 2012-06-14  9:30 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> It seems we can't put footnotes in the left part of the
>> description. Is it intended?  Could that restriction be removed?
>
> That's not really intended, and the fix is easy, but I have a question
> first: how would it be rendered in LaTeX?
>
> Apparently,
>
>   "\item[tag text\footnote{contents}] item's contents"
>
> isn't valid.

I would then say just after the [...] part, so that it stays closer to where
we want to put it.

But, then, you'll say the user can already do that. True.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Checkboxes for description lists
  2012-06-14  9:30         ` Sebastien Vauban
@ 2012-06-18 10:45           ` Nicolas Goaziou
  2012-06-21 21:47             ` Sebastien Vauban
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2012-06-18 10:45 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> Nicolas Goaziou wrote:
>> "Sebastien Vauban"
>> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>>
>>> It seems we can't put footnotes in the left part of the
>>> description. Is it intended?  Could that restriction be removed?
>>
>> That's not really intended, and the fix is easy, but I have a question
>> first: how would it be rendered in LaTeX?
>>
>> Apparently,
>>
>>   "\item[tag text\footnote{contents}] item's contents"
>>
>> isn't valid.
>
> I would then say just after the [...] part, so that it stays closer to where
> we want to put it.
>
> But, then, you'll say the user can already do that. True.

I've added support for footnote references in item tags.  Since it's
quite tricky in LaTeX back-end (as much as nested footnote references),
I'd appreciate if you could test it and tell me if it works as expected.


Regards,

-- 
Nicolas Goaziou

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

* Re: Checkboxes for description lists
  2012-06-18 10:45           ` Nicolas Goaziou
@ 2012-06-21 21:47             ` Sebastien Vauban
  2012-06-22  9:42               ` Nicolas Goaziou
  0 siblings, 1 reply; 11+ messages in thread
From: Sebastien Vauban @ 2012-06-21 21:47 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>> Nicolas Goaziou wrote:
>>> "Sebastien Vauban" writes:
>>>
>>>> It seems we can't put footnotes in the left part of the
>>>> description. Is it intended?  Could that restriction be removed?
>>>
>>> That's not really intended, and the fix is easy, but I have a question
>>> first: how would it be rendered in LaTeX?
>>>
>>> Apparently,
>>>
>>>   "\item[tag text\footnote{contents}] item's contents"
>>>
>>> isn't valid.
>>
>> I would then say just after the [...] part, so that it stays closer to where
>> we want to put it.
>>
>> But, then, you'll say the user can already do that. True.
>
> I've added support for footnote references in item tags.  Since it's
> quite tricky in LaTeX back-end (as much as nested footnote references),
> I'd appreciate if you could test it and tell me if it works as expected.

I don't think it works as expected:

--8<---------------cut here---------------start------------->8---
  - C-c C-e[1] :: Appelle le dispatcher
  - C-c a[2] a :: Appelle l'agenda

  * Footnotes

  [1] E pour export

  [2] C-c a est un préfixe commun à beaucoup de commandes
--8<---------------cut here---------------end--------------->8---

gets exported to:

--8<---------------cut here---------------start------------->8---
  \begin{itemize}
  \item C-c C-e\footnote{E pour export
   } :: Appelle le dispatcher
  \item C-c a\footnote{C-c a est un préfixe commun à beaucoup de commandes
   } a :: Appelle l'agenda
  \end{itemize}
--8<---------------cut here---------------end--------------->8---

That is, not as a description list...

Best regards,
  Seb

[1] DEFINITION NOT FOUND: 1

[2] DEFINITION NOT FOUND: 2

-- 
Sebastien Vauban

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

* Re: Checkboxes for description lists
  2012-06-21 21:47             ` Sebastien Vauban
@ 2012-06-22  9:42               ` Nicolas Goaziou
       [not found]                 ` <8762ajptrd.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
       [not found]                 ` <1340389685.WXHGMQZGWMUF@spammotel.com>
  0 siblings, 2 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2012-06-22  9:42 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

>   - C-c C-e[1] :: Appelle le dispatcher
>   - C-c a[2] a :: Appelle l'agenda
>
>   * Footnotes
>
>   [1] E pour export
>
>   [2] C-c a est un préfixe commun à beaucoup de commandes
>
> gets exported to:
>
>   \begin{itemize}
>   \item C-c C-e\footnote{E pour export
>    } :: Appelle le dispatcher
>   \item C-c a\footnote{C-c a est un préfixe commun à beaucoup de commandes
>    } a :: Appelle l'agenda
>   \end{itemize}
>
> That is, not as a description list...

This is strange. Your example is correctly exported here. Could you
double check your result?

Also, could you use

  M-: (org-element-property :type (org-element-at-point))

on the first item of your list, in order to see if the parser gets it
right?


Regards,

-- 
Nicolas Goaziou

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

* Re: **: Re: Checkboxes for description lists
       [not found]                 ` <8762ajptrd.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-06-22 18:27                   ` Sebastien Vauban
  0 siblings, 0 replies; 11+ messages in thread
From: Sebastien Vauban @ 2012-06-22 18:27 UTC (permalink / raw)
  To: re.ITWSQOTHJVN9M-geNee64TY+gS+FvcfC7Uqw
  Cc: public-emacs-orgmode-mXXj517/zsQ-wOFGN7rlS/M9smdsby/KFg,
	Sebastien Vauban



Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>>   - C-c C-e[1] :: Appelle le dispatcher
>>   - C-c a[2] a :: Appelle l'agenda
>>
>>   * Footnotes
>>
>>   [1] E pour export
>>
>>   [2] C-c a est un préfixe commun à beaucoup de commandes
>>
>> gets exported to [...]
>
> This is strange. Your example is correctly exported here. Could you
> double check your result?
>
> Also, could you use
>
>   M-: (org-element-property :type (org-element-at-point))
>
> on the first item of your list, in order to see if the parser gets it
> right?

Stupid from me: I exported using the old exporter!

With the new one, I get a code that's not so obvious to me...

--8<---------------cut here---------------start------------->8---
\begin{description}
\item[C-c C-e\setcounter{footnote}{0}\footnotemark\setcounter{footnote}{1}] Appelle le dispatcher\footnotetext[1]{E pour export}
\item[C-c a\setcounter{footnote}{1}\footnotemark\setcounter{footnote}{2} a] Appelle l'agenda\footnotetext[2]{C-c a est un préfixe commun à beaucoup de commandes}
\end{description}
--8<---------------cut here---------------end--------------->8---

... but which seems to have a right look in the generated PDF -- I mean when
we read the text.

However, I see strange movements within the document, when clicking on the
(footnote) hyperlinks.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Checkboxes for description lists
       [not found]                 ` <1340389685.WXHGMQZGWMUF@spammotel.com>
@ 2012-06-23  8:53                   ` Nicolas Goaziou
  0 siblings, 0 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2012-06-23  8:53 UTC (permalink / raw)
  To: WXHGMQZGWMUF; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban



Hello,

WXHGMQZGWMUF@spammotel.com writes:

> With the new one, I get a code that's not so obvious to me...
>
> \begin{description}
> \item[C-c C-e\setcounter{footnote}{0}\footnotemark\setcounter{footnote}{1}] Appelle le dispatcher\footnotetext[1]{E pour export}
> \item[C-c a\setcounter{footnote}{1}\footnotemark\setcounter{footnote}{2} a] Appelle l'agenda\footnotetext[2]{C-c a est un préfixe commun à beaucoup de commandes}
> \end{description}
>
> ... but which seems to have a right look in the generated PDF -- I mean when
> we read the text.
>
> However, I see strange movements within the document, when clicking on the
> (footnote) hyperlinks.

I've pushed another attempt to solve the problem. It should also
simplify generated code in this case.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2012-06-23  8:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08  4:05 Checkboxes for description lists Robert Yates
2012-06-09 13:43 ` Nicolas Goaziou
2012-06-12  9:37   ` Robert Yates
2012-06-12 13:06     ` Sebastien Vauban
2012-06-12 13:29       ` Nicolas Goaziou
2012-06-14  9:30         ` Sebastien Vauban
2012-06-18 10:45           ` Nicolas Goaziou
2012-06-21 21:47             ` Sebastien Vauban
2012-06-22  9:42               ` Nicolas Goaziou
     [not found]                 ` <8762ajptrd.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-06-22 18:27                   ` **: " Sebastien Vauban
     [not found]                 ` <1340389685.WXHGMQZGWMUF@spammotel.com>
2012-06-23  8:53                   ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.