From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Add an optional HOLD argument to "n" Org macro Date: Thu, 15 Jun 2017 15:25:42 +0000 Message-ID: References: <2ee94a64a94b46259b0da6e7d34675c9@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3u7o3dj.fsf@t3610> <87pofjtk4b.fsf@t3610> <2069df8c23bc43f3b04b6e203b96be9d@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87r2zvpyst.fsf@delle7240> <8760guib5i.fsf@nicolasgoaziou.fr> <87fuftb4lg.fsf@nicolasgoaziou.fr> <8760fyic6n.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="001a114b9742e442970552014873" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLWej-0003vx-Um for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 11:25:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLWej-000833-6k for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 11:25:57 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:34079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLWei-00082K-Ix for emacs-orgmode@gnu.org; Thu, 15 Jun 2017 11:25:57 -0400 Received: by mail-lf0-x233.google.com with SMTP id v20so11531771lfa.1 for ; Thu, 15 Jun 2017 08:25:56 -0700 (PDT) In-Reply-To: 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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --001a114b9742e442970552014873 Content-Type: multipart/alternative; boundary="001a114b9742e442920552014871" --001a114b9742e442920552014871 Content-Type: text/plain; charset="UTF-8" On Thu, Jun 15, 2017 at 9:10 AM Kaushal Modi wrote: > The patch based off latest master is attached. Please review. > Here's the same patch with one fix.. support white space around the "-"/"hold" arg. This patch adds a dependency on subr-x library for string-trim function that was added in emacs 24.4. -- Kaushal Modi --001a114b9742e442920552014871 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jun 15= , 2017 at 9:10 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
The patch= based off latest master is attached. Please review.

Here's the same patch with one fix.. suppor= t white space around the "-"/"hold" arg.

=
This patch adds a dependency on subr-x library for string-trim f= unction that was added in emacs 24.4.
-- =

Kaushal Mo= di

--001a114b9742e442920552014871-- --001a114b9742e442970552014873 Content-Type: application/octet-stream; name="0001-Add-hold-action-to-the-n-macro.patch" Content-Disposition: attachment; filename="0001-Add-hold-action-to-the-n-macro.patch" Content-Transfer-Encoding: base64 Content-ID: <15cac59b44be06dfada1> X-Attachment-Id: 15cac59b44be06dfada1 RnJvbSBjOTI3NTcyOTY1OWQ0MDNiZDhmNGE1OTIxZTE1MTdjNjUzZWI5NmY2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLYXVzaGFsIE1vZGkgPGthdXNoYWwubW9kaUBnbWFpbC5jb20+ CkRhdGU6IFdlZCwgMTQgSnVuIDIwMTcgMTQ6MzQ6NTMgLTA0MDAKU3ViamVjdDogW1BBVENIXSBB ZGQgaG9sZCAnYWN0aW9uJyB0byB0aGUgIm4iIG1hY3JvCgoqIGxpc3Avb3JnLW1hY3JvLmVsIChv cmctbWFjcm8tLWNvdW50ZXItaW5jcmVtZW50KTogUmVuYW1lIHRoZQpvcHRpb25hbCBhcmcgUkVT RVQgdG8gQUNUSU9OLCBhcyBub3cgdGhhdCBhY3Rpb24gY2FuIG1lYW4gc2V0dGluZywKcmVzZXR0 aW5nIG9yIGV2ZW4gaG9sZGluZyB0aGUgc3BlY2lmaWVkIGNvdW50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ICAgIiB7e3tuKCxob2xkKX19fS57e3tuKGMs cmVzZXQpfX19IiA7QWx0ZXJuYXRpdmUgaG9sZCBhcmcKKwkJICAgIiB7e3tuKCwgLSApfX19Lnt7 e24oYyl9fX0iCSAgICAgIDtXaXRoIHNwYWNlcworCQkgICAiIHt7e24oLCBob2xkICl9fX0ue3t7 bihjKX19fSIgICAgIDtXaXRoIHNwYWNlcworCQkgICAiIHt7e259fX0ue3t7bihjLGhvbGQpfX19 IiA7SG9sZCBvbiBhbm90aGVyIGNvdW50ZXIKKwkJICAgIiB7e3tuKCxob2xkKX19fS57e3tuKGMs LSl9fX0iKSA7SG9sZCBvbiBib3RoIGNvdW50ZXJzCisgICAgICAgICAgIChvcmctbWFjcm8taW5p dGlhbGl6ZS10ZW1wbGF0ZXMpCisgICAgICAgICAgIChvcmctbWFjcm8tcmVwbGFjZS1hbGwgb3Jn LW1hY3JvLXRlbXBsYXRlcykKKyAgICAgICAgICAgKGJ1ZmZlci1zdWJzdHJpbmctbm8tcHJvcGVy dGllcworICAgICAgICAgICAgKGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9uKSAobGluZS1lbmQtcG9z aXRpb24pKSkpKSkKIAogKGVydC1kZWZ0ZXN0IHRlc3Qtb3JnLW1hY3JvL2VzY2FwZS1hcmd1bWVu dHMgKCkKICAgIlRlc3QgYG9yZy1tYWNyby1lc2NhcGUtYXJndW1lbnRzJyBzcGVjaWZpY2F0aW9u cy4iCi0tIAoyLjEzLjAKCg== --001a114b9742e442970552014873--