From mboxrd@z Thu Jan 1 00:00:00 1970 From: aditya siram Subject: Change org-back-to-heading to use org's heading regex Date: Sat, 14 Sep 2013 16:30:46 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc18708a5f4804e65eb1af Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKxRA-0006tJ-HH for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 17:31:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKxR9-0006Up-My for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 17:31:28 -0400 Received: from mail-ie0-x234.google.com ([2607:f8b0:4001:c03::234]:56428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKxR9-0006Ug-Hs for emacs-orgmode@gnu.org; Sat, 14 Sep 2013 17:31:27 -0400 Received: by mail-ie0-f180.google.com with SMTP id u16so4956300iet.39 for ; Sat, 14 Sep 2013 14:31:26 -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 --047d7bdc18708a5f4804e65eb1af Content-Type: text/plain; charset=ISO-8859-1 Hi all, Org-mode uses two regex's to find headings, one from outline.el and one defined internally and captures more information. I propose we stop using the one from outline.el. org-mode uses `org-back-to-heading` a lot to navigate point back to the nearest heading. This just delegates to `outline-back-to-heading` from the outline.el package, which uses a regex for finding headlines: "[*\^L]+" Org also defines another heading regex which is more capable and captures more information: "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$". I would propose changing org-back-to-heading to use that so that a user (like me :) ) can use `match-string` to grab the relevant parts of the string. Since this is a pretty simple, but sweeping change, I thought I'd bring it up here first before patching. Thanks! -deech --047d7bdc18708a5f4804e65eb1af Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all,
Org-mode uses two reg= ex's to find headings, one from outline.el and one defined internally a= nd captures more information. I propose we stop using the one from outline.= el.

org-mode uses `org-back-to-heading` a lot to navigate point back = to the nearest heading.

This just delegates to `outline-back-to-hea= ding` from the outline.el package, which uses a regex for finding headlines= : "[*\^L]+"

Org also defines another heading regex which is more capable and = captures more information: "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$&quo= t;.

I would propose changing org-back-to-heading to use that s= o that a user (like me :) ) can use `match-string` to grab the relevant par= ts of the string.

Since this is a pretty simple, but sweeping change, I thought I'd b= ring it up here first before patching.

Thanks!
-deech



--047d7bdc18708a5f4804e65eb1af--