From c48fe428df9938517f309dd71e24e549e9709932 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Sat, 1 Jul 2017 03:23:08 -0400 Subject: [PATCH] Change the bindings in Export Dispatcher For example, now to export only the current subtree to a file, you would do `C-c C-e H H`. --- ox-hugo.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ox-hugo.el b/ox-hugo.el index a0a150e..5c5491e 100644 --- a/ox-hugo.el +++ b/ox-hugo.el @@ -50,9 +50,16 @@ This variable can be set to either `toml' or `yaml'." (org-export-define-derived-backend 'hugo 'blackfriday :menu-entry '(?H "Export to Hugo-compatible Markdown" - ((?M "To temporary buffer" + ((?H "Subtree to file " (lambda (a _s v b) (org-hugo-export-to-md a :subtreep v))) + (?h "To file" (lambda (a s v b) (org-hugo-export-to-md a s v))) + (?T "Subtree to temporary buffer " + (lambda (a _s v b) (org-hugo-export-as-md a :subtreep v))) + (?t "To temporary buffer" (lambda (a s v b) (org-hugo-export-as-md a s v))) - (?m "To file" (lambda (a s v b) (org-hugo-export-to-md a s v))) + (?O "Subtree to file and open " + (lambda (a _s v b) + (if a (org-hugo-export-to-md t :subtreep v) + (org-open-file (org-hugo-export-to-md nil :subtreep v))))) (?o "To file and open" (lambda (a s v b) (if a (org-hugo-export-to-md t s v)