[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org structuresin a drawer? (or some other presentation soution)
From: |
Nicolas Goaziou |
Subject: |
Re: [O] org structuresin a drawer? (or some other presentation soution) |
Date: |
Thu, 12 Sep 2013 22:13:08 +0200 |
Correcting myself,
Nicolas Goaziou <address@hidden> 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)))))
- Re: [O] org structuresin a drawer? (or some other presentation soution), (continued)
- Re: [O] org structuresin a drawer? (or some other presentation soution), Thorsten Jolitz, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Nicolas Goaziou, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Matt Price, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Nicolas Goaziou, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Carsten Dominik, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Michael Brand, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Carsten Dominik, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Nicolas Goaziou, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Nicolas Goaziou, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution),
Nicolas Goaziou <=
- Re: [O] org structuresin a drawer? (or some other presentation soution), Carsten Dominik, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Nicolas Goaziou, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Carsten Dominik, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Michael Brand, 2013/09/12
- Re: [O] org structuresin a drawer? (or some other presentation soution), Matt Price, 2013/09/12