From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: creating new #+KEYWORD: variables Date: Fri, 9 Nov 2018 21:24:02 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009c417a057a4627a4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLJ7U-0003Vk-PJ for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:35:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLIw8-0007kf-FD for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:23:49 -0500 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:40589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLIw8-0007fV-7y for emacs-orgmode@gnu.org; Fri, 09 Nov 2018 21:23:48 -0500 Received: by mail-io1-xd2e.google.com with SMTP id r7-v6so2533978iog.7 for ; Fri, 09 Nov 2018 18:23:35 -0800 (PST) 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: diego@zzamboni.org Cc: Org Mode --0000000000009c417a057a4627a4 Content-Type: text/plain; charset="UTF-8" ah, thank you Diego, I wil ltry it out and report back. On Fri, Nov 9, 2018 at 4:29 AM Diego Zamboni wrote: > Hi Matt, > > I found a solution for this, which I am using with my (still in > development) setup for exporting from org-mode to LeanPub. I found a > function for extracting document global properties at > https://emacs.stackexchange.com/a/21715, which you could use to support > your first example. After defining =org-global-prop-value=, you could call > it like this: > > (org-global-prop-value "ORG_LMS_COURSE") > > You can see my setup, including the two functions, here: > https://github.com/zzamboni/dot-emacs/blob/master/init.org#publishing-to-leanpub > > Hope this helps! > > --Diego > > > > On Fri, Nov 9, 2018 at 4:33 AM Matt Price wrote: > >> I am writing this interface to my university's learning management >> system: >> https://github.com/titaniumbones/Org-Marking-Mode/tree/use-structured-course-def. >> I am only using hte exporting system tangentially and I have not defined a >> new exporter. However, I would really like to be able to set some variable >> values in the header section of hte document, e.g.: >> >> #+ORG_LMS_COURSE: becomingmodern >> >> or >> >> #+PROPERTY: org-lms-course hackinghistory >> >> I thought the latter might work but (org-entry-get-with-inheritance >> "org-lms-course) and (org-entry-get-with-inheritance "ORG_LMS_COURSE") both >> return nil. The former is in any case somewhat cleaner-looking but I am >> not finding in the manual an instructions on how to add my own keywords. >> Is it possible to do this? I can of course always set a buffer-local >> variable in a src block, e.g.: >> #+begin_src emacs-lisp >> (setq org-lms-course 'becomingmodern) >> #+end_src. >> >> but I would like to be able to avoid that where possible. >> >> Thanks for the help as usual! >> >> >> --0000000000009c417a057a4627a4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
ah, thank you Diego, I wil ltry it out and report back.=C2= =A0

On Fri, Nov 9, 201= 8 at 4:29 AM Diego Zamboni <diego@= zzamboni.org> wrote:
Hi Matt,
<= br>
I found a solution for this, which I am using with my (still = in development) setup for exporting from org-mode to LeanPub. I found a fun= ction for extracting document global properties at https://emacs.stackexchange.c= om/a/21715, which you could use to support your first example. After de= fining =3Dorg-global-prop-value=3D, you could call it like this:
=
(org-global-prop-value "ORG_LMS_COURSE")

You can see my setup, including the two functions, here:=C2= =A0https://github.com/zzamboni/dot-emac= s/blob/master/init.org#publishing-to-leanpub

H= ope this helps!

--Diego

<= br>

On Fri, Nov 9, 2018 at 4:33 AM Matt Price <moptop99@gmail.com> wrote:
I am writ= ing this interface to my university's learning management system: https://github.com/titaniumbones/Org-Marking= -Mode/tree/use-structured-course-def. I am only using hte exporting sys= tem tangentially and I have not defined a new exporter. However, I would re= ally like to be able to set some variable values in the header section of h= te document, e.g.:

#+ORG_LMS_COURSE: b= ecomingmodern

or

#+P= ROPERTY: org-lms-course hackinghistory

I thought t= he latter might work but (org-entry-get-with-inheritance "org-lms-cour= se) and (org-entry-get-with-inheritance "ORG_LMS_COURSE") both re= turn nil.=C2=A0 The former is in any case somewhat cleaner-looking but I am= not finding in the manual an instructions on how to add my own keywords.= =C2=A0 Is it possible to do this? I can of course always set a buffer-local= variable in a src block, e.g.:
#+begin_src emacs-lisp
= (setq org-lms-course 'becomingmodern)
#+end_src.
but I would like to be able to avoid that where possible.

Thanks for the help as usual!

=

--0000000000009c417a057a4627a4--