From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: how to replace 'org-drawers' Date: Mon, 06 Oct 2014 19:21:33 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbByi-00039Q-Jy for emacs-orgmode@gnu.org; Mon, 06 Oct 2014 13:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbByd-0002Gc-4O for emacs-orgmode@gnu.org; Mon, 06 Oct 2014 13:21:44 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:15375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbByc-0002GP-Ub for emacs-orgmode@gnu.org; Mon, 06 Oct 2014 13:21:39 -0400 In-Reply-To: (Jonathan Leech-Pepin's message of "Mon, 6 Oct 2014 11:13:51 -0400") 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: Jonathan Leech-Pepin Cc: emacs-orgmode --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello Jonathan, On 2014-10-06 11:13, Jonathan Leech-Pepin w= rites: > Hello Alan > > On 6 October 2014 08:23, Alan Schmitt > wrote: > > Hello, >=20=20=20=20=20 > 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? >=20=20=20=20=20 > > 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 =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJUMs+iAAoJEAQNCjtO0uXH2oMIAKgng5WLIUePNVGSZIUlFfLY oXLCTIjQnXFcMaO4OqjzP58X8ge62c1CuXxhgeL4mzIC6qokLIx/WRfkqSgfvH3x rLWtNERmSgffbDlUGUwq2cboqPOWOmu0AmJu0T7xCooOkS2/Lnnn71i4sya78UMC aT3BWfANxSTfxUL9s/5YTcSgWUkUgiYWVO9U8Gzoh40VGk7LGnfAZ1a7Zacfqb8s HES3WNqZNKjoCv9B4VWp6mGkNY4oREW4GJVyW9/oSn82htAXoFG/WF4aJm5RTDRz 0xQuQkpknuXOu9qAxEaXJVCwxF0l32ffTZ8qhjMUbOIJ3hDt0kbjvb/Bzmwwhyw= =4YBp -----END PGP SIGNATURE----- --=-=-=--