From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: getting access to a self-invented option? Date: Sat, 03 Aug 2019 06:00:19 +1000 Message-ID: <875znfpcbw.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55488) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htdjD-0004ww-4o for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 16:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htdjA-0005x8-IM for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 16:00:38 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:40490) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htdjA-0005tU-AY for emacs-orgmode@gnu.org; Fri, 02 Aug 2019 16:00:36 -0400 Received: by mail-pl1-x644.google.com with SMTP id a93so33974210pla.7 for ; Fri, 02 Aug 2019 13:00:35 -0700 (PDT) Received: from tim-desktop (2001-44b8-31f2-bb00-7285-c2ff-fe35-d2c4.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:7285:c2ff:fe35:d2c4]) by smtp.gmail.com with ESMTPSA id o24sm142081125pfp.135.2019.08.02.13.00.32 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 13:00:33 -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: emacs-orgmode@gnu.org Could you just use a tag for this? My shallow thought is that if you tagged headlines, over time you could use different tags for different content type whereas if you use a new custom type, you would need to repeat the definition process (whatever that might be) every time you discovered a new required type. This would also enable you to benefit from some of the other nice attributes of tags, such as inheritance. Matt Price writes: > I'm trying to streamline some veyr ad-hoc workflows I have. One thing I do > a lot during the school year is make some changes to an org source file, > and then export to hugo markdown with ox-hugo, and finally commit to git > (after that I have a git hook that generates the website & uploads the > changed pages to the appropriate location, usually a github-pages branch or > separate repo). > > So I have this code: > > (defun mwp-hugo-export-and-release () > "Make it faster and easier to put my lectures up on the website." > (interactive) > > (let* ((modfile (org-hugo-export-wim-to-md)) > (basedir (plist-get (org-export-get-environment 'hugo) > ':hugo-base-dir )) > (default-directory (expand-file-name basedir))) > (magit-stage-file modfile) > ;; (magit-status) > (magit-commit-create) > ) ) > > It works great, I'm very happy. HOWEVER: in my websites I have two kinds of > outputs: > > - regular pages -- these get exported to .md files and turned into html by > hugo > - lecture notes -- these get exported to reveal.js HTML pages by > org-re-reveal and my hugo theme treats them differently . > > I would really like to set a switch somewhere in the file, something like: > > #+MWP_EXPORT_TYPE: slides > > And then something like > > let* ((modfile (if (eq :mwp-export-type "slides") > (mwp-hugo-reveal-custom-export-function) > (org-hugo-export-wim-to-md))) > ....etc) > do stuff) > > > But I'm not sure how to get access to a totally non-standard option like > the kind I just invented in that last bit of pseudo-code. Anyone have a > good suggestion? > > Thank you as always! > > Matt -- Tim Cross