emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] List: fix creation of new items with incorrect checkbox
@ 2013-06-10 17:14 Craig Tanis
  0 siblings, 0 replies; only message in thread
From: Craig Tanis @ 2013-06-10 17:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

In 8.0.3, org-meta-return  at the end of a list wrongly adds a checkbox:

1. foo
_  <-- cursor here, org-meta-return

....

1. foo
2. [ ] 

to fix, this patches org-insert-heading to make sure that `org-list-full-item-re' actually matches before passing `(match-string 3)' to `org-insert-item'





[-- Attachment #2: 0001-List-fix-creation-of-new-items-with-incorrect-checkb.patch --]
[-- Type: application/octet-stream, Size: 1141 bytes --]

From 5dd6a07733042d6b732e1be5e15bc771ebbfc595 Mon Sep 17 00:00:00 2001
From: Craig Tanis <craig-tanis@utc.edu>
Date: Mon, 10 Jun 2013 12:50:32 -0400
Subject: [PATCH] List: fix creation of new items with incorrect checkbox

* lisp/org.el (org-insert-heading): makes sure that `org-list-full-item-re' matches before passing `(match-string 3)' to `org-insert-item'

When using org-meta-return at the end of a plain text list, checkboxes were
being wrongly inserted in the new item.

TINYCHANGE
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 2e407a5..3ed01d7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7537,8 +7537,8 @@ This is important for non-interactive uses of the command."
 		(save-excursion
 		  (and itemp
 		       (goto-char itemp)
-		       (looking-at org-list-full-item-re)
-		       (match-string 3))))))
+		       (and (looking-at org-list-full-item-re) (match-string 3))
+		       )))))
       (let (begn endn)
 	(when (org-buffer-narrowed-p)
 	  (setq begn (point-min) endn (point-max))
-- 
1.7.12.4 (Apple Git-37)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-10 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10 17:14 [PATCH] List: fix creation of new items with incorrect checkbox Craig Tanis

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