emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] creating new #+KEYWORD: variables


From: Matt Price
Subject: Re: [O] creating new #+KEYWORD: variables
Date: Fri, 9 Nov 2018 21:24:02 -0500

ah, thank you Diego, I wil ltry it out and report back. 

On Fri, Nov 9, 2018 at 4:29 AM Diego Zamboni <address@hidden> 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 <address@hidden> 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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]