emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: org structuresin a drawer? (or some other presentation soution)
Date: Thu, 12 Sep 2013 22:13:08 +0200	[thread overview]
Message-ID: <87d2odpzmz.fsf@gmail.com> (raw)
In-Reply-To: <87hadpq13p.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 12 Sep 2013 21:41:30 +0200")

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)))))

  reply	other threads:[~2013-09-12 20:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=87d2odpzmz.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.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).