From mboxrd@z Thu Jan 1 00:00:00 1970 From: Craig Tanis Subject: [PATCH] List: fix creation of new items with incorrect checkbox Date: Mon, 10 Jun 2013 13:14:49 -0400 Message-ID: <9F10B0CB-E998-4762-B40F-D3C99B573210@weblar.org> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_5440A803-7BE4-407A-A90F-5FFB6A50072B" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um5gF-0002LY-P2 for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 13:14:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Um5gC-0006ce-SK for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 13:14:55 -0400 Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:51652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um5gC-0006cH-OE for emacs-orgmode@gnu.org; Mon, 10 Jun 2013 13:14:52 -0400 Received: by mail-yh0-f46.google.com with SMTP id i57so1648294yha.33 for ; Mon, 10 Jun 2013 10:14:52 -0700 (PDT) Received: from [10.0.1.8] (host-184-174-150-229.FAROLT1.epbfi.com. [184.174.150.229]) by mx.google.com with ESMTPSA id f30sm16576965yhi.21.2013.06.10.10.14.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 10:14:51 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --Apple-Mail=_5440A803-7BE4-407A-A90F-5FFB6A50072B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. [ ]=20 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' --Apple-Mail=_5440A803-7BE4-407A-A90F-5FFB6A50072B Content-Disposition: attachment; filename=0001-List-fix-creation-of-new-items-with-incorrect-checkb.patch Content-Type: application/octet-stream; name="0001-List-fix-creation-of-new-items-with-incorrect-checkb.patch" Content-Transfer-Encoding: quoted-printable =46rom=205dd6a07733042d6b732e1be5e15bc771ebbfc595=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Craig=20Tanis=20=0ADate:=20= Mon,=2010=20Jun=202013=2012:50:32=20-0400=0ASubject:=20[PATCH]=20List:=20= fix=20creation=20of=20new=20items=20with=20incorrect=20checkbox=0A=0A*=20= lisp/org.el=20(org-insert-heading):=20makes=20sure=20that=20= `org-list-full-item-re'=20matches=20before=20passing=20`(match-string=20= 3)'=20to=20`org-insert-item'=0A=0AWhen=20using=20org-meta-return=20at=20= the=20end=20of=20a=20plain=20text=20list,=20checkboxes=20were=0Abeing=20= wrongly=20inserted=20in=20the=20new=20item.=0A=0ATINYCHANGE=0A---=0A=20= lisp/org.el=20|=204=20++--=0A=201=20file=20changed,=202=20insertions(+),=20= 2=20deletions(-)=0A=0Adiff=20--git=20a/lisp/org.el=20b/lisp/org.el=0A= index=202e407a5..3ed01d7=20100644=0A---=20a/lisp/org.el=0A+++=20= b/lisp/org.el=0A@@=20-7537,8=20+7537,8=20@@=20This=20is=20important=20= for=20non-interactive=20uses=20of=20the=20command."=0A=20=09=09= (save-excursion=0A=20=09=09=20=20(and=20itemp=0A=20=09=09=20=20=20=20=20=20= =20(goto-char=20itemp)=0A-=09=09=20=20=20=20=20=20=20(looking-at=20= org-list-full-item-re)=0A-=09=09=20=20=20=20=20=20=20(match-string=20= 3))))))=0A+=09=09=20=20=20=20=20=20=20(and=20(looking-at=20= org-list-full-item-re)=20(match-string=203))=0A+=09=09=20=20=20=20=20=20=20= )))))=0A=20=20=20=20=20=20=20(let=20(begn=20endn)=0A=20=09(when=20= (org-buffer-narrowed-p)=0A=20=09=20=20(setq=20begn=20(point-min)=20endn=20= (point-max))=0A--=20=0A1.7.12.4=20(Apple=20Git-37)=0A=0A= --Apple-Mail=_5440A803-7BE4-407A-A90F-5FFB6A50072B--