From: Michael Brand <michael.ch.brand@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Emacs Org mode mailing list <emacs-orgmode@gnu.org>,
Nicolas Goaziou <n.goaziou@gmail.com>
Subject: Re: org-insert-heading rewritten from scratch
Date: Thu, 12 Sep 2013 22:52:00 +0200 [thread overview]
Message-ID: <CALn3zojQso1kb=psv1EXXhs5gCmwMR=HJDk_cdK_4zDrA9MZtA@mail.gmail.com> (raw)
In-Reply-To: <3C04E79D-6303-4D86-94FB-62489CF9C10E@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Hi Carsten
On Thu, Sep 12, 2013 at 10:20 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> thanks for the patch - I think we will go with Nicolas' patch for fixing org-insert-heading. May I ask you to check if your tests still to the right thing, and resubmit the test patch?
>
> Many thanks in advance.
Yes, merged patch attached. No changes in the test cases were necessary.
Michael
[-- Attachment #2: 0001-Add-ERTs-for-org-meta-return.patch.txt --]
[-- Type: text/plain, Size: 1888 bytes --]
From d87dd6c70c594b55abcabdb67ea6852b261a1a7c Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Thu, 12 Sep 2013 22:48:16 +0200
Subject: [PATCH] Add ERTs for org-meta-return
* testing/lisp/test-org.el (test-org/meta-return): New `ert-deftest'
to test `org-meta-return'.
---
testing/lisp/test-org.el | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 8a1e9f1..3538242 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -365,6 +365,51 @@
\f
+;;; Editing
+
+;;;; Insert elements
+
+(ert-deftest test-org/meta-return ()
+ "Test M-RET (`org-meta-return')."
+ ;; In a table field insert a row above.
+ (should
+ (org-test-with-temp-text "| a |"
+ (forward-char)
+ (org-meta-return)
+ (forward-line -1)
+ (looking-at "| |$")))
+ ;; In a paragraph change current line into a header.
+ (should
+ (org-test-with-temp-text "a"
+ (org-meta-return)
+ (beginning-of-line)
+ (looking-at "\* a$")))
+ ;; In an item insert an item, in this case above.
+ (should
+ (org-test-with-temp-text "- a"
+ (org-meta-return)
+ (beginning-of-line)
+ (looking-at "- $")))
+ ;; In a drawer and paragraph insert an empty line, in this case above.
+ (should
+ (let ((org-drawers '("MYDRAWER")))
+ (org-test-with-temp-text ":MYDRAWER:\na\n:END:"
+ (forward-line)
+ (org-meta-return)
+ (forward-line -1)
+ (looking-at "$"))))
+ ;; In a drawer and item insert an item, in this case above.
+ (should
+ (let ((org-drawers '("MYDRAWER")))
+ (org-test-with-temp-text ":MYDRAWER:\n- a\n:END:"
+ (forward-line)
+ (org-meta-return)
+ (beginning-of-line)
+ (looking-at "- $")))))
+
+
+
+\f
;;; Links
;;;; Fuzzy Links
--
1.7.12.4 (Apple Git-37)
next prev parent reply other threads:[~2013-09-12 20:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 6:43 org-insert-heading rewritten from scratch Carsten Dominik
2013-08-08 7:41 ` Eric Abrahamsen
2013-08-31 14:00 ` Carsten Dominik
2013-08-31 14:34 ` Nicolas Goaziou
2013-09-01 6:13 ` Carsten Dominik
2013-09-01 8:19 ` Nicolas Goaziou
2013-09-01 12:04 ` Carsten Dominik
2013-09-01 12:25 ` Nicolas Goaziou
2013-09-03 13:16 ` Nicolas Goaziou
2013-09-03 13:25 ` Carsten Dominik
2013-09-03 13:33 ` Carsten Dominik
2013-09-03 13:38 ` Nicolas Goaziou
2013-09-03 13:47 ` Carsten Dominik
2013-09-03 13:58 ` Nicolas Goaziou
2013-09-03 14:04 ` Carsten Dominik
2013-09-03 14:12 ` Nicolas Goaziou
2013-09-07 10:50 ` Nicolas Goaziou
2013-09-07 12:01 ` Nicolas Goaziou
2013-09-01 2:38 ` Eric Abrahamsen
2013-09-01 3:11 ` Samuel Wales
2013-09-01 3:13 ` Samuel Wales
2013-09-09 16:42 ` Michael Brand
2013-09-09 19:10 ` Nicolas Goaziou
2013-09-09 20:37 ` Michael Brand
2013-09-12 20:20 ` Carsten Dominik
2013-09-12 20:52 ` Michael Brand [this message]
2013-09-12 20:58 ` Carsten Dominik
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='CALn3zojQso1kb=psv1EXXhs5gCmwMR=HJDk_cdK_4zDrA9MZtA@mail.gmail.com' \
--to=michael.ch.brand@gmail.com \
--cc=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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).