emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Change org-back-to-heading to use org's heading regex


From: aditya siram
Subject: [O] Change org-back-to-heading to use org's heading regex
Date: Sat, 14 Sep 2013 16:30:46 -0500

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]