From: Carsten Dominik <carsten.dominik@gmail.com>
To: aditya siram <aditya.siram@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Change org-back-to-heading to use org's heading regex
Date: Sun, 15 Sep 2013 00:21:43 +0200 [thread overview]
Message-ID: <E0AD76DA-91E9-43CB-8791-0BC8CAD0B474@gmail.com> (raw)
In-Reply-To: <CAJrReyii3DZUY60cinmnEXRFct7xxMTon3XtB=C2gC_M5_ghCQ@mail.gmail.com>
Hi Aditya,
I do not support this idea.
1. sometimes Org functions are used in other modes, with a different value for the outline regexp. WHile this will not work for many Org functions, it is useful to have it work for some.
2. For just searching headings, it is efficient to use a regexp that is as simple as possible and does not need to do any back tracking.
3. You can easily use the simple regexps to find a heading. If you need detailed info, match again with looking-at and then use the match data.
Regards
- Carsten
On 14.9.2013, at 23:30, aditya siram <aditya.siram@gmail.com> wrote:
> 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
>
>
>
next prev parent reply other threads:[~2013-09-14 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-14 21:30 Change org-back-to-heading to use org's heading regex aditya siram
2013-09-14 22:21 ` Carsten Dominik [this message]
2013-09-17 22:37 ` aditya siram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E0AD76DA-91E9-43CB-8791-0BC8CAD0B474@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=aditya.siram@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.