From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: kill contents of a headline, but retain properties Date: Fri, 7 Aug 2015 10:21:30 -0400 Message-ID: References: <87614rtfqj.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f13a022c1e3051cb95aae Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNiWe-0006l7-NO for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:21:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNiWZ-0001AB-2E for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:21:36 -0400 Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]:36766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNiWY-0001A4-T5 for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 10:21:30 -0400 Received: by ioeg141 with SMTP id g141so112972957ioe.3 for ; Fri, 07 Aug 2015 07:21:30 -0700 (PDT) In-Reply-To: <87614rtfqj.fsf@nicolasgoaziou.fr> 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: Matt Price , Org Mode --001a113f13a022c1e3051cb95aae Content-Type: text/plain; charset=UTF-8 On Fri, Aug 7, 2015 at 9:01 AM, Nicolas Goaziou wrote: > Hello, > > Matt Price writes: > > > I have a headline like this: > > > > * Gradebook > > :PROPERTIES: > > :CUSTOM_ID: gradebook > > :END: > > > > some content etc etc etc. > > > > I would like to be able to replace the contents of that headline > > automatically, but retain the properties. > > (org-link-search "[[#gradebook]]") > > (delete-region (org-end-of-meta-data) > (progn (outline-next-heading) (point))) > > Thanks for the wizardry, Nicolas. Very helpful. > You can also create contents with a dynamic block, which will replace > contents at each update. > > can you just provide a skeletal example so I understand better wha that means? thanks so much! > Regards, > > -- > Nicolas Goaziou > --001a113f13a022c1e3051cb95aae Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Fri, Aug 7, 2015 at 9:01 AM, Nicolas Goaziou <<= a href=3D"mailto:mail@nicolasgoaziou.fr" target=3D"_blank">mail@nicolasgoaz= iou.fr> wrote:
Hello,

Matt Price <moptop99@gmail.com= > writes:

> I have a headline like this:
>
> * Gradebook
> :PROPERTIES:
> :CUSTOM_ID: gradebook
> :END:
>
> some content etc etc etc.
>
> I would like to be able to replace the contents of that headline
> automatically, but retain the properties.

=C2=A0 (org-link-search "[[#gradebook]]")

=C2=A0 (delete-region (org-end-of-meta-data)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn (outli= ne-next-heading) (point)))


Thanks for the wizardry, Nicolas.=C2= =A0 Very helpful.
You can also create contents with a dynamic block, which will replace
contents at each update.

can you just provide a skeletal example so I understa= nd better wha that means?=C2=A0 thanks so much!
=C2=A0
Regards,

--
Nicolas Goaziou

--001a113f13a022c1e3051cb95aae--