From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: creating new #+KEYWORD: variables Date: Sat, 10 Nov 2018 08:22:01 +0100 Message-ID: <87h8gpcs86.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLNar-0008Lq-Rb for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 02:22:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLNan-0004lz-T5 for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 02:22:09 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38497) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gLNan-0004ji-MW for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 02:22:05 -0500 In-Reply-To: (Matt Price's message of "Thu, 8 Nov 2018 22:32:52 -0500") 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: Matt Price Cc: Org Mode Hello, Matt Price writes: > 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 You can add keywords specific to a given export back-end in its definition, more precisely in :options-alist value. For example, in "ox-texinfo", there is (org-export-define-backend 'texinfo '((bold . org-texinfo-bold)) ... :options-alist '((:texinfo-filename "TEXINFO_FILENAME" nil nil t) ...)) which means `texinfo' back-end should recognize the "#+TEXINFO_FILENAME" keyword, and store its value in the :texinfo-filename property from "info" paramater, which is passed to each function. You can write a derived back-end using this new keyword, along with a template function that actually uses it. Look at the definition of `beamer' back-end for an example. HTH, -- Nicolas Goaziou