* org structuresin a drawer? (or some other presentation soution)
@ 2013-09-12 17:06 Matt Price
2013-09-12 17:16 ` Thorsten Jolitz
2013-09-12 17:26 ` Nicolas Goaziou
0 siblings, 2 replies; 17+ messages in thread
From: Matt Price @ 2013-09-12 17:06 UTC (permalink / raw)
To: Org Mode
I'm trying to write my lectures entirely in org. I would like to just
write them once, using the main org file for my notes, and an exported
deck.js presentation for slides. However, I would like to include
quite a number of notes to myself for each slide.
One way to do this is to make a drawer. Unfortunately, from what I
can tell, within a drawer it is not posible to use org structures like
lists. This is too bad, as I have come to rely on such structures in
my notes! Is there a way to either:
- have org elements ike lists in a drawer?
or- mark certain elements (like a list or subheading) as not-for-export?
Thanks as always!
Matt
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:06 org structuresin a drawer? (or some other presentation soution) Matt Price
@ 2013-09-12 17:16 ` Thorsten Jolitz
2013-09-12 17:38 ` Matt Price
2013-09-12 17:26 ` Nicolas Goaziou
1 sibling, 1 reply; 17+ messages in thread
From: Thorsten Jolitz @ 2013-09-12 17:16 UTC (permalink / raw)
To: emacs-orgmode
Matt Price <moptop99@gmail.com> writes:
> or- mark certain elements (like a list or subheading) as not-for-export?
Maybe using the :noexport: tag on a heading?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:16 ` Thorsten Jolitz
@ 2013-09-12 17:38 ` Matt Price
0 siblings, 0 replies; 17+ messages in thread
From: Matt Price @ 2013-09-12 17:38 UTC (permalink / raw)
To: Thorsten Jolitz, Org Mode
On Thu, Sep 12, 2013 at 1:16 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Matt Price <moptop99@gmail.com> writes:
>
>> or- mark certain elements (like a list or subheading) as not-for-export?
>
> Maybe using the :noexport: tag on a heading?
yes, that works! thank you! sorry I missed it in the manual.
Matt
>
> --
> cheers,
> Thorsten
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:06 org structuresin a drawer? (or some other presentation soution) Matt Price
2013-09-12 17:16 ` Thorsten Jolitz
@ 2013-09-12 17:26 ` Nicolas Goaziou
2013-09-12 17:30 ` Matt Price
1 sibling, 1 reply; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 17:26 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Hello,
Matt Price <moptop99@gmail.com> writes:
> One way to do this is to make a drawer. Unfortunately, from what I
> can tell, within a drawer it is not posible to use org structures like
> lists.
Drawers can contain any structure but drawers and headlines.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:26 ` Nicolas Goaziou
@ 2013-09-12 17:30 ` Matt Price
2013-09-12 17:49 ` Nicolas Goaziou
0 siblings, 1 reply; 17+ messages in thread
From: Matt Price @ 2013-09-12 17:30 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode
On Thu, Sep 12, 2013 at 1:26 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Matt Price <moptop99@gmail.com> writes:
>
>> One way to do this is to make a drawer. Unfortunately, from what I
>> can tell, within a drawer it is not posible to use org structures like
>> lists.
>
> Drawers can contain any structure but drawers and headlines.
inside a drawer, when I try to make a lit, org-meta-return doesn't
seem to create a new ist item, but instead just indents the next line
without also inserting a "- ". Is this a bug? THanks,
Matt
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:30 ` Matt Price
@ 2013-09-12 17:49 ` Nicolas Goaziou
2013-09-12 19:13 ` Carsten Dominik
0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 17:49 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Matt Price <moptop99@gmail.com> writes:
> inside a drawer, when I try to make a lit, org-meta-return doesn't
> seem to create a new ist item, but instead just indents the next line
> without also inserting a "- ". Is this a bug? THanks,
I think it is a bug, indeed.
There's this condition in `org-meta-return', but I'm not sure why it is
here. Probably historical reasons.
(cond
...
((or (org-at-drawer-p) (org-in-drawer-p) (org-at-property-p))
(newline-and-indent))
...)
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 17:49 ` Nicolas Goaziou
@ 2013-09-12 19:13 ` Carsten Dominik
2013-09-12 19:18 ` Michael Brand
2013-09-12 19:41 ` Nicolas Goaziou
0 siblings, 2 replies; 17+ messages in thread
From: Carsten Dominik @ 2013-09-12 19:13 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
On 12.9.2013, at 19:49, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Matt Price <moptop99@gmail.com> writes:
>
>> inside a drawer, when I try to make a lit, org-meta-return doesn't
>> seem to create a new ist item, but instead just indents the next line
>> without also inserting a "- ". Is this a bug? THanks,
>
> I think it is a bug, indeed.
>
> There's this condition in `org-meta-return', but I'm not sure why it is
> here. Probably historical reasons.
Well, it is to avoid that a new headline would be made inside a drawer,
because it would violate Org syntax. But of course, it would be OK to
insert an item. What would be a good solution? Maybe we better catch
this problem in org-insert-heading? Or maybe not at all? We also do
not catch it in src block, for example. So I am fine with removing
this condition in org-meta-return.
- Carsten
>
> (cond
> ...
> ((or (org-at-drawer-p) (org-in-drawer-p) (org-at-property-p))
> (newline-and-indent))
> ...)
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:13 ` Carsten Dominik
@ 2013-09-12 19:18 ` Michael Brand
2013-09-12 19:24 ` Carsten Dominik
2013-09-12 20:17 ` Nicolas Goaziou
2013-09-12 19:41 ` Nicolas Goaziou
1 sibling, 2 replies; 17+ messages in thread
From: Michael Brand @ 2013-09-12 19:18 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode, Nicolas Goaziou
Hi Carsten
On Thu, Sep 12, 2013 at 9:13 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> Well, it is to avoid that a new headline would be made inside a drawer,
> because it would violate Org syntax. But of course, it would be OK to
> insert an item. What would be a good solution? Maybe we better catch
> this problem in org-insert-heading? Or maybe not at all? We also do
> not catch it in src block, for example. So I am fine with removing
> this condition in org-meta-return.
What is the plan with my patches here?:
http://thread.gmane.org/gmane.emacs.orgmode/75367/focus=76221
Michael
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:18 ` Michael Brand
@ 2013-09-12 19:24 ` Carsten Dominik
2013-09-12 20:17 ` Nicolas Goaziou
1 sibling, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2013-09-12 19:24 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode, Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On 12.9.2013, at 21:18, Michael Brand <michael.ch.brand@gmail.com> wrote:
> Hi Carsten
>
> On Thu, Sep 12, 2013 at 9:13 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>> Well, it is to avoid that a new headline would be made inside a drawer,
>> because it would violate Org syntax. But of course, it would be OK to
>> insert an item. What would be a good solution? Maybe we better catch
>> this problem in org-insert-heading? Or maybe not at all? We also do
>> not catch it in src block, for example. So I am fine with removing
>> this condition in org-meta-return.
>
> What is the plan with my patches here?:
> http://thread.gmane.org/gmane.emacs.orgmode/75367/focus=76221
Thank you for the reminder. I will take a look - these are in my
action queue, but I had not gotten to them yet.
- Carsten
>
> Michael
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:18 ` Michael Brand
2013-09-12 19:24 ` Carsten Dominik
@ 2013-09-12 20:17 ` Nicolas Goaziou
1 sibling, 0 replies; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 20:17 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode, Carsten Dominik
Hello,
Michael Brand <michael.ch.brand@gmail.com> writes:
> What is the plan with my patches here?:
> http://thread.gmane.org/gmane.emacs.orgmode/75367/focus=76221
I think the approach taken is wrong. But we should definitely keep the
tests.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:13 ` Carsten Dominik
2013-09-12 19:18 ` Michael Brand
@ 2013-09-12 19:41 ` Nicolas Goaziou
2013-09-12 20:13 ` Nicolas Goaziou
2013-09-12 20:16 ` Carsten Dominik
1 sibling, 2 replies; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 19:41 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Hello,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Well, it is to avoid that a new headline would be made inside a drawer,
> because it would violate Org syntax. But of course, it would be OK to
> insert an item. What would be a good solution? Maybe we better catch
> this problem in org-insert-heading? Or maybe not at all? We also do
> not catch it in src block, for example. So I am fine with removing
> this condition in org-meta-return.
I suggest to be very permissive and allow a user to shoot himself in the
foot. The following function implements the same behaviour as before,
without the drawer check, but with Elements.
(defun org-meta-return (&optional arg)
"Insert a new heading or wrap a region in a table.
Calls `org-insert-heading' or `org-table-wrap-region', depending
on context. See the individual commands for more information."
(interactive "P")
(org-check-before-invisible-edit 'insert)
(or (run-hook-with-args-until-success 'org-metareturn-hook)
(let* ((element (org-element-at-point))
(type (org-element-type element)))
(when (eq type 'table-row)
(setq element (org-element-property :parent element)))
(if (and (eq type 'table)
(eq (org-element-property :type element) 'org)
(>= (point) (org-element-property :contents-begin element))
(< (point) (org-element-property :contents-end element)))
(call-interactively 'org-table-wrap-region)
(call-interactively 'org-insert-heading)))))
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:41 ` Nicolas Goaziou
@ 2013-09-12 20:13 ` Nicolas Goaziou
2013-09-12 20:16 ` Carsten Dominik
1 sibling, 0 replies; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 20:13 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Correcting myself,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> (defun org-meta-return (&optional arg)
> "Insert a new heading or wrap a region in a table.
> Calls `org-insert-heading' or `org-table-wrap-region', depending
> on context. See the individual commands for more information."
> (interactive "P")
> (org-check-before-invisible-edit 'insert)
> (or (run-hook-with-args-until-success 'org-metareturn-hook)
> (let* ((element (org-element-at-point))
> (type (org-element-type element)))
> (when (eq type 'table-row)
> (setq element (org-element-property :parent element)))
Oops. I forgot a (setq type 'table) within the `when'.
> (if (and (eq type 'table)
> (eq (org-element-property :type element) 'org)
> (>= (point) (org-element-property :contents-begin element))
> (< (point) (org-element-property :contents-end element)))
> (call-interactively 'org-table-wrap-region)
> (call-interactively 'org-insert-heading)))))
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 19:41 ` Nicolas Goaziou
2013-09-12 20:13 ` Nicolas Goaziou
@ 2013-09-12 20:16 ` Carsten Dominik
2013-09-12 20:35 ` Nicolas Goaziou
1 sibling, 1 reply; 17+ messages in thread
From: Carsten Dominik @ 2013-09-12 20:16 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]
Hi Nicolas, this looks good to me, please apply it.
Thanks
- Carsten
On 12.9.2013, at 21:41, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Well, it is to avoid that a new headline would be made inside a drawer,
>> because it would violate Org syntax. But of course, it would be OK to
>> insert an item. What would be a good solution? Maybe we better catch
>> this problem in org-insert-heading? Or maybe not at all? We also do
>> not catch it in src block, for example. So I am fine with removing
>> this condition in org-meta-return.
>
> I suggest to be very permissive and allow a user to shoot himself in the
> foot. The following function implements the same behaviour as before,
> without the drawer check, but with Elements.
>
> (defun org-meta-return (&optional arg)
> "Insert a new heading or wrap a region in a table.
> Calls `org-insert-heading' or `org-table-wrap-region', depending
> on context. See the individual commands for more information."
> (interactive "P")
> (org-check-before-invisible-edit 'insert)
> (or (run-hook-with-args-until-success 'org-metareturn-hook)
> (let* ((element (org-element-at-point))
> (type (org-element-type element)))
> (when (eq type 'table-row)
> (setq element (org-element-property :parent element)))
> (if (and (eq type 'table)
> (eq (org-element-property :type element) 'org)
> (>= (point) (org-element-property :contents-begin element))
> (< (point) (org-element-property :contents-end element)))
> (call-interactively 'org-table-wrap-region)
> (call-interactively 'org-insert-heading)))))
>
>
>
> Regards,
>
> --
> Nicolas Goaziou
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 20:16 ` Carsten Dominik
@ 2013-09-12 20:35 ` Nicolas Goaziou
2013-09-12 20:41 ` Carsten Dominik
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Nicolas Goaziou @ 2013-09-12 20:35 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Nicolas, this looks good to me, please apply it.
Done (in master).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 20:35 ` Nicolas Goaziou
@ 2013-09-12 20:41 ` Carsten Dominik
2013-09-12 20:42 ` Michael Brand
2013-09-13 0:43 ` Matt Price
2 siblings, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2013-09-12 20:41 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
On 12.9.2013, at 22:35, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi Nicolas, this looks good to me, please apply it.
>
> Done (in master).
Thank you!
- Carsten
>
>
> Regards,
>
> --
> Nicolas Goaziou
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 20:35 ` Nicolas Goaziou
2013-09-12 20:41 ` Carsten Dominik
@ 2013-09-12 20:42 ` Michael Brand
2013-09-13 0:43 ` Matt Price
2 siblings, 0 replies; 17+ messages in thread
From: Michael Brand @ 2013-09-12 20:42 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode
Hi Nicolas
On Thu, Sep 12, 2013 at 10:35 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Done (in master).
Thank you for this improvement. AFAIU org-in-drawer-p was introduced
only for org-meta-return and can now be removed.
Michael
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: org structuresin a drawer? (or some other presentation soution)
2013-09-12 20:35 ` Nicolas Goaziou
2013-09-12 20:41 ` Carsten Dominik
2013-09-12 20:42 ` Michael Brand
@ 2013-09-13 0:43 ` Matt Price
2 siblings, 0 replies; 17+ messages in thread
From: Matt Price @ 2013-09-13 0:43 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode, Carsten Dominik
Thanks Nicolas! Works great.
Matt
On Thu, Sep 12, 2013 at 4:35 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi Nicolas, this looks good to me, please apply it.
>
> Done (in master).
>
>
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-09-13 0:43 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12 17:06 org structuresin a drawer? (or some other presentation soution) Matt Price
2013-09-12 17:16 ` Thorsten Jolitz
2013-09-12 17:38 ` Matt Price
2013-09-12 17:26 ` Nicolas Goaziou
2013-09-12 17:30 ` Matt Price
2013-09-12 17:49 ` Nicolas Goaziou
2013-09-12 19:13 ` Carsten Dominik
2013-09-12 19:18 ` Michael Brand
2013-09-12 19:24 ` Carsten Dominik
2013-09-12 20:17 ` Nicolas Goaziou
2013-09-12 19:41 ` Nicolas Goaziou
2013-09-12 20:13 ` Nicolas Goaziou
2013-09-12 20:16 ` Carsten Dominik
2013-09-12 20:35 ` Nicolas Goaziou
2013-09-12 20:41 ` Carsten Dominik
2013-09-12 20:42 ` Michael Brand
2013-09-13 0:43 ` Matt Price
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.