all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Diego Zamboni <diego@zzamboni.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: Diego Zamboni <diego@zzamboni.org>, Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Vararg macros, and code block as macro?
Date: Thu, 26 Jul 2018 21:01:08 +0200	[thread overview]
Message-ID: <19470276-0C3C-4140-8B79-2F21AD66910C@zzamboni.org> (raw)
In-Reply-To: <CAFyQvY1A3R=toya=Ecjn0iTVi=eYFEjT=SiwMEnJeKY0DeVfEw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

Hi Kaushal,

> How about adding this to your emacs config:
> 
> …
> Make sure that that always evaluates before you do Org exports, and then simply use this in your Org files:

Thanks for the tips! I hadn’t thought of adding the functions to my Emacs config, but that would work perfectly. On the other hand, it would be nice to make the org file fully self-contained :)

> PS: Thanks for sharing that code! You are following the vision of ox-hugo.. replacing Hugo shortcodes with Org macros :+1: :) 

Thanks! This is exactly what I’m trying to do as I migrate my existing Hugo posts to ox-hugo (I migrate them whenever I need to update them in any way). My idea is to eventually republish some of my posts in a different format (as an ebook, maybe), so I want the text to be as Hugo-independent as possible. And the code is even more readable - I find Hugo’s macro language quite obscure. For example, here’s the same “hsapi” shortcode in Hugo: https://github.com/zzamboni/zzamboni.org/blob/master/layouts/shortcodes/hsapi.html <https://github.com/zzamboni/zzamboni.org/blob/master/layouts/shortcodes/hsapi.html>

Cheers,
—Diego


[-- Attachment #2: Type: text/html, Size: 2115 bytes --]

      parent reply	other threads:[~2018-07-26 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 14:33 Vararg macros, and code block as macro? Diego Zamboni
2018-07-26 15:21 ` Kaushal Modi
2018-07-26 15:39   ` Kaushal Modi
2018-07-26 19:01   ` Diego Zamboni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19470276-0C3C-4140-8B79-2F21AD66910C@zzamboni.org \
    --to=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.