From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: [PATCH] Bugfix for heading levels when toggling from list Date: Thu, 9 Jun 2011 09:07:19 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e64c18329ee24b04a5421adc Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUZKt-0008GP-72 for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:07:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUZKr-00036k-8e for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:07:22 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:49935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUZKq-00035b-Ps for emacs-orgmode@gnu.org; Thu, 09 Jun 2011 03:07:21 -0400 Received: by ewy9 with SMTP id 9so509188ewy.0 for ; Thu, 09 Jun 2011 00:07:20 -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: Nicolas Goaziou , Org Mode --0016e64c18329ee24b04a5421adc Content-Type: text/plain; charset=ISO-8859-1 Hi Nicolas, hi all The help provided from this thread about the function outline-level and "Match Data" http://thread.gmane.org/gmane.emacs.orgmode/42611 allowed me to make the attached patch. It resolves two or so buglets, the one I found first was introduced by http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=ddc24673877da5f7d82375fb10b8cc238e2ff6a7 according to git bisect. Michael --0016e64c18329ee24b04a5421adc Content-Type: application/octet-stream; name="0001-Bugfix-for-heading-levels-when-toggling-from-list.patch" Content-Disposition: attachment; filename="0001-Bugfix-for-heading-levels-when-toggling-from-list.patch" Content-Transfer-Encoding: base64 X-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hbCBzdGFycyAiIikgIioi KSAgICAgOyBiZWZvcmUgZmlyc3QgaGVhZGluZworCQkJIChvcmctb2RkLWxldmVscy1vbmx5ICIq KiIpIDsgaW5zaWRlIGhlYWRpbmcsIG9kZAorCQkJICh0ICIqIikpKSAgICAgICAgICAgICAgICAg IDsgaW5zaWRlIGhlYWRpbmcsIG9kZGV2ZW4KIAkJICAocnBsIChjb25jYXQgc3RhcnMgYWRkLXN0 YXJzICIgIikpKQogCSAgICAgKHdoaWxlICg8IChwb2ludCkgZW5kKQogCSAgICAgICAod2hlbiAo YW5kIChub3QgKG9yZy1vbi1oZWFkaW5nLXApKSAobm90IChvcmctYXQtaXRlbS1wKSkKLS0gCjEu Ny40LjIKCg== --0016e64c18329ee24b04a5421adc--