From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: how to replace 'org-drawers'
Date: Mon, 06 Oct 2014 19:21:33 +0200 [thread overview]
Message-ID: <m2k34dktb6.fsf@charm-wifi.irisa.fr> (raw)
In-Reply-To: <CAEWDx5dgMAu2Mq9rki8iy21R5uqdbJ1LcR_KhVHjuqS1bFcBQg@mail.gmail.com> (Jonathan Leech-Pepin's message of "Mon, 6 Oct 2014 11:13:51 -0400")
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
Hello Jonathan,
On 2014-10-06 11:13, Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com> writes:
> Hello Alan
>
> On 6 October 2014 08:23, Alan Schmitt <alan.schmitt@polytechnique.org>
> wrote:
>
> Hello,
>
> I'm trying to use org-wc, but it fails because org-drawers no
> longer
> exists. Is there a suggestion to change
> https://github.com/dato/org-wc/blob/master/org-wc.el#L55 such that
> it
> works with current org?
>
>
> A quick search for variables reveals `org-drawer-regexp` [ "^[ ]*:\\
> (\\(?:\\w\\|[-_]\\)+\\):[ ]*$" ]
>
> It matches both the name of the drawer and `:END:`.
>
> So the function could be adapted to use `org-drawer-regexp` instead
> (untested but should match to the next :END:):
>
> ((looking-at org-drawer-regexp)
> (while (or (eobp)
> (not (looking-at ":END:")))
> (re-search-forward org-drawer-regexp nil t)))
This was a most helpful suggestion. Looking at the commit that got rid
of org-drawers, I saw there is a `org-in-drawer-p' function that works
great. The code is now simply
((org-in-drawer-p)
(forward-line))
Thanks again,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
prev parent reply other threads:[~2014-10-06 17:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-06 12:23 how to replace 'org-drawers' Alan Schmitt
2014-10-06 12:56 ` Thorsten Jolitz
2014-10-06 16:50 ` Alan Schmitt
2014-10-06 15:00 ` Rasmus
2014-10-06 16:52 ` Alan Schmitt
2014-10-06 15:13 ` Jonathan Leech-Pepin
2014-10-06 17:21 ` Alan Schmitt [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k34dktb6.fsf@charm-wifi.irisa.fr \
--to=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
--cc=jonathan.leechpepin@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).